Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 066cb43 commit 8514d86Copy full SHA for 8514d86
1 file changed
devtools/etrecord/_etrecord.py
@@ -162,7 +162,7 @@ def _get_reference_outputs(
162
163
def _get_representative_inputs(
164
bundled_program: BundledProgram,
165
-) -> List[ProgramInput]:
+) -> Optional[List[ProgramInput]]:
166
"""
167
Extracts out the inputs from the bundled program, keyed by the method names.
168
@@ -175,7 +175,9 @@ def _get_representative_inputs(
175
# Get first example input from the forward method
176
test_case = method_test_suite.test_cases[0]
177
return test_case.inputs
178
- raise ValueError("No 'forward' method found in the bundled program.")
+
179
+ # If the forward method is not defined, return None to indicate that there are no representative inputs for the model.
180
+ return None
181
182
183
def generate_etrecord(
0 commit comments