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

#385 Add limits #415

Merged
merged 17 commits into from
Feb 3, 2025
Merged

#385 Add limits #415

merged 17 commits into from
Feb 3, 2025

Conversation

mzuenni
Copy link
Collaborator

@mzuenni mzuenni commented Jan 23, 2025

implement some more limits.

Fixes #385

Copy link
Collaborator

@mpsijm mpsijm left a comment

Choose a reason for hiding this comment

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

Haven't tested it yet, but here are some first comments based on the code 😄

bin/run.py Outdated Show resolved Hide resolved
bin/program.py Outdated Show resolved Hide resolved
@RagnarGrootKoerkamp
Copy link
Owner

RagnarGrootKoerkamp commented Jan 23, 2025

No time to look at the code yet, but I could imagine the -m argument still being useful to override the yaml key for quick testing purposes?

@mzuenni
Copy link
Collaborator Author

mzuenni commented Jan 23, 2025

but should the yaml key override it or be an additional limit (i.e. we take the min of both) and should that be for submissions or all subprocesses... ?

@mzuenni mzuenni changed the title add memory limit add ~~memory~~ limits Jan 24, 2025
@mzuenni mzuenni requested a review from mpsijm January 24, 2025 16:54
@mzuenni
Copy link
Collaborator Author

mzuenni commented Jan 29, 2025

I think everything should work now, @mpsijm do you have time to give it a try? :)

Copy link
Collaborator

@mpsijm mpsijm left a comment

Choose a reason for hiding this comment

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

I've used your branch today when preparing some problem ideas for the Freshmen Programming Contests, and it didn't crash 😄 I used at least bt run, bt generate, bt validate, bt constraints, and bt fuzz. Note that I haven't actually touched any of the new limits yet, nor did I explicitly try to push a submission/generator/validator past the time/memory/output limit (I only had some TLE submissions). But some testing is better than no testing, I guess 😛

bin/generate.py Outdated Show resolved Hide resolved
bin/problem.py Show resolved Hide resolved
bin/program.py Show resolved Hide resolved
bin/program.py Show resolved Hide resolved
doc/commands.md Outdated Show resolved Hide resolved
bin/verdicts.py Outdated Show resolved Hide resolved
bin/problem.py Show resolved Hide resolved
bin/problem.py Show resolved Hide resolved
@mpsijm mpsijm changed the title add ~~memory~~ limits #385 Add ~~memory~~ limits Feb 3, 2025
@mpsijm mpsijm changed the title #385 Add ~~memory~~ limits #385 Add limits Feb 3, 2025
@mpsijm mpsijm merged commit 43c21ec into master Feb 3, 2025
4 checks passed
@mpsijm mpsijm deleted the memory-limit branch February 3, 2025 08:07
This was referenced Feb 5, 2025
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.

Limits
3 participants