Closed PaulJonasJost closed 1 month ago
Attention: Patch coverage is 66.66667%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 84.55%. Comparing base (
cacd525
) to head (d578fa5
). Report is 7 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
pypesto/result/optimize.py | 66.66% | 1 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
if free_indices were interpreted as floats, we could not use them to subset the array. Happened to me after loading results from hdf5
Thanks. However, I'd prefer fixing the root of the issue, rather than the symptom. I.e., ensuring free_indices
is always int
.
if free_indices were interpreted as floats, we could not use them to subset the array. Happened to me after loading results from hdf5
Thanks. However, I'd prefer fixing the root of the issue, rather than the symptom. I.e., ensuring
free_indices
is alwaysint
.
So the save function should have taken care of this. Also Problem
defines their free indices as int
, therefore I am not sure where it went wrong except for the integration of free indices to the Optimizer result guaranteed it here, but will have one more look whether anything else might be missing. Will still leave it in the summary as well as a second safety measure.
not sure where it went wrong
I don't see either how this could become float
, except for the case of empty x_free_indices
, which would be fixed by adding dtype=int
to https://github.com/ICB-DCM/pyPESTO/blob/872e2530e55c944ee55f0e38bdbdb479d0c7fba5/pypesto/result/optimize.py#L198.
@dweindl could you re-review please :) added the dtype
argument but still kept the change before as an additional safety measure.
still kept the change before as an additional safety measure
I don't think it makes sense to have it there. Either we specify and ensure that
problem.x_free_indices
containsint
and assume that everywhere, or we specify it to be of any type of number and treat it accordingly everywhere.
IMO, it does make sense to do this here, as we only now start to ensure it is int, but for backwards compatibility or previous results, it might be good to have this as an additional safety net?
Closing this for now.
if free_indices were interpreted as floats, we could not use them to subset the array. Happened to me after loading results from hdf5