Skip to content

Commit 61d7c52

Browse files
authored
Merge branch 'develop' into dependabot/pip/transformers-4.48.0
2 parents f16e174 + a13fc98 commit 61d7c52

File tree

122 files changed

+6875
-2375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+6875
-2375
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.9.3.dev0
2+
current_version = 0.10.1.dev0
33
commit = False
44
tag = False
55
allow_dirty = False

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ notebooks/*.ipynb -linguist-detectable
22
*.png filter=lfs diff=lfs merge=lfs -text
33
*.svg filter=lfs diff=lfs merge=lfs -text
44
logo.svg -filter=lfs -diff=lfs -merge=lfs text
5+
*.pkl filter=lfs diff=lfs merge=lfs -text

.github/workflows/main.yaml

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ jobs:
112112
group_number: ${{ matrix.group_number }}
113113
needs: [ code-quality ]
114114

115-
push-docs-and-release-testpypi:
116-
name: Publish documentation # and maybe release package to TestPyPI
115+
publish-docs:
116+
name: Publish documentation
117117
runs-on: ubuntu-22.04
118118
needs: [docs, group-tests, notebook-tests]
119-
if: ${{ github.ref == 'refs/heads/develop' }}
119+
if: ${{ github.ref == 'refs/heads/develop' && github.event_name != 'pull_request' }}
120120
concurrency:
121-
group: publish
121+
group: publish-docs
122122
steps:
123123
- uses: actions/checkout@v4
124124
with:
@@ -140,14 +140,37 @@ jobs:
140140
title: Development
141141
email: ${{ env.GITHUB_BOT_EMAIL }}
142142
username: ${{ env.GITHUB_BOT_USERNAME }}
143-
# Deactivated until we solve the issue with the credentials (Jan. 2025)
144-
# - name: Build and publish to TestPyPI
145-
# env:
146-
# TWINE_USERNAME: __token__
147-
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
148-
# run: |
149-
# set -x
150-
# export BUILD_NUMBER=$GITHUB_RUN_NUMBER
151-
# bump2version --no-tag --no-commit --verbose --serialize '{major}.{minor}.{patch}.{release}{$BUILD_NUMBER}' boguspart
152-
# python setup.py sdist bdist_wheel
153-
# twine upload -r testpypi --verbose --non-interactive dist/*
143+
144+
145+
publish-testpypi:
146+
name: Publish package to TestPyPI
147+
runs-on: ubuntu-22.04
148+
needs: [group-tests, notebook-tests]
149+
if: ${{ github.ref == 'refs/heads/develop' && github.event_name != 'pull_request' }}
150+
concurrency:
151+
group: publish-testpypi
152+
permissions:
153+
id-token: write
154+
environment:
155+
name: testpypi
156+
steps:
157+
- uses: actions/checkout@v4
158+
with:
159+
fetch-depth: 0
160+
lfs: true
161+
- name: Setup Python 3.9
162+
uses: ./.github/actions/python
163+
with:
164+
python_version: 3.9
165+
- name: Bump version and build package
166+
run: |
167+
set -x
168+
export BUILD_NUMBER=$GITHUB_RUN_NUMBER
169+
bump2version --no-tag --no-commit --verbose --serialize '{major}.{minor}.{patch}.{release}{$BUILD_NUMBER}' boguspart
170+
python setup.py sdist bdist_wheel
171+
- name: Publish to TestPyPI
172+
uses: pypa/gh-action-pypi-publish@release/v1
173+
with:
174+
repository-url: https://test.pypi.org/legacy/
175+
print-hash: true
176+
verbose: true

.github/workflows/publish.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ env:
2323
jobs:
2424
publish:
2525
runs-on: ubuntu-22.04
26+
environment:
27+
name: publish
28+
url: https://pypi.org/pydvl
2629
concurrency:
2730
group: publish
31+
permissions:
32+
id-token: write
2833
steps:
2934
- name: Checking out last commit in release
3035
if: ${{ github.event_name != 'workflow_dispatch' }}
@@ -54,6 +59,14 @@ jobs:
5459
# Make the version available as env variable for next steps
5560
echo CURRENT_VERSION=$CURRENT_VERSION >> $GITHUB_ENV
5661
shell: bash
62+
- name: Build dist
63+
run: |
64+
python setup.py sdist bdist_wheel
65+
- name: Publish to PyPI
66+
uses: pypa/gh-action-pypi-publish@release/v1
67+
with:
68+
verbose: true
69+
print-hash: true
5770
- name: Deploy Docs
5871
uses: ./.github/actions/deploy-docs
5972
with:
@@ -63,10 +76,3 @@ jobs:
6376
email: ${{ env.GITHUB_BOT_EMAIL }}
6477
username: ${{ env.GITHUB_BOT_USERNAME }}
6578
set-default: 'true'
66-
- name: Build and publish to PyPI
67-
env:
68-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
69-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
70-
run: |
71-
python setup.py sdist bdist_wheel
72-
twine upload --verbose --non-interactive dist/*

.github/workflows/run-notebook-tests-workflow.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ jobs:
2626
- name: Free Disk Space (Ubuntu)
2727
uses: jlumbroso/free-disk-space@main
2828
with:
29-
large-packages: false
29+
large-packages: true
3030
docker-images: false
3131
- uses: actions/checkout@v4
3232
with:
3333
fetch-depth: 0
34+
lfs: true
3435
- name: Setup Python ${{ inputs.python_version }}
3536
uses: ./.github/actions/python
3637
with:

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ celerybeat.pid
110110
.venv
111111
env/
112112
venv/
113-
venv38/
113+
venv39/
114114
ENV/
115115
env.bak/
116116
venv.bak/
@@ -141,9 +141,18 @@ pylint.html
141141
runs/
142142
data/models/
143143
*.pkl
144+
!data/*.pkl
144145

145146
# Docs
146147
docs_build
147148

148149
# pytest-profiling
149150
prof/
151+
152+
# JS tooling
153+
node_modules/
154+
package.json
155+
package-lock.json
156+
157+
#
158+
.serena

.test_durations

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,10 +1781,6 @@
17811781
"tests/value/shapley/test_montecarlo.py::test_linear_montecarlo_with_outlier[owen-kwargs1-scorer0-0.2-2-0-21]": 6.573138832000012,
17821782
"tests/value/shapley/test_montecarlo.py::test_linear_montecarlo_with_outlier[owen_antithetic-kwargs2-scorer0-0.2-2-0-21]": 10.124256999999972,
17831783
"tests/value/shapley/test_montecarlo.py::test_linear_montecarlo_with_outlier[permutation_montecarlo-kwargs0-scorer0-0.2-2-0-21]": 2.7115268339999545,
1784-
"tests/value/shapley/test_montecarlo.py::test_montecarlo_shapley_housing_dataset[12-3-12-combinatorial_montecarlo-kwargs0]": 0.16786966001382098,
1785-
"tests/value/shapley/test_montecarlo.py::test_montecarlo_shapley_housing_dataset[12-3-12-owen-kwargs1]": 17.011920137971174,
1786-
"tests/value/shapley/test_montecarlo.py::test_montecarlo_shapley_housing_dataset[12-3-12-owen_antithetic-kwargs2]": 35.88025256394758,
1787-
"tests/value/shapley/test_montecarlo.py::test_montecarlo_shapley_housing_dataset[12-3-4-group_testing-kwargs3]": 0.25901710899779573,
17881784
"tests/value/shapley/test_montecarlo.py::test_seed[combinatorial_montecarlo-kwargs0-test_game0]": 0.04085670800000685,
17891785
"tests/value/shapley/test_montecarlo.py::test_seed[group_testing-kwargs3-test_game0]": 0.23488145900003587,
17901786
"tests/value/shapley/test_montecarlo.py::test_seed[owen-kwargs1-test_game0]": 0.30296191700003305,

CHANGELOG.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,40 @@
22

33
## Unreleased
44

5+
### Added
6+
7+
- Support for `torch.Tensor` as underlying data type in `Dataset` and
8+
`GroupedDataset`
9+
[PR #673](https://github.com/aai-institute/pyDVL/pull/673)
10+
- Support for pytorch models in most valuation methods when wrapped in
11+
classes implementing the protocol `TorchSupervisedModel`, e.g. by using
12+
[skorch.NeuralNetClassifier](https://skorch.readthedocs.io/en/stable/classifier.html)
13+
models
14+
[PR #673](https://github.com/aai-institute/pyDVL/pull/673)
15+
- Improved documentation and examples using DeepSets for Data Utility Learning
16+
[PR #674](https://github.com/aai-institute/pyDVL/pull/674)
17+
18+
### Fixed
19+
20+
- Issues with `Dataset` indexing
21+
[PR #673](https://github.com/aai-institute/pyDVL/pull/673)
22+
23+
### Changed
24+
25+
26+
## v0.10.0 - 💥📚🐞🆕 New valuation interface, improved docs, new methods, breaking changes and tons of improvements
27+
528

629
### Added
730

31+
- Simple result serialization to resume computation of values
32+
[PR #666](https://github.com/aai-institute/pyDVL/pull/666)
833
- Simple memory monitor / reporting
934
[PR #663](https://github.com/aai-institute/pyDVL/pull/663)
1035
- New stopping criterion `MaxSamples`
1136
[PR #661](https://github.com/aai-institute/pyDVL/pull/661)
37+
- New pseudo-stopping criterion `History` to record value updates during fitting
38+
[PR #653](https://github.com/aai-institute/pyDVL/pull/653)
1239
- Introduced `UtilityModel` and two implementations `IndicatorUtilityModel`
1340
and `DeepSetsUtilityModel` for data utility learning
1441
[PR #650](https://github.com/aai-institute/pyDVL/pull/650)
@@ -29,6 +56,7 @@
2956
- Refactor MSR Banzhaf semivalues with the new sampler architecture.
3057
[PR #605](https://github.com/aai-institute/pyDVL/pull/605)
3158
[PR #641](https://github.com/aai-institute/pyDVL/pull/641)
59+
[PR #653](https://github.com/aai-institute/pyDVL/pull/653)
3260
- Refactor group-testing shapley values with new sampler architecture
3361
[PR #602](https://github.com/aai-institute/pyDVL/pull/602)
3462
- Refactor least-core data valuation methods with more supported sampling
@@ -89,9 +117,13 @@
89117

90118
### Changed
91119

120+
- Major rewrite of the documentation for the new interface in 0.10.0
121+
[PR #653](https://github.com/aai-institute/pyDVL/pull/653)
92122
- Slicing, comparing and setting of `ValuationResult` behave in a more
93-
natural way
94-
[PR #660](https://github.com/aai-institute/pyDVL/pull/660)
123+
natural and consistent way. Several bug fixes.
124+
[PR #653](https://github.com/aai-institute/pyDVL/pull/653)
125+
[PR #660](https://github.com/aai-institute/pyDVL/pull/660)
126+
[PR #666](https://github.com/aai-institute/pyDVL/pull/666)
95127
- Switched all semi-value coefficients and sampler weights to log-space in
96128
order to avoid overflows
97129
[PR #643](https://github.com/aai-institute/pyDVL/pull/643)
@@ -160,6 +192,8 @@
160192
- renaming `PreConditioner` -> `Preconditioner`
161193
- fit to `TensorOperator`
162194
[PR #601](https://github.com/aai-institute/pyDVL/pull/601)
195+
- Bumped `zarr` dependency to v3
196+
[PR #668](https://github.com/aai-institute/pyDVL/pull/668)
163197

164198

165199
## 0.9.2 - 🏗 Bug fixes, logging improvement

CLAUDE.local.md

Whitespace-only changes.

CONTRIBUTING.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ To add a citation inside a markdown file, use the notation `[@ citekey]` (with
415415
no space). Alas,
416416
because of when mkdocs-bibtex enters the pipeline, it won't process docstrings.
417417
For module documentation, we manually inject html into the markdown files. For
418-
example, in `pydvl.value.shapley.montecarlo` we have:
418+
example, in `pydvl.valuation.methods.shapley` we have:
419419

420420
```markdown
421421
"""
@@ -676,8 +676,18 @@ part):
676676
```shell
677677
build_scripts/release-version.sh 0.1.6
678678
```
679+
This will:
679680

680-
To find out how to use the script, pass the `-h` or `--help` flags:
681+
- Pull latest remote version of develop (fast-forward only) from origin
682+
- Create a branch `release/v0.1.6`
683+
- Bump version number: 0.1.5.dev1234 ⟶ 0.1.6
684+
- Merge release branch into master locally and on origin
685+
- Tag as `v0.1.6`
686+
- Bump version number again to next development pre-release
687+
- Merge release branch into develop locally and on origin
688+
- Delete release branch
689+
690+
For usage details, pass the `-h` or `--help` flags:
681691

682692
```shell
683693
build_scripts/release-version.sh --help
@@ -687,11 +697,10 @@ If running in interactive mode (without `-y|--yes`), the script will output a
687697
summary of pending changes and ask for confirmation before executing the
688698
actions.
689699

690-
Once this is done, a tag will be created on the repository. You should then
691-
create a GitHub
700+
Once the script is done, you should then create a GitHub
692701
[release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release)
693-
for that tag. That will a trigger a CI pipeline that will automatically create a
694-
package and publish it from CI to PyPI.
702+
for the tag that was created. That will a trigger a CI pipeline that will
703+
automatically create a package and publish it from CI to PyPI.
695704

696705
### Manual release process
697706

0 commit comments

Comments
 (0)