Skip to content

Commit 209c8d0

Browse files
committed
ensure timeout is int (For the 3rd time?)
1 parent aece13b commit 209c8d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/agentlab/experiments/exp_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def _episode_timeout(exp_arg: ExpArgs, avg_step_timeout=60):
4848
@contextmanager
4949
def timeout_manager(seconds: int = None):
5050
"""Context manager to handle timeouts."""
51+
52+
seconds = max(1, int(seconds)) # make sure seconds is at least 1
53+
5154
if seconds is None or sys.platform == "win32":
5255
try:
5356
logger.warning("Timeouts are not supported on Windows.")

0 commit comments

Comments
 (0)