openedx / openedx/xqueue-watcher

Problem with grader requirements

Open
#11 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
18
Forks
44
PR merge metrics
No merged PRs in 30d

Description

I have a grader that needs additional libraries. They are installed no problem, but when the xqueuewatcher imp loads the grader it doesn't have that library: https://github.com/edx/xqueue-watcher/blob/master/xqueue_watcher/jailedgrader.py#L103

The relevant parts from the grader:

import numpy as np
from numpy import array, matrix
import gradelib
reload(gradelib)
from gradelib import Grader, InvokeStudentFunctionTest, must_define_function, rand, generateRandom2DData

fn = "perceptron"

grader = Grader()
grader.add_input_check(must_define_function(fn))

Should I just make a task in the ansible play to install all the individual coder requirements into the root processes' venv, or is there a better way?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with xqueue_watcher/jailedgrader.py around line 103 and trace how the grader is loaded and which environment it uses. Review the grader imports, including numpy and gradelib, then inspect the relevant Ansible play and root process virtual environment setup. Done means the appropriate grader dependencies are available without requiring every coder dependency to be installed globally.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, python
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.