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

Multiprocess Grading #21

Open
LinuxMercedes opened this issue Feb 1, 2017 · 5 comments
Open

Multiprocess Grading #21

LinuxMercedes opened this issue Feb 1, 2017 · 5 comments
Assignees

Comments

@LinuxMercedes
Copy link
Member

LinuxMercedes commented Feb 1, 2017

Sometimes my lab gets cold and I don't have a space heater under my desk. Multiprocess grading would help all my CPU cores bring about the heat death of the universe faster!

EDIT: this would also make grader run faster

@michaelwisely
Copy link
Member

I don't see why not. If I remember, grader uses a bunch of async junk. It shouldn't be hard to do.

The Python part wouldn't be parallel -- just concurrent. The student's assignments would be running in subprocesses anyway, so those should run in parallel.

@michaelwisely michaelwisely self-assigned this Feb 2, 2017
@brhoades
Copy link
Member

Output here would be a challenge... Logging output is currently done live--- would it make more sense for async to just output all at once and log when it starts/ends?

@brhoades
Copy link
Member

brhoades commented Feb 28, 2017

Additionally--- isn't this as simple as wrapping up:

https://github.com/redkyn/grader/blob/master/grader/grader/commands/grade.py#L42-L43

With a coroutine lambda then waiting w/ asyncio?

@michaelwisely
Copy link
Member

michaelwisely commented Feb 28, 2017

@brhoades I believe it's roughly that simple. It just needs an event loop and some coroutines.

Hopefully, asyncio has a sane way to set a limit on the maximum number of concurrently running tasks. We don't need 100 (in the case of CS 1001) containers trying to run wget at the same time... Maybe a flag (grader grade -j4 hw) flag would be appropriate for limiting the number of concurrently graded assignments.

@brhoades
Copy link
Member

Yep, those are my thoughts too. Default concurrency amount can be read from a gradesheet but defaults to the number of cores or something. I'll take a look at this due to its apparent simplicity sometime soon.

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

No branches or pull requests

3 participants