Skip to navigation

nemo_gym.agent_utils.task_timeout

View as Markdown

Resolve the per-task agent budget carried by materialized task rows.

Module Contents

Functions

NameDescription
resolve_agent_timeoutCap a positive, finite task timeout by the configured execution ceiling.

Data

AGENT_TIMEOUT_METADATA_KEY

LOG

API

nemo_gym.agent_utils.task_timeout.resolve_agent_timeout(
metadata: collections.abc.Mapping[str, str] | None,
ceiling: float
) -> float

Cap a positive, finite task timeout by the configured execution ceiling.

Missing or invalid metadata keeps the configured timeout, matching Hermes. The execution budget includes model and tool calls. Their individual timeouts, and the separate setup and cleanup limits, remain unchanged.

nemo_gym.agent_utils.task_timeout.AGENT_TIMEOUT_METADATA_KEY = 'agent_timeout_sec'
nemo_gym.agent_utils.task_timeout.LOG = logging.getLogger(__name__)