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

Ensembles: don't expect OptimizerResult.id to be convertible to int #1351

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Apr 2, 2024

Fixes Ensemble.from_optimization_{history,endpoints}, which incorrectly assumed that OptimizerResult.id is always convertible to int.

Closes #1349.

Fixes `Ensemble.from_optimization_{history,endpoints}`, which incorrectly assumed that `OptimizerResult.id` is always convertible to `int`.

Closes ICB-DCM#1349.
@codecov-commenter
Copy link

codecov-commenter commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.03%. Comparing base (ace9b8b) to head (e6e45d3).

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

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1351      +/-   ##
===========================================
- Coverage    84.22%   83.03%   -1.20%     
===========================================
  Files          157      157              
  Lines        12870    12870              
===========================================
- Hits         10840    10686     -154     
- Misses        2030     2184     +154     

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

@dweindl dweindl marked this pull request as ready for review April 2, 2024 17:58
Copy link
Member

@dilpath dilpath left a comment

Choose a reason for hiding this comment

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

Agreed, looks like the IDs are used as a string elsewhere too

new_ids = {
prefix + identifier
for identifier in optimize_result.id
if identifier is not None
}

if ids is None:
i = 0
ids = [str(j) for j in range(0, n_starts)]

Copy link
Contributor

@m-philipps m-philipps left a comment

Choose a reason for hiding this comment

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

Looks fine to me, thanks

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.

LGTM, thanks 🙏🏼

@dweindl dweindl merged commit b50bc8f into ICB-DCM:develop Apr 3, 2024
18 checks passed
@dweindl dweindl deleted the fix_1349_ens_id branch April 3, 2024 08:04
This was referenced Apr 9, 2024
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.

Ensemble.from_optimization_{history,endpoints} assumes that OptimizerResult.id is always convertible to int
5 participants