-
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
Extended Amici history #1263
Extended Amici history #1263
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #1263 +/- ##
===========================================
+ Coverage 84.33% 84.39% +0.06%
===========================================
Files 151 152 +1
Lines 12333 12420 +87
===========================================
+ Hits 10401 10482 +81
- Misses 1932 1938 +6 ☔ 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.
Looks good 👍 I'm not familiar with the differences between the implementations for CSV and HDF5 history, so some of my feedback might be trivial.
@staticmethod | ||
def _simulation_to_values(x, result, used_time): | ||
values = Hdf5History._simulation_to_values(x, result, used_time) |
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.
Here it's @staticmethod
, but n CsvAmiciHistory
it's super()...
. Just curious, why?
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.
In CsvHistory
it's not static as it uses dynamically updated attributes (e.g. _n_fval
), in Hdf5History
it's not the case, so I made the methods static both in Hdf5History
and Hdf5AmiciHistory
.
pypesto/history/amici.py
Outdated
def _trace_columns(self) -> list[tuple]: | ||
columns = super()._trace_columns() | ||
return columns + [ | ||
(c, np.nan) | ||
for c in [ | ||
CPU_TIME_TOTAL, | ||
PREEQ_CPU_TIME, | ||
PREEQ_CPU_TIME_B, | ||
POSTEQ_CPU_TIME, | ||
POSTEQ_CPU_TIME_B | ||
] | ||
] |
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.
Should this also exist for Hdf5AmiciHistory
?
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.
This is for _init_trace
which is only needed in Csv case, I think
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
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.
Thx
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
Co-authored-by: Fabian Fröhlich <fabian.frohlich@crick.ac.uk>
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.
Thanks :)
assert np.all( | ||
history.get_cpu_time_total_trace() | ||
>= history.get_preeq_time_trace() | ||
) | ||
assert np.all( | ||
history.get_cpu_time_total_trace() | ||
>= history.get_preeq_timeB_trace() | ||
) | ||
assert np.all( | ||
history.get_cpu_time_total_trace() | ||
>= history.get_posteq_time_trace() | ||
) | ||
assert np.all( | ||
history.get_cpu_time_total_trace() | ||
>= history.get_posteq_timeB_trace() | ||
) |
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.
Wouldn't a better assertion actually be to assert the sum over the different traces to be smaller equal than the total time?
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.
complementary
No description provided.