Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

fix #1039; refactor diagnostics plotting#1212

Merged
janfb merged 3 commits intomainfromrefactor-sbc-plotting
Aug 8, 2024
Merged

Conversation

janfb
Copy link
Contributor

@janfbjanfb commentedAug 6, 2024
edited
Loading

@janfbjanfb changed the titleRefactor diagnostics plottingfix #1039; refactor diagnostics plottingAug 6, 2024
@codecovCodecov
Copy link

codecovbot commentedAug 6, 2024
edited
Loading

Codecov Report

Attention: Patch coverage is95.00000% with1 line in your changes missing coverage. Please review.

Project coverage is 76.27%. Comparing base(724ea4f) to head(1bb0298).

FilesPatch %Lines
sbi/analysis/plot.py95.00%1 Missing⚠️
Additional details and impacted files
@@            Coverage Diff             @@##             main    #1212      +/-   ##==========================================- Coverage   84.57%   76.27%   -8.30%==========================================  Files          97       97                Lines        7677     7677              ==========================================- Hits         6493     5856     -637- Misses       1184     1821     +637
FlagCoverage Δ
unittests76.27% <95.00%> (-8.30%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

FilesCoverage Δ
sbi/diagnostics/tarp.py82.92% <ø> (+4.35%)⬆️
sbi/analysis/plot.py68.16% <95.00%> (+2.00%)⬆️

... and23 files with indirect coverage changes

@janfbjanfb requested review frompsteinb andmichaeldeistler and removed request formichaeldeistlerAugust 7, 2024 08:12
@psteinb
Copy link
Collaborator

I checkout the branch and installed it in a vanilla environment. Looks like some dependencies (``tensorboard`) give trouble:

$ python -m pytest ./tests/tarp_test.py ================================================================================== ERRORS ===================================================================================____________________________________________________________________ ERROR collecting tests/tarp_test.py ____________________________________________________________________tests/tarp_test.py:7: in <module>    from sbi.analysis.plot import plot_tarpsbi/analysis/__init__.py:19: in <module>    from sbi.analysis.tensorboard_output import list_all_logs, plot_summarysbi/analysis/tensorboard_output.py:15: in <module>    from tensorboard.backend.event_processing.event_accumulator import (py312/lib64/python3.12/site-packages/tensorboard/backend/event_processing/event_accumulator.py:24: in <module>    from tensorboard.backend.event_processing import event_file_loaderpy312/lib64/python3.12/site-packages/tensorboard/backend/event_processing/event_file_loader.py:21: in <module>    from tensorboard import dataclass_compatpy312/lib64/python3.12/site-packages/tensorboard/dataclass_compat.py:33: in <module>    from tensorboard.plugins.hparams import metadata as hparams_metadatapy312/lib64/python3.12/site-packages/tensorboard/plugins/hparams/metadata.py:32: in <module>    NULL_TENSOR = tensor_util.make_tensor_proto(py312/lib64/python3.12/site-packages/tensorboard/util/tensor_util.py:405: in make_tensor_proto    numpy_dtype = dtypes.as_dtype(nparray.dtype)py312/lib64/python3.12/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:677: in as_dtype    if type_value.type == np.string_ or type_value.type == np.unicode_:py312/lib64/python3.12/site-packages/numpy/__init__.py:397: in __getattr__    raise AttributeError(E   AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.. Did you mean: 'strings'?========================================================================== short test summary info ==========================================================================ERROR tests/tarp_test.py - AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.. Did you mean: 'strings'?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1 error in 0.36s

@psteinb
Copy link
Collaborator

Seems to be the same problem as reported in#1189

@psteinb
Copy link
Collaborator

I downgraded tonumpy<2 and now the tests run.

Copy link
Collaborator

@psteinbpsteinb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

All tests are passing on my box. There is one little comment I am concerned about in the notebook.

@janfb
Copy link
ContributorAuthor

I downgraded tonumpy<2 and now the tests run.

I experienced this only when usingpython3.9. When using3.8 it works because it installsnumpy<2 anyways, and for higher python versions it installs the appropriate package versions that fix the problem.

For now, I think there is nothing we can do about it, unless we really want to pinnumpy<2.

@janfbjanfbforce-pushed therefactor-sbc-plotting branch from2892c5a to09e1fe4CompareAugust 8, 2024 09:25
@psteinb
Copy link
Collaborator

I encountered this problem with python 3.12 with packages coming straight from pypi.

@psteinbpsteinb self-requested a reviewAugust 8, 2024 11:43
@janfb
Copy link
ContributorAuthor

I encountered this problem with python 3.12 with packages coming straight from pypi.

I am not able to reproduce this, e.g., using:

conda create -n py312 python=3.12conda activate py312pip install sbicd sbipytest tests/sbc_test.py

@janfbjanfbforce-pushed therefactor-sbc-plotting branch from09e1fe4 to1bb0298CompareAugust 8, 2024 13:52
Copy link
Collaborator

@psteinbpsteinb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM!

janfb reacted with thumbs up emoji
@janfbjanfb merged commit366b67f intomainAug 8, 2024
6 checks passed
@janfbjanfb deleted the refactor-sbc-plotting branchAugust 8, 2024 14:52
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@psteinbpsteinbpsteinb approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@janfb@psteinb

[8]ページ先頭

©2009-2025 Movatter.jp