add max_steps_per_run to task (#297)

Co-authored-by: Shuchang Zheng <wintonzheng0325@gmail.com>
This commit is contained in:
Kerem Yilmaz
2024-05-11 14:13:21 -07:00
committed by GitHub
parent 6feddbde6a
commit 270642c60c
8 changed files with 39 additions and 0 deletions

View File

@@ -136,6 +136,7 @@ class ForgeAgent:
workflow_run_id=workflow_run.workflow_run_id,
order=task_order,
retry=task_retry,
max_steps_per_run=task_block.max_steps_per_run,
error_code_mapping=task_block.error_code_mapping,
)
LOG.info(
@@ -1116,6 +1117,7 @@ class ForgeAgent:
override_max_steps_per_run = context.max_steps_override if context else None
max_steps_per_run = (
override_max_steps_per_run
or task.max_steps_per_run
or organization.max_steps_per_run
or SettingsManager.get_settings().MAX_STEPS_PER_RUN
)