Skip to content

Commit 8d7ecb5

Browse files
authored
[ViPPET] Fix max_runtime propagation in density tests (open-edge-platform#1888)
1 parent b5d3da5 commit 8d7ecb5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tools/visual-pipeline-and-platform-evaluation-tool/vippet/benchmark.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ def __repr__(self):
5454
class Benchmark:
5555
"""Benchmarking class for pipeline evaluation."""
5656

57-
def __init__(self):
57+
def __init__(self, max_runtime: float = 0):
5858
self.best_result = None
59-
# Initialize PipelineRunner in normal mode with max_runtime=0 (run until EOS)
60-
self.runner = PipelineRunner(mode="normal", max_runtime=0)
59+
# Initialize PipelineRunner in normal mode with optional max_runtime for each run
60+
self.runner = PipelineRunner(mode="normal", max_runtime=max_runtime)
6161
self.logger = logging.getLogger(__name__)
6262

6363
@staticmethod

tools/visual-pipeline-and-platform-evaluation-tool/vippet/managers/tests_manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ def _execute_density_test(
454454
)
455455

456456
# Initialize Benchmark
457-
benchmark = Benchmark()
457+
benchmark = Benchmark(
458+
max_runtime=internal_spec.execution_config.max_runtime
459+
)
458460

459461
# Store benchmark runner for this job so that a future extension could cancel it.
460462
with self._jobs_lock:

0 commit comments

Comments
 (0)