Skip to content

Commit 8514d86

Browse files
authored
remove raied error to solve ci issue.
Differential Revision: D75983673 Pull Request resolved: #11376
1 parent 066cb43 commit 8514d86

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

devtools/etrecord/_etrecord.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def _get_reference_outputs(
162162

163163
def _get_representative_inputs(
164164
bundled_program: BundledProgram,
165-
) -> List[ProgramInput]:
165+
) -> Optional[List[ProgramInput]]:
166166
"""
167167
Extracts out the inputs from the bundled program, keyed by the method names.
168168
"""
@@ -175,7 +175,9 @@ def _get_representative_inputs(
175175
# Get first example input from the forward method
176176
test_case = method_test_suite.test_cases[0]
177177
return test_case.inputs
178-
raise ValueError("No 'forward' method found in the bundled program.")
178+
179+
# If the forward method is not defined, return None to indicate that there are no representative inputs for the model.
180+
return None
179181

180182

181183
def generate_etrecord(

0 commit comments

Comments
 (0)