Skip to content

Reuse npse_trained_model fixure for test_npse_map #1461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f74511a
reuse npse_trained_model fixure for test_npse_map
vagechirkov Mar 17, 2025
f59a023
fix: sde_type and prior_type are now the part of the trained model fi…
vagechirkov Mar 17, 2025
b0c506d
formatting: shorten the parametrize mark
vagechirkov Mar 18, 2025
5fdb087
enh: mark default as NOT slow
vagechirkov Mar 18, 2025
607fce0
enh: clean up tests
vagechirkov Mar 18, 2025
c363126
chore: add syrupy dependency for snapshot testing, add snapshot test …
schroedk Mar 19, 2025
893810c
WIP: pytest_cases spike
schroedk Mar 19, 2025
8c3cc25
Update snapshots
schroedk Mar 20, 2025
8cc1ed0
refactor npse tests
schroedk Mar 20, 2025
d6341db
Update num_simulations and num_samples for slow version of tests
schroedk Mar 20, 2025
cbd35d1
WIP
schroedk Mar 20, 2025
c4dfceb
Snapshot list of floats instead of tensor object
schroedk Mar 20, 2025
43a8778
Increase numbers in snapshot test
schroedk Mar 20, 2025
422bbe4
Merge branch 'sbi-dev:main' into speed-up-tests-with-fixtures
schroedk Mar 20, 2025
0a9803c
refactor sampling test parameters handling
vagechirkov Mar 20, 2025
ba2fb41
Merge branch 'speed-up-tests-with-fixtures' into handle-combinations
vagechirkov Mar 20, 2025
802aec4
Merge pull request #2 from vagechirkov/handle-combinations
vagechirkov Mar 20, 2025
d4c886f
Restrict snapshot test to gaussian prior
schroedk Mar 20, 2025
f6b517d
clean up x_o
vagechirkov Mar 20, 2025
59d56d2
Add snapshot tests in a separate file
schroedk Mar 20, 2025
f42e776
Skip not working test
schroedk Mar 20, 2025
df39484
WIP: DO NOT MERGE!!!: simplify test run in ci for faster iteration
schroedk Mar 20, 2025
dfa60ad
Transform tensor to list
schroedk Mar 20, 2025
1186823
Add *.npz files to LFS
schroedk Mar 20, 2025
f2e5a8e
replace inference.build_posterior with ScorePosterior
vagechirkov Mar 20, 2025
293f91a
Add pytests-regressions to dev dependencies
schroedk Mar 20, 2025
629196e
Use ndarrays_regression to check the output of the test_npse_snapshot…
schroedk Mar 20, 2025
d6efca6
Update .gitattributes
schroedk Mar 20, 2025
e562c8a
Add pytest-regression snapshot files
schroedk Mar 20, 2025
5c354de
Merge remote-tracking branch 'origin/speed-up-tests-with-fixtures' in…
schroedk Mar 20, 2025
76d23dd
Enable lfs in ci checkout step
schroedk Mar 20, 2025
0e21be0
Update test runtime file
schroedk Mar 20, 2025
3869a2b
Remove the tolerance from the snapshot test
schroedk Mar 20, 2025
f0e23fd
Set tolerance for snapshot test in test_snapshot.py
schroedk Mar 20, 2025
44f7b91
Increase tolerance for snapshot test in test_snapshot.py
schroedk Mar 20, 2025
72b9c64
Reduce number of steps in sampling, reduce number of simulations in s…
schroedk Mar 20, 2025
1efac10
Update test run times
schroedk Mar 20, 2025
f88ffab
Update snapshots
schroedk Mar 20, 2025
a721184
Revert "WIP: DO NOT MERGE!!!: simplify test run in ci for faster iter…
schroedk Mar 20, 2025
d74399f
refactor helper functions
vagechirkov Mar 21, 2025
7350ccf
run snapshot on 1 trial
vagechirkov Mar 21, 2025
d23c96f
timeout tests that are taking more than 60s to run
vagechirkov Mar 21, 2025
2fc2925
files for snapshot tests
vagechirkov Mar 21, 2025
830f553
Remove obsolete snapshot file
schroedk Mar 23, 2025
ad53690
Add configurable data directories for regression tests, mirror test f…
schroedk Mar 23, 2025
a6f761b
Delete obsolete regression files from the repository
schroedk Mar 23, 2025
a3fbef2
Move .test_duration to git lfs
schroedk Mar 23, 2025
3cc04f9
Refactor linearGaussian_npse_test.py:
schroedk Mar 23, 2025
67ae45a
Add regression files for npse snapshots
schroedk Mar 23, 2025
50187ce
Remove obsolete test file
schroedk Mar 23, 2025
fd97749
Exclude cases from regression tests, which show non-determinism
schroedk Mar 23, 2025
ade4b06
Remove syrupy dependency
schroedk Mar 23, 2025
0e9d4e6
Add .gitignore to __regressions__ directory
schroedk Mar 23, 2025
2e46877
Make dataclasses frozen to ensure consistent hash and equality evalua…
schroedk Mar 23, 2025
7276ad4
Refactor npse tests:
schroedk Mar 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*_gitlfs.* filter=lfs diff=lfs merge=lfs -text
*.ipynb linguist-documentation
tests/**/*.npz filter=lfs diff=lfs merge=lfs -text
.test_durations filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: false
lfs: true

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
Expand Down
3,102 changes: 3 additions & 3,099 deletions .test_durations

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ dev = [
"pytest-harvest",
"pytest-split",
"torchtestcase",
"pytest-regressions",
"pytest-timeout"
]

[project.urls]
Expand Down Expand Up @@ -145,6 +147,8 @@ markers = [
"benchmark: marks test that are soley for benchmarking purposes"
]
xfail_strict = true
datadir = "tests/__regressions__"
original_datadir = "tests/__regressions__"

# Pyright configuration
[tool.pyright]
Expand Down
1 change: 1 addition & 0 deletions tests/__regressions__/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.obtained.npz
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Loading