Skip to content

Commit 0391361

Browse files
committed
use streaming mode by default
1 parent 852bc3b commit 0391361

10 files changed

+52
-713
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Spells caches the results of expensive aggregations in the local file system as
241241

242242
### Memory Usage
243243

244-
One of my goals in creating Spells was to eliminate issues with memory pressure by exclusively using the map-reduce paradigm and a technology that supports partitioned/streaming aggregation of larget-than-memory datasets. By default, Polars loads the entire dataset in memory, but the API exposes a parameter `streaming` which I have exposed as `use_streaming`. Further testing is needed to determine the performance impacts, but this is the first thing you should try if you run into memory issues.
244+
One of my goals in creating Spells was to eliminate issues with memory pressure by exclusively using the map-reduce paradigm and a technology that supports partitioned/streaming aggregation of larget-than-memory datasets. By default, Polars loads the entire dataset in memory, but the API exposes a parameter `streaming` which I have exposed as `use_streaming` and defaulted to `True` in Spells. Further testing is needed to determine the performance impacts, so you could try turning it off if you have expansive virtual memory. My 16 GB MacBook Air is fine using 60 GB of memory, but my 32 GB homelab is not.
245245

246246
When refreshing a given set's data files from 17Lands using the provided cli, the cache for that set is automatically cleared. The `spells` CLI gives additional tools for managing the local and external caches.
247247

examples/Card Attributes.ipynb

+10-18
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@
160160
"│ --- ┆ --- │\n",
161161
"│ str ┆ f64 │\n",
162162
"╞═══════════════╪═════════════════╡\n",
163-
"│ Bottom ┆ 0.536653\n",
164-
"│ Middle ┆ 0.537659\n",
165-
"│ Other ┆ 0.536676\n",
166-
"│ Top ┆ 0.538845\n",
163+
"│ Bottom ┆ 0.537761\n",
164+
"│ Middle ┆ 0.538843\n",
165+
"│ Other ┆ 0.537782\n",
166+
"│ Top ┆ 0.539812\n",
167167
"└───────────────┴─────────────────┘\n"
168168
]
169169
}
@@ -208,7 +208,7 @@
208208
"│ --- ┆ --- ┆ --- ┆ --- │\n",
209209
"│ str ┆ i32 ┆ f64 ┆ f64 │\n",
210210
"╞═══════════╪════════════╪═══════════════════════════╪═════════════════╡\n",
211-
"│ FDN ┆ 104426 ┆ 0.296736 ┆ 0.544881\n",
211+
"│ FDN ┆ 132430 ┆ 0.336306 ┆ 0.546273\n",
212212
"└───────────┴────────────┴───────────────────────────┴─────────────────┘\n"
213213
]
214214
}
@@ -493,10 +493,10 @@
493493
"│ --- ┆ --- ┆ --- ┆ --- │\n",
494494
"│ str ┆ i32 ┆ f64 ┆ f64 │\n",
495495
"╞═══════════════╪════════════╪═══════════════════════════╪═════════════════╡\n",
496-
"│ Bottom ┆ 138981 ┆ 0.311697 ┆ 0.463402\n",
497-
"│ Middle ┆ 298830 ┆ 0.347177 ┆ 0.543194\n",
498-
"│ Other ┆ 310058 ┆ 0.30881 ┆ 0.542583\n",
499-
"│ Top ┆ 168579 ┆ 0.373997 ┆ 0.616378\n",
496+
"│ Bottom ┆ 143513 ┆ 0.314543 ┆ 0.463525\n",
497+
"│ Middle ┆ 313756 ┆ 0.351066 ┆ 0.543233\n",
498+
"│ Other ┆ 311412 ┆ 0.314304 ┆ 0.542417\n",
499+
"│ Top ┆ 175771 ┆ 0.376888 ┆ 0.616455\n",
500500
"└───────────────┴────────────┴───────────────────────────┴─────────────────┘\n"
501501
]
502502
}
@@ -566,14 +566,6 @@
566566
" )\n",
567567
")"
568568
]
569-
},
570-
{
571-
"cell_type": "code",
572-
"execution_count": null,
573-
"id": "a9b0c986-256c-4d27-ba71-49876e08a8d1",
574-
"metadata": {},
575-
"outputs": [],
576-
"source": []
577569
}
578570
],
579571
"metadata": {
@@ -592,7 +584,7 @@
592584
"name": "python",
593585
"nbconvert_exporter": "python",
594586
"pygments_lexer": "ipython3",
595-
"version": "3.13.1"
587+
"version": "3.11.2"
596588
}
597589
},
598590
"nbformat": 4,

examples/Metagame Summary.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
},
288288
{
289289
"cell_type": "code",
290-
"execution_count": 7,
290+
"execution_count": 6,
291291
"id": "4d700219-d655-4234-8732-3f65490cf188",
292292
"metadata": {},
293293
"outputs": [
@@ -347,7 +347,7 @@
347347
"name": "python",
348348
"nbconvert_exporter": "python",
349349
"pygments_lexer": "ipython3",
350-
"version": "3.13.1"
350+
"version": "3.11.2"
351351
}
352352
},
353353
"nbformat": 4,

0 commit comments

Comments
 (0)