-
Notifications
You must be signed in to change notification settings - Fork 11
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
Stop running use_legacy_dataset=true
for wide-benchmark
#156
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,26 +18,21 @@ class WideDataframeBenchmark(_benchmark.Benchmark): | |
""" | ||
|
||
name = "wide-dataframe" | ||
valid_cases = ( | ||
["use_legacy_dataset"], | ||
["true"], | ||
["false"], | ||
) | ||
# 'use_legacy_dataset' used to be a meaningful benchmark parameter, but since that | ||
# behavior is deprecated we only keep it around to preserve benchmark history. | ||
valid_cases = (["use_legacy_dataset"], ["false"]) | ||
|
||
def run(self, case=None, **kwargs): | ||
path = os.path.join(_sources.temp_dir, "wide.parquet") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A bit below, on line 36, you can remove the We can keep the parametrization to preserve the history of the benchmark, but in the benchmark code itself we can now remove any usage of it (we will also deprecate/remove that keyword at some point, and then this is already ready for that) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great idea! |
||
self._create_if_not_exists(path) | ||
|
||
for case in self.get_cases(case, kwargs): | ||
(legacy,) = case | ||
# not using actual booleans... see hacks.py in conbench | ||
legacy = True if legacy == "true" else False | ||
tags = self.get_tags(kwargs) | ||
f = self._get_benchmark_function(path, legacy) | ||
f = self._get_benchmark_function(path) | ||
yield self.benchmark(f, tags, kwargs, case) | ||
|
||
def _get_benchmark_function(self, path, legacy): | ||
return lambda: pandas.read_parquet(path, use_legacy_dataset=legacy) | ||
def _get_benchmark_function(self, path): | ||
return lambda: pandas.read_parquet(path) | ||
|
||
def _create_if_not_exists(self, path): | ||
if not pathlib.Path(path).exists(): | ||
|
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.
Maybe add a comment that this parameter is only kept for historical reasons, but is further ignored nowadays?
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.
done, thanks!