You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defining and parametrizing benchmarks by applying decorators (@benchmark,@parametrize,@product) - motivation, behavior, and one usage example for each.
The text was updated successfully, but these errors were encountered:
Maciej818
changed the title
Defining and parametrizing benchmarks by applying decorators (@benchmark,@parametrize,@product) - motivation, behavior, and one usage example for each.
Add user guide: Best practices on modularizing benchmark code
Jan 30, 2024
Maciej818
changed the title
Add user guide: Best practices on modularizing benchmark code
Add user guide: Defining and parametrizing benchmarks by applying decorators
Jan 30, 2024
(The arguments in the decorator dictionaries should match the parametrized benchmark function's typing, so the arguments should be np.array([1, 2, 3]), np.array([4, 5, 6]), ..., but you got it right conceptually.)
File "C:\Users\Public\Documents\Avinash\Projects\OpenSource\nnbench\test.py", line 65, in <module>
result = r.run("__main__", params={"model": model})#, "y_pred": y_pred, "y_test": y_test})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Public\Documents\Avinash\Projects\OpenSource\nnbench\src\nnbench\runner.py", line 218, in run
_check(dparams, self.benchmarks)
File "C:\Users\Public\Documents\Avinash\Projects\OpenSource\nnbench\src\nnbench\runner.py", line 84, in _check
raise ValueError(f"missing value for required parameter {name!r}")
ValueError: missing value for required parameter 'y_test'
I believe the code expects me to add y_pred and y_test as well, but they are defined for parameterize decorator. What is the expected behavior here? result = r.run("__main__", params={"model": model, "y_pred": y_pred, "y_test": y_test})
Add user guide to the documentation:
@benchmark,@parametrize,@product)
- motivation, behavior, and one usage example for each.The text was updated successfully, but these errors were encountered: