matlab - Python evaluate and grade code from students -
For a class, I want to automatically evaluate the students' coding work.
- Students get a square skeleton, which they have to fill.
- Students 'uploads' Definitions of this class through a server (or web interface)
- The server tests a script on a specific function, such as class. Sigmoid (x ), And checks that the output of the function is correct and can suggest.
This setup brings lots of problems, because you are evaluating unbelievable code. However, this would be very useful in my classes, so I am ready to spend some time thinking of it. I remember Coursera matlab / octace was something similar for the work, but I can not find the details.
I have many online python interfaces (e.g., codecademy.com, ideone.com, c9.io); While they are right to learn or share codes with online evaluation, I do not remember the option that the evaluation script should be "hidden" (i.e. the correct reference implementation to compare the output on randomly generated data in the evaluation script) ). Apart from this, I have some data (for example, pictures) and packages (Scalain / MMP) in the given course, which is not always available.
Specifically, my questions are
- Two I remember an online environment that actually provides such functionality (it would be the easiest) < Li> To set it myself, I was thinking of hosting it (for example) on the Amazon Cloud (hence there is no problem with infrastructure in the university), but there is a Python practice that you can recommend On sandboxing?
Thanks in advance for any suggestions!
Thanks for the people who answered the question (partially) to hear that the question is not suitable for StackOverflow.
After some more feedback through the other channels, I think my approach will be as follows:
- Student skeleton and fills
- The student also has an evaluation script.
- In the script, some connections with the server
- Login
- Some random data to be obtained
- Check whether the student The code output is as expected from the server.
This way the code of students is evaluated locally, but only output is sent to the server. This type of evaluation is possible, but still allows for automatic evaluation of the code.
Sandboxing Python is normally impossible You can try to prevent dangerous operations, which means That's what the student code can do, it is quite limited. But it is likely that anyway leave open invasion vectors. One better option is to use OS-level sandboxing to separate the Python process. For example, a secure Python uses the Library apparmer to provide an Evil.
Consider the difficulty of sandboxing python as an example, or consider this input in your sandbox:
9 ** 9 ** 99 , which is a sequence of GoogleLoclex Will try to calculate an integer, which will consume all your RAM after a long time.
- Two I remember an online environment that actually provides such functionality (it would be the easiest) < Li> To set it myself, I was thinking of hosting it (for example) on the Amazon Cloud (hence there is no problem with infrastructure in the university), but there is a Python practice that you can recommend On sandboxing?
Comments
Post a Comment