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

kwargs hashing fails in benchmark.evaluate #156

Closed
robsdavis opened this issue Mar 23, 2023 · 0 comments · Fixed by #157
Closed

kwargs hashing fails in benchmark.evaluate #156

robsdavis opened this issue Mar 23, 2023 · 0 comments · Fixed by #157
Assignees

Comments

@robsdavis
Copy link
Contributor

Description

Benchmarks.Evaluate accepts a pathlib.Path object for workspace which breaks json.dumps() call in kwargs hashing due to TypeError: Object of type PosixPath is not JSON serializable

How to Reproduce

import json
from pathlib import Path

# benchmark.__init__: 52
workspace = Path('workspace')
# benchmark.__init__: 124
kwargs = {'workspace':workspace}
# benchmark.__init__: 114
kwargs_hash_raw = json.dumps(kwargs, sort_keys=True).encode()

Expected Behavior

Produces kwargs hash without error, even if pathlib.Path object passed to workspace.

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 a pull request may close this issue.

1 participant