Skip to content

Commit 615c14e

Browse files
authored
Add _initrequest for pytest-retry to avoid AttributeError for sharktank benchmark tests (iree-org#97)
Add _initrequest for pytest-retry to avoid AttributeError for sharktank tests. Sometimes the CI fails with an AttributeError: ``` INTERNALERROR> AttributeError: 'ModelBenchmarkRunItem' object has no attribute '_initrequest' ---------------------------- live log sessionfinish ---------------------------- INFO conftest:conftest.py:99 Pytest benchmark test session has finished ``` Signed-off-by: aviator19941 <avinash.sharma@amd.com>
1 parent 253da43 commit 615c14e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sharktank_models/benchmarks/model_benchmark_run.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,7 @@ def repr_failure(self, excinfo):
307307

308308
def reportinfo(self):
309309
return self.path, 0, f"usecase: {self.name}"
310+
311+
# Defining this for pytest-retry to avoid an AttributeError.
312+
def _initrequest(self):
313+
pass

0 commit comments

Comments
 (0)