Skip to content

Commit 1462af6

Browse files
committed
Prefer operating on ValuationResult over dataframe for illustrative purposes
1 parent 09e4c67 commit 1462af6

File tree

2 files changed

+84
-64
lines changed

2 files changed

+84
-64
lines changed

notebooks/msr_banzhaf_digits.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
{
3232
"cell_type": "code",
33-
"execution_count": null,
33+
"execution_count": 1,
3434
"metadata": {
3535
"tags": [
3636
"hide"
@@ -52,6 +52,7 @@
5252
"import numpy as np\n",
5353
"import torch\n",
5454
"from support.banzhaf import load_digits_dataset\n",
55+
"from support.common import filecache\n",
5556
"\n",
5657
"from pydvl.reporting.plots import plot_result_errors\n",
5758
"\n",
@@ -152,7 +153,8 @@
152153
" test = test[:10]\n",
153154
" n_jobs = 1\n",
154155
" n_epochs = 1\n",
155-
" batch_size = 1"
156+
" batch_size = 1\n",
157+
" filecache = lambda x: lambda y: y # passthrough"
156158
]
157159
},
158160
{
@@ -279,7 +281,6 @@
279281
"source": [
280282
"from joblib import parallel_config\n",
281283
"\n",
282-
"from notebooks.support.common import filecache\n",
283284
"from pydvl.valuation.methods import BanzhafValuation\n",
284285
"\n",
285286
"valuation = BanzhafValuation(utility, sampler=sampler, is_done=stopping, progress=True)\n",

notebooks/shapley_basic_spotify.ipynb

Lines changed: 80 additions & 61 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)