@@ -5,119 +5,7 @@ category: Instructor > Autograding
55
66### Example Configuration
77
8- The following configuration can be found on the [ Submitty GitHub] ( https://github.com/Submitty/Submitty/tree/main/more_autograding_examples/jupyter_notebook_autograding ) .
9-
10- ``` json
11- {
12- "autograding" : {
13- "submission_to_runner" : [ " *.ipynb" , " *.png" ],
14- "work_to_details" : [ " **/*.ipynb" , " **/*.png" , " **/*.txt" , " **/*.err" ]
15- },
16- "autograding_method" : " docker" ,
17- "resource_limits" : {
18- "RLIMIT_NPROC" : 32 ,
19- "RLIMIT_FSIZE" : 20971520 // 20 MB
20- },
21- "max_submission_size" : 10485760 , // 10 MB
22- "container_options" : {
23- "container_image" : " submitty/jupyter:latest"
24- },
25- "allow_system_calls" : [
26- " COMMUNICATIONS_AND_NETWORKING_INTERPROCESS_COMMUNICATION" ,
27- " COMMUNICATIONS_AND_NETWORKING_KILL" ,
28- " COMMUNICATIONS_AND_NETWORKING_SIGNALS" ,
29- " COMMUNICATIONS_AND_NETWORKING_SOCKETS" ,
30- " COMMUNICATIONS_AND_NETWORKING_SOCKETS_MINIMAL" ,
31- " FILE_MANAGEMENT_MOVE_DELETE_RENAME_FILE_DIRECTORY" ,
32- " FILE_MANAGEMENT_RARE" ,
33- " PROCESS_CONTROL_ADVANCED" ,
34- " PROCESS_CONTROL_NEW_PROCESS_THREAD" ,
35- " PROCESS_CONTROL_MEMORY_ADVANCED" ,
36- " PROCESS_CONTROL_SYNCHRONIZATION" ,
37- " PROCESS_CONTROL_SCHEDULING" ,
38- " FILE_MANAGEMENT_PERMISSIONS" ,
39- " UNKNOWN"
40- ],
41- "testcases" : [
42- {
43- "title" : " Executes successfully" ,
44- // Although wildcard is used, the grader will only expect one notebook file. Use if filename cannot be determined.
45- "command" : " jupyter_notebook_grader -i *.ipynb -o executed.ipynb" ,
46- "points" : 1 ,
47- "validation" : [
48- {
49- "method" : " fileExists" ,
50- "actual_file" : " executed.ipynb" ,
51- "show_actual" : " always" ,
52- "show_message" : " always"
53- }
54- ]
55- },
56- {
57- "pre_commands" : [
58- {
59- "command" : " cp" ,
60- "testcase" : " test01" ,
61- "source" : " cell1*.*" ,
62- "destination" : " ./"
63- }
64- ],
65- "title" : " STDOUT" ,
66- "points" : 1 ,
67- "validation" : [
68- {
69- "method" : " diff" ,
70- "actual_file" : " cell1_stdout.txt" ,
71- "expected_string" : " hello world!"
72- },
73- {
74- "method" : " warnIfEmpty" ,
75- "actual_file" : " cell1_stderr.txt" ,
76- "show_actual" : " always" ,
77- "deduction" : 0.0
78- },
79- {
80- "method" : " warnIfEmpty" ,
81- "actual_file" : " cell1_source.txt" ,
82- "show_actual" : " always" ,
83- "deduction" : 0.0
84- },
85- {
86- "method" : " errorIfNotEmpty" ,
87- "actual_file" : " cell1.err" ,
88- "show_actual" : " always" ,
89- "deduction" : 0.0
90- }
91- ]
92- },
93- {
94- "pre_commands" : [
95- {
96- "command" : " cp" ,
97- "testcase" : " test01" ,
98- "source" : " cell2*.*" ,
99- "destination" : " ./"
100- }
101- ],
102- "title" : " Markdown" ,
103- "points" : 1 ,
104- "validation" : [
105- {
106- "method" : " diff" ,
107- "actual_file" : " cell2.txt" ,
108- "expected_string" : " ## 2. Create IPython images with the given \" one.png\" and \" two.png\" .\n Use `from IPython.display import Image`"
109- },
110- {
111- "method" : " errorIfNotEmpty" ,
112- "actual_file" : " cell2.err" ,
113- "show_actual" : " always" ,
114- "deduction" : 0.0
115- }
116- ]
117- }
118- ]
119- }
120- ```
8+ Example Jupyter Notebook autograding configurations can be found on the [ Submitty GitHub] ( https://github.com/Submitty/Submitty/tree/main/more_autograding_examples ) .
1219
12210### Required Fields
12311
@@ -126,37 +14,25 @@ For autograding Jupyter Notebooks, the following fields must be included in your
12614``` json
12715{
12816 "autograding" : {
129- "submission_to_runner" : [ " *.ipynb " , " *.png " ],
130- "work_to_details" : [ " **/*.ipynb " , " **/*.png " , " **/*.txt " , " **/*.err " ]
17+ "submission_to_runner" : [ ... ],
18+ "work_to_details" : [ ... ]
13119 },
13220 "autograding_method" : " docker" ,
13321 "container_options" : {
134- "container_image" : " submitty/jupyter:latest "
22+ "container_image" : " ... "
13523 },
13624 "allow_system_calls" : [
137- " COMMUNICATIONS_AND_NETWORKING_INTERPROCESS_COMMUNICATION" ,
138- " COMMUNICATIONS_AND_NETWORKING_KILL" ,
139- " COMMUNICATIONS_AND_NETWORKING_SIGNALS" ,
140- " COMMUNICATIONS_AND_NETWORKING_SOCKETS" ,
141- " COMMUNICATIONS_AND_NETWORKING_SOCKETS_MINIMAL" ,
142- " FILE_MANAGEMENT_MOVE_DELETE_RENAME_FILE_DIRECTORY" ,
143- " FILE_MANAGEMENT_RARE" ,
144- " PROCESS_CONTROL_ADVANCED" ,
145- " PROCESS_CONTROL_NEW_PROCESS_THREAD" ,
146- " PROCESS_CONTROL_MEMORY_ADVANCED" ,
147- " PROCESS_CONTROL_SYNCHRONIZATION" ,
148- " PROCESS_CONTROL_SCHEDULING" ,
149- " FILE_MANAGEMENT_PERMISSIONS" ,
150- " UNKNOWN"
25+ ...
15126 ]
15227}
15328```
15429
30+ The method for allowing certain system calls in can be found in [ System Call Filtering] ( system_call_filtering.md ) .
15531You may also need to pass in resource limit values or a max submission size.
15632
15733``` json
15834"resource_limits" : {
159- "RLIMIT_NPROC" : 32 , //
35+ "RLIMIT_NPROC" : 32 ,
16036 "RLIMIT_FSIZE" : 20971520 // 20 MB
16137 },
16238"max_submission_size" : 10485760 , // 10 MB
0 commit comments