Skip to content

Commit 3778d13

Browse files
committed
Merge branch 'develop' into feature/filter-converged
# Conflicts: # CHANGELOG.md # src/pydvl/reporting/plots.py
2 parents 072424d + 0e75b18 commit 3778d13

17 files changed

+2077
-357
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
- Faster semi-value computation with per-index check of stopping criteria (optional)
66
[PR #437](https://github.com/aai-institute/pyDVL/pull/437)
7+
- Improvements and fixes to notebooks
8+
[PR #436](https://github.com/aai-institute/pyDVL/pull/436)
9+
- Fix initialization of `data_names` in `ValuationResult.zeros()`
10+
[PR #443](https://github.com/aai-institute/pyDVL/pull/443)
711
- Using pytest-xdist for faster local tests
812
[PR #440](https://github.com/aai-institute/pyDVL/pull/440)
913
- Added `AntitheticPermutationSampler`

CONTRIBUTING.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,29 @@ Or:
170170
]
171171
```
172172

173-
To only hide the input
173+
To only hide the input and
174+
175+
```yaml
176+
"tags": [
177+
"hide-output"
178+
]
179+
```
180+
for hiding the output only.
174181

175182
It is important to leave a warning at the top of the document to avoid confusion.
176183
Examples for hidden imports and plots are available in the notebooks, e.g. in
177-
[Shapley for data valuation](https://aai-institute.github.io/pyDVL/examples/shapley_basic_spotify.ipynb).
184+
*notebooks/shapley_basic_spotify.ipynb*.
178185

186+
### Plots in Notebooks
187+
If you add a plot to a notebook, which should also render nicely in browser
188+
dark mode, add the tag *invertible-output*, i.e.
189+
190+
```yaml
191+
"tags": [
192+
"invertible-output"
193+
]
194+
```
195+
This applies a simple CSS-filter to the output image of the cell.
179196

180197
## Documentation
181198

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ methods from the following papers:
5252
Shapley Values](https://doi.org/10.1109/ICPR48806.2021.9412511). In 25th
5353
International Conference on Pattern Recognition (ICPR 2020), 7992–99. IEEE,
5454
2021.
55-
- Yan, T., & Procaccia, A. D. [If You Like Shapley Then You’ll Love the
55+
- Yan, T., and Procaccia, A. D. [If You Like Shapley Then You’ll Love the
5656
Core](https://ojs.aaai.org/index.php/AAAI/article/view/16721). Proceedings of
5757
the AAAI Conference on Artificial Intelligence, 35(6) (2021): 5751-5759.
5858
- Jia, Ruoxi, David Dao, Boxin Wang, Frances Ann Hubis, Nick Hynes, Nezihe Merve

docs/css/extra.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,17 @@ a.autorefs-external:hover::after {
107107
color: black;
108108
}
109109

110-
111110
body[data-md-color-scheme="default"] .invertible img {
112111
}
113112

114113
body[data-md-color-scheme="slate"] .invertible img {
115114
filter: invert(100%) hue-rotate(180deg);
116115
}
117116

117+
body[data-md-color-scheme="slate"] .celltag_invertible-output img {
118+
filter: invert(100%) hue-rotate(180deg);
119+
}
120+
118121
/* Rendered dataframe from jupyter */
119122
table.dataframe {
120123
display: block;

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ plugins:
5353
- hide
5454
remove_input_tags:
5555
- hide-input
56+
remove_all_outputs_tags:
57+
- hide-output
5658
binder: true
5759
binder_service_name: "gh"
5860
binder_branch: "develop"

notebooks/data_oob.ipynb

Lines changed: 30 additions & 11 deletions
Large diffs are not rendered by default.

notebooks/influence_imagenet.ipynb

Lines changed: 296 additions & 105 deletions
Large diffs are not rendered by default.

notebooks/influence_synthetic.ipynb

Lines changed: 208 additions & 71 deletions
Large diffs are not rendered by default.

notebooks/influence_wine.ipynb

Lines changed: 209 additions & 50 deletions
Large diffs are not rendered by default.

notebooks/least_core_basic.ipynb

Lines changed: 1155 additions & 30 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)