Skip to content

Commit c0a1aed

Browse files
committed
Merge branch 'develop' into fix/pytest-xdist
# Conflicts: # CHANGELOG.md
2 parents 7728ea4 + 0e75b18 commit c0a1aed

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
- No longer using docker within tests to start a memcached server
66
[PR #444](https://github.com/aai-institute/pyDVL/pull/444)
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
@@ -173,12 +173,29 @@ Or:
173173
]
174174
```
175175

176-
To only hide the input
176+
To only hide the input and
177+
178+
```yaml
179+
"tags": [
180+
"hide-output"
181+
]
182+
```
183+
for hiding the output only.
177184

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

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

183200
## Documentation
184201

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.

notebooks/shapley_basic_spotify.ipynb

Lines changed: 73 additions & 42 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)