Skip to content
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

ARROW-13073: [Developer] archery benchmark list: unexpected keyword 'benchmark_filter' #10528

Closed
wants to merge 1 commit into from

Conversation

dianaclarke
Copy link
Contributor

$ archery benchmark list
Traceback (most recent call last):
  File "/Users/diana/envs/arrow/bin/archery", line 33, in <module>
    sys.exit(load_entry_point('archery', 'console_scripts', 'archery')())
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/diana/workspace/arrow/dev/archery/archery/cli.py", line 430, in benchmark_list
    conf = CppBenchmarkRunner.default_configuration(
  File "/Users/diana/workspace/arrow/dev/archery/archery/benchmark/runner.py", line 118, in default_configuration
    return CppConfiguration(
TypeError: __init__() got an unexpected keyword argument 'benchmark_filter'

@github-actions
Copy link

Copy link
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also can fix the option (without removing it) by adding benchmark_filter and suite_filter as arguments to benchmark_list (so they don't show up in kwargs and won't be passed to CppConfiguration) and then you can add them to the instantiation of the runner like it does here.

This will allow the error to go away. However, I notice that the CppBenchmarkRunner doesn't factor benchmark_filter into its list_benchmarks command so this won't error but it also won't work as advertised. From a quick glance it appears JavaBenchmarkRunner acts the same.

This is a long-winded (:smile:) way of saying I approve this approach. Since neither benchmark runner actually supports listing filtered benchmarks it's probably better to remove the options than it is to partially fix them. If someone decides they want the functionality then it can be implemented then.

Copy link
Contributor

@cyb70289 cyb70289 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@cyb70289 cyb70289 closed this in 6865a7b Jun 16, 2021
@dianaclarke
Copy link
Contributor Author

Thanks @cyb70289 & @westonpace! ❤️

@cyb70289
Copy link
Contributor

Thanks @dianaclarke for fixing the bug and @westonpace for careful review.
I only pressed the return key several times :)

sjperkins pushed a commit to sjperkins/arrow that referenced this pull request Jun 23, 2021
…benchmark_filter'

```
$ archery benchmark list
Traceback (most recent call last):
  File "/Users/diana/envs/arrow/bin/archery", line 33, in <module>
    sys.exit(load_entry_point('archery', 'console_scripts', 'archery')())
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/Users/diana/envs/arrow/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/diana/workspace/arrow/dev/archery/archery/cli.py", line 430, in benchmark_list
    conf = CppBenchmarkRunner.default_configuration(
  File "/Users/diana/workspace/arrow/dev/archery/archery/benchmark/runner.py", line 118, in default_configuration
    return CppConfiguration(
TypeError: __init__() got an unexpected keyword argument 'benchmark_filter'
```

Closes apache#10528 from dianaclarke/ARROW-13073

Authored-by: Diana Clarke <diana.joan.clarke@gmail.com>
Signed-off-by: Yibo Cai <yibo.cai@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants