-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add interface class member to Benchmark class #20
Conversation
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.
That's a great test case!
Let's move Interface
to the nnbench.types
top-level though - we don't (presumably) need to use it anywhere except the Benchmark
dataclass for now.
Sorry I forgot, you also need to add class Benchmark:
"""
...
interface: Interface
The benchmark function's interface, set in the post-init hook.
"""
...
interface: Interface = field(init=False, repr=False) |
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.
Nice job! You can merge directly after attaching the interface to the Benchmark
.
Add an
Interface
immutable dataclass to theBenchmark
class that contains the signature information of a function. I.e.: