Skip to content
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

Visualize: fix flatten of observable mapping with one observable #1515

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

Doresic
Copy link
Contributor

@Doresic Doresic commented Nov 20, 2024

Observable mapping visualization failed in the case of only one observable. Fixed to account for the case of one observable.

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.32%. Comparing base (010e93a) to head (c1ed00c).

Files with missing lines Patch % Lines
pypesto/visualize/observable_mapping.py 33.33% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1515      +/-   ##
===========================================
+ Coverage    82.76%   84.32%   +1.55%     
===========================================
  Files          163      163              
  Lines        14016    14013       -3     
===========================================
+ Hits         11601    11816     +215     
+ Misses        2415     2197     -218     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stephanmg
Copy link
Contributor

stephanmg commented Nov 22, 2024

@Doresic Looks good to me.

Copy link
Contributor

@vwiela vwiela left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the fix.

Copy link
Collaborator

@PaulJonasJost PaulJonasJost left a comment

Choose a reason for hiding this comment

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

Should add a test for future cases probably

@dweindl
Copy link
Member

dweindl commented Nov 27, 2024

I think there are two more such cases in pypesto/visualize/observable_mapping.py and one in pypesto/visualize/ordinal_categories.py.

@Doresic Doresic requested a review from stephanmg as a code owner November 28, 2024 14:47
@Doresic Doresic requested a review from dweindl December 2, 2024 12:10
# Set seed for reproducibility.
np.random.seed(0)
optimizer = pypesto.optimize.ScipyOptimizer(
method="L-BFGS-B", options={"maxiter": 10}
Copy link
Member

Choose a reason for hiding this comment

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

For just testing that visualization does not produce an error, a single iteration would suffice, right?

@Doresic Doresic enabled auto-merge December 2, 2024 12:57
Copy link
Contributor

@stephanmg stephanmg left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. From my side this can be merged.

@Doresic Doresic added this pull request to the merge queue Dec 2, 2024
Merged via the queue into develop with commit 9a20cd8 Dec 2, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants