-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add support for interactive problems #261
base: master
Are you sure you want to change the base?
Conversation
I've marked this as a draft but am looking for feedback if anyone is able to review. |
49f169f
to
3fdecfc
Compare
3fdecfc
to
5894a2b
Compare
I have tested this on IOI 2018 Combo and IOI 2020 Stations. No glaring issues so far. I will try to review soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems mostly correct overall.
I like the idea of fd 3 being used for "actual output" as for some problems it definitely makes sense to show some extra feedback to users on sample cases (as currently the only feedback is the testcase outcome).
While testing this with the IOI problems, I found it difficult to debug evaluators and submissions as it can usually be unclear if the problem lies in the evaluator or the submission. I feel like it could be useful to have some way of showing the stderr of the user processes to staff to make it easier when making problems as otherwise there is no way to get any info directly from the user processes.
r['meta']['cg-mem'] = [r['meta']['cg-mem'],memory_limit*1024].min if r['meta'].has_key?('cg-mem') | ||
r['meta']['max-rss'] = [r['meta']['max-rss'],memory_limit*1024].min |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small issue: The stored memory usage should probably get capped like this regardless of whether the previous status is OK. (r['meta']['status'] == 'OK'
on line 358).
Otherwise, in some cases the memory usage displayed on a submission's page may be much higher than the memory limit, since this code won't be run if one of the program instances causes some other error (RE, TLE), on top of exceeding the combined memory limit.
Depends on #260. Based on the Communication task type from CMS.
This adds an
interactive_processes
field to the Evaluator class.If interactive_processes=0 (default), functionality is unchanged (evaluator runs after the user/submission program).
If interactive_processes>0, we concurrently spawn that many user processes, each connected using pipes to the manager process. After all processes exit, execution stats are merged (time/memory is added, wall time is maximised, first failing status is used).
interactive_processes
is currently limited to 2 to avoid exhausting server resources.Notes on resource limits: