-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conversation
Fixes `Ensemble.from_optimization_{history,endpoints}`, which incorrectly assumed that `OptimizerResult.id` is always convertible to `int`. Closes ICB-DCM#1349.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ 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. |
There was a problem hiding this 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
pyPESTO/pypesto/result/optimize.py
Lines 335 to 339 in 34e89b3
new_ids = { | |
prefix + identifier | |
for identifier in optimize_result.id | |
if identifier is not None | |
} |
pyPESTO/pypesto/optimize/util.py
Lines 169 to 171 in 34e89b3
if ids is None: | |
i = 0 | |
ids = [str(j) for j in range(0, n_starts)] |
There was a problem hiding this 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks 🙏🏼
Fixes
Ensemble.from_optimization_{history,endpoints}
, which incorrectly assumed thatOptimizerResult.id
is always convertible toint
.Closes #1349.