-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: ASV HDFStore benchmark #18641
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
CLN: ASV HDFStore benchmark #18641
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18641 +/- ##
==========================================
- Coverage 91.59% 91.57% -0.02%
==========================================
Files 153 153
Lines 51221 51221
==========================================
- Hits 46917 46908 -9
- Misses 4304 4313 +9
Continue to review full report at Codecov.
|
os.remove(f) | ||
except: | ||
pass | ||
os.remove(self.f) |
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.
it's not needed to keep the try .. except here?
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.
(and I seem to remember another PR recently related to this 'remove' ?)
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.
(and I seem to remember another PR recently related to this 'remove' ?)
@jorisvandenbossche : Yes, you are correct, as that was I who made the comment 😉 .
@mroeschke : revert this part of your changes to restore the try-except
. Windows is notorious for surprising users on os.remove
. No reason to crash benchmarks (instead of failing gracefully) for something like that.
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.
@jorisvandenbossche : What do you think about just moving that os.remove
-wrapper function pandas_vb_common
? It's not really an instance method but rather a utility from which a lot of classes could benefit.
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.
Or put it in a Benchmark
base class to inherit from, both are ok to me (if we do the base class, we could also put the goal_time = 0.2
there instead of repeating it everywhere
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.
I'm probably -0 on abstracting goal_time
into a base class. It might be a little nicer but adds some indirection to the benchmarks that I'm uncertain about.
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.
What do you mean with "adds some indirection to the benchmarks" ?
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.
BTW, it is what scipy does: https://github.com/scipy/scipy/blob/master/benchmarks/benchmarks/common.py#L13
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.
note we already have a base class for this _BenchTeardown
(PR was pretty recent) in io_bench.py
. So I would simply move this into a top-level class you can inherit from.
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.
What do you mean with "adds some indirection to the benchmarks" ?
Just that it wouldn't be immediately clear what the goal time for the benchmarks would be.
os.remove(f) | ||
except: | ||
pass | ||
os.remove(self.f) |
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.
note we already have a base class for this _BenchTeardown
(PR was pretty recent) in io_bench.py
. So I would simply move this into a top-level class you can inherit from.
333202f
to
db44794
Compare
Hello @mroeschke! Thanks for updating the PR.
|
Thanks for the guidance, all. Created a new base class, |
Thanks! |
An
HDFStore.info()
benchmark was added in #16666, but the benchmark fails (even on master). I can create a new issue for this unless there's an obvious fix I am not seeing.