-
Notifications
You must be signed in to change notification settings - Fork 0
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
Query about order of timings #2
Comments
Also is there a way to reset the cache, so we can start from fresh timings using the same names? Tried
But seems to cause key errors doing so |
@bml1g12 Sorry for super-late response here 😭 I think the counter-intuitive part comes from the "caching" nature of if self._summary is None:
self.summarize() # this re-generates self._summary
return self._summary So if you refer to the I'd highly recommend either keeping the 1st approach (run and then analyse stats), or if you need to calculate intermediate stats, directly call If you don't care about penalty in your I've added a a following docs note on the @property
def summary(self) -> t.Dict[str, t.Any]:
"""Return a collection of statistics for the timings in this group.
Calculate statistics if not already calculated, and use cached values otherwise.
"""
... |
Love this library @mbdevpl . Was just playing around with some benchmarks for an article I plan to write on Python multiprocessing + numpy arrays, and I ran into some unintuitive behaviour:
This code works. But rearranging the same code to:
Returns
Whereby I am using this function.
Not sure if it is a bug or expected behaviour, but it seems that a requirement is that all summary metrics are calculated after all timings are complete, is that the case, if so might best to add to the docs.
The text was updated successfully, but these errors were encountered: