Skip to content
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

Enforce match timeouts when calling agents #315

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Enforce match timeouts when calling agents #315

merged 2 commits into from
Nov 18, 2024

Conversation

bovard
Copy link
Member

@bovard bovard commented Nov 18, 2024

Before we would wait forever for a agent to return, THEN check and enforce the timeouts. If the agent died we would hang forever waiting for it.

Verified that this works locally:

[{"action": "", "info": {}, "observation": {"board": "rnbqkbnr/pppppppp/8/8/7P/8/PPPPPPP1/RNBQKBNR b KQkq h3 0 1", "mark": "white", "opponentRemainingOverageTime": 10, "remainingOverageTime": 10, "step": 2}, "reward": 0, "status": "DONE"}, {"action": null, "info": {}, "observation": {"board": "rnbqkbnr/pppppppp/8/8/7P/8/PPPPPPP1/RNBQKBNR b KQkq h3 0 1", "mark": "black", "opponentRemainingOverageTime": 10, "remainingOverageTime": -10.048537999999997}, "reward": null, "status": "TIMEOUT"}]

remainingOverageTime is -10 seconds and status is TIMEOUT which is what should be expected

@bovard bovard requested review from djherbis and lipovetz November 18, 2024 17:53
Copy link
Member

@lipovetz lipovetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

kaggle_environments/agent.py Outdated Show resolved Hide resolved
@bovard bovard merged commit 1386e27 into master Nov 18, 2024
3 checks passed
@bovard bovard deleted the enforce-timeouts branch November 18, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants