-
Notifications
You must be signed in to change notification settings - Fork 535
Add wall-clock timeout support to MultiTurnEnv #1166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -618,6 +618,7 @@ async def init_state( | |
| total_ms=0.0, | ||
| start_time=time.time(), | ||
| ) | ||
| state["_start_perf_counter"] = time.perf_counter() | ||
| return state | ||
|
|
||
| @abstractmethod | ||
|
|
@@ -663,8 +664,8 @@ async def _render_stop(self, state: State, condition) -> bool: | |
| return False | ||
|
|
||
| async def _render_timing(self, state: State): | ||
| start_time = state["timing"]["start_time"] | ||
| end_time = time.time() | ||
| start_time = state.get("_start_perf_counter", state["timing"]["start_time"]) | ||
| end_time = time.perf_counter() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fallback mixes incompatible clock sources, silently breaking timeoutsMedium Severity The fallback in Additional Locations (2)Reviewed by Cursor Bugbot for commit f4ea7c9. Configure here. |
||
| state["timing"]["generation_ms"] = (end_time - start_time) * 1000 | ||
| state["timing"]["total_ms"] = (end_time - start_time) * 1000 | ||
|
|
||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.