Skip to content

Add a new "interactive" task type.#1667

Open
veluca93 wants to merge 1 commit intocms-dev:mainfrom
veluca93:interactive-tt
Open

Add a new "interactive" task type.#1667
veluca93 wants to merge 1 commit intocms-dev:mainfrom
veluca93:interactive-tt

Conversation

@veluca93
Copy link
Copy Markdown
Contributor

@veluca93 veluca93 commented Apr 5, 2026

No description provided.

@veluca93 veluca93 requested review from Virv12, gollux and prandla April 5, 2026 23:02
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 12.50000% with 343 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.18%. Comparing base (779f9ff) to head (819f3ea).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cms/grading/tasktypes/interactive_keeper.py 0.00% 144 Missing ⚠️
cms/grading/tasktypes/Interactive.py 25.37% 100 Missing ⚠️
cmscontrib/loaders/italy_yaml.py 0.00% 68 Missing ⚠️
cms/grading/Sandbox.py 37.50% 10 Missing ⚠️
cms/grading/ParameterTypes.py 56.25% 7 Missing ⚠️
cms/grading/steps/evaluation.py 0.00% 6 Missing ⚠️
cmstestsuite/tasks/interactive/__init__.py 0.00% 3 Missing ⚠️
cmstestsuite/tasks/interactive_many/__init__.py 0.00% 3 Missing ⚠️
cmstestsuite/Tests.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1667      +/-   ##
==========================================
- Coverage   54.68%   54.18%   -0.51%     
==========================================
  Files         336      340       +4     
  Lines       27501    27835     +334     
==========================================
+ Hits        15039    15082      +43     
- Misses      12462    12753     +291     
Flag Coverage Δ
functionaltests 0.00% <0.00%> (ø)
unittests 54.18% <12.50%> (-0.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/interactive_keeper.py
Comment thread cms/grading/tasktypes/interactive_keeper.py
Comment thread cms/grading/tasktypes/interactive_keeper.py Outdated
Comment thread cms/grading/Sandbox.py
Comment thread cms/grading/Sandbox.py Outdated
@prandla
Copy link
Copy Markdown
Member

prandla commented Apr 7, 2026

Also, there should be some documentation of the controller communication format.

Also, i'm not sure i like the name: i think it'd be more descriptive to call this something like "DynamicInteractive" to emphasize that it spawns solutions dynamically. (and then Communication could be renamed to Interactive, which is what it really is. though we'd probably need to keep the name Communication as an alias.)

@veluca93
Copy link
Copy Markdown
Contributor Author

veluca93 commented Apr 7, 2026

Also, there should be some documentation of the controller communication format.

Also, i'm not sure i like the name: i think it'd be more descriptive to call this something like "DynamicInteractive" to emphasize that it spawns solutions dynamically. (and then Communication could be renamed to Interactive, which is what it really is. though we'd probably need to keep the name Communication as an alias.)

The plan is to have Interactive eventually also take over the tasks that we currently do with Communication, so I am happy with the "Interactive" task name.

As for documentation: that will come, I would like first to make sure that we agree the implementation is sensible.

Copy link
Copy Markdown
Member

@prandla prandla left a comment

Choose a reason for hiding this comment

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

i think the implementation in general is fine now. interactive_keeper.py doesn't really spark joy for me, but i don't know how to improve it much. (aside from the one comment i left in it)

Comment thread cms/grading/tasktypes/interactive_keeper.py
Comment thread cms/grading/tasktypes/interactive_keeper.py Outdated
Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/ParameterTypes.py Outdated
@veluca93 veluca93 force-pushed the interactive-tt branch 3 times, most recently from 5060e23 to 3ed43ef Compare April 8, 2026 08:16
Copy link
Copy Markdown
Contributor

@gollux gollux left a comment

Choose a reason for hiding this comment

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

I have several nitpicking comments, but overall I like it. However, there should be some documentation on how to use the task type.

Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/interactive_keeper.py
Comment thread cms/grading/tasktypes/Interactive.py Outdated
Comment thread cms/grading/tasktypes/interactive_keeper.py Outdated
Comment thread cms/grading/tasktypes/Interactive.py Outdated
@veluca93 veluca93 force-pushed the interactive-tt branch 6 times, most recently from f6fbc3a to df9f99d Compare April 19, 2026 20:01
Comment thread docs/Task types.rst
Comment thread docs/Task types.rst
Comment thread docs/Task types.rst Outdated
@prandla
Copy link
Copy Markdown
Member

prandla commented Apr 20, 2026

Also, I wonder if we should allow setting the solutions' wall time limit separately from the cpu time limit. If one has a task with multiple concurrent solutions of which only one is actively computing something at any given time, then it seems quite likely that the default wall limit of 2*cpu_limit+1 is not enough.

@veluca93
Copy link
Copy Markdown
Contributor Author

Also, I wonder if we should allow setting the solutions' wall time limit separately from the cpu time limit. If one has a task with multiple concurrent solutions of which only one is actively computing something at any given time, then it seems quite likely that the default wall limit of 2*cpu_limit+1 is not enough.

Isn't that also the case for other task types, i.e. communication?

@prandla
Copy link
Copy Markdown
Member

prandla commented Apr 21, 2026

Isn't that also the case for other task types, i.e. communication?

I suppose so, but then this could be another way for Interactive to improve upon Communication :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants