Optional get_example_inputs method of model#38
Conversation
danielfleischer
left a comment
There was a problem hiding this comment.
Thank you for the PR! It is a good idea to add. Two things we'd like to see:
- Make sure it's callable
method = getattr(obj, "greet", None)
if callable(method):
result = method()
- Please add a sentence in the
writing-the-model-classsection in the README about custom initialization and mention this method.
Thanks. I have updated per your comments. Please review again. |
|
I also fixed an issue in |
|
Shall we adopt the same formatting style used in the KernelBench dataset? |
Are you saying this PR functionality is the same as what |
It looks like BTW, can we make the spec file optional when the KernelBench problem format is given? I think every spec we need is already in the |
This PR allows users to write an optional
get_example_inputsmethod of the wrapper model so that it generates desired input tensors. It is useful when the inputs are complex and cannot be simply generated by random numbers and a common dtype.If this method is not provided, Xe-Forge still generates random inputs as before.
Users should remove this method if it is not needed.