dlai-grader 1.19.0__py3-none-any.whl → 1.20.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dlai-grader might be problematic. Click here for more details.
- dlai_grader/__init__.py +1 -1
- dlai_grader/templates.py +44 -41
- {dlai_grader-1.19.0.dist-info → dlai_grader-1.20.0.dist-info}/METADATA +3 -3
- {dlai_grader-1.19.0.dist-info → dlai_grader-1.20.0.dist-info}/RECORD +8 -8
- {dlai_grader-1.19.0.dist-info → dlai_grader-1.20.0.dist-info}/WHEEL +1 -1
- {dlai_grader-1.19.0.dist-info → dlai_grader-1.20.0.dist-info}/LICENSE +0 -0
- {dlai_grader-1.19.0.dist-info → dlai_grader-1.20.0.dist-info}/entry_points.txt +0 -0
- {dlai_grader-1.19.0.dist-info → dlai_grader-1.20.0.dist-info}/top_level.txt +0 -0
dlai_grader/__init__.py
CHANGED
dlai_grader/templates.py
CHANGED
|
@@ -17,6 +17,8 @@ def load_templates() -> Dict[str, str]:
|
|
|
17
17
|
print("invalid option selected")
|
|
18
18
|
exit(1)
|
|
19
19
|
|
|
20
|
+
unit_test_filename = input("Filename for unit tests (leave empty for unittests): ")
|
|
21
|
+
unit_test_filename = "unittests" if not unit_test_filename else unit_test_filename
|
|
20
22
|
version = input("Version of the grader (leave empty for version 1): ")
|
|
21
23
|
version = "1" if not version else version
|
|
22
24
|
|
|
@@ -56,6 +58,7 @@ def load_templates() -> Dict[str, str]:
|
|
|
56
58
|
|
|
57
59
|
conf = f"""
|
|
58
60
|
ASSIGNMENT_NAME=C{course}{W_OR_M}{W_OR_M_num}_Assignment
|
|
61
|
+
UNIT_TESTS_NAME={unit_test_filename}
|
|
59
62
|
IMAGE_NAME={specialization}c{course}{W_OR_M.lower()}{W_OR_M_num}-grader
|
|
60
63
|
GRADER_VERSION={version}
|
|
61
64
|
TAG_ID=V$(GRADER_VERSION)
|
|
@@ -64,66 +67,66 @@ def load_templates() -> Dict[str, str]:
|
|
|
64
67
|
"""
|
|
65
68
|
|
|
66
69
|
makefile = """
|
|
67
|
-
|
|
70
|
+
.PHONY: learner build entry submit-solution upgrade test grade mem zip clean upload move-zip move-learner tag undeletable uneditable versioning upgrade sync
|
|
68
71
|
|
|
69
|
-
|
|
72
|
+
include .conf
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
PARTIDS = ""
|
|
75
|
+
OS := $(shell uname)
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
sync:
|
|
78
|
+
cp mount/submission.ipynb ../$(ASSIGNMENT_NAME)_Solution.ipynb
|
|
79
|
+
cp learner/$(ASSIGNMENT_NAME).ipynb ../$(ASSIGNMENT_NAME).ipynb
|
|
80
|
+
cp mount/$(UNIT_TESTS_NAME).py ../$(UNIT_TESTS_NAME).py
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
learner:
|
|
83
|
+
dlai_grader --learner --output_notebook=./learner/$(ASSIGNMENT_NAME).ipynb
|
|
81
84
|
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
build:
|
|
86
|
+
docker build -t $(IMAGE_NAME):$(TAG_ID) .
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
debug:
|
|
89
|
+
docker run -it --rm --mount type=bind,source=$(PWD)/mount,target=/shared/submission --mount type=bind,source=$(PWD),target=/grader/ --entrypoint ash $(IMAGE_NAME):$(TAG_ID)
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
submit-solution:
|
|
92
|
+
cp solution/solution.ipynb mount/submission.ipynb
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
versioning:
|
|
95
|
+
dlai_grader --versioning
|
|
93
96
|
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
tag:
|
|
98
|
+
dlai_grader --tag
|
|
96
99
|
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
undeletable:
|
|
101
|
+
dlai_grader --undeletable
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
uneditable:
|
|
104
|
+
dlai_grader --uneditable
|
|
102
105
|
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
upgrade:
|
|
107
|
+
dlai_grader --upgrade
|
|
105
108
|
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
test:
|
|
110
|
+
docker run -it --rm --mount type=bind,source=$(PWD)/mount,target=/shared/submission --mount type=bind,source=$(PWD),target=/grader/ --entrypoint pytest $(IMAGE_NAME):$(TAG_ID)
|
|
108
111
|
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
grade:
|
|
113
|
+
dlai_grader --grade --partids=$(PARTIDS) --docker=$(IMAGE_NAME):$(TAG_ID) --memory=$(MEMORY_LIMIT) --submission=$(SUB_DIR)
|
|
111
114
|
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
mem:
|
|
116
|
+
memthis $(PARTIDS)
|
|
114
117
|
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
zip:
|
|
119
|
+
zip -r $(IMAGE_NAME)$(TAG_ID).zip .
|
|
117
120
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
clean:
|
|
122
|
+
find . -maxdepth 1 -type f -name "*.zip" -exec rm {} +
|
|
123
|
+
docker rm $$(docker ps -qa --no-trunc --filter "status=exited")
|
|
124
|
+
docker rmi $$(docker images --filter "dangling=true" -q --no-trunc)
|
|
122
125
|
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
upload:
|
|
127
|
+
coursera_autograder --timeout 1800 upload --grader-memory-limit $(MEMORY_LIMIT) --grading-timeout 1800 $(IMAGE_NAME)$(TAG_ID).zip $(COURSE_ID) $(ITEM_ID) $(PART_ID)
|
|
125
128
|
|
|
126
|
-
|
|
129
|
+
"""
|
|
127
130
|
|
|
128
131
|
grader_py = """
|
|
129
132
|
from types import ModuleType, FunctionType
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dlai-grader
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.20.0
|
|
4
4
|
Summary: Grading utilities for DLAI courses
|
|
5
5
|
Home-page: https://github.com/https-deeplearning-ai/grader
|
|
6
6
|
Author: Andres Zarta
|
|
@@ -11,8 +11,8 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: nbformat
|
|
15
|
-
Requires-Dist: jupytext
|
|
14
|
+
Requires-Dist: nbformat>=5.1.3
|
|
15
|
+
Requires-Dist: jupytext>=1.13.0
|
|
16
16
|
|
|
17
17
|
# grader
|
|
18
18
|
Automatic grading for DLAI courses. Designed to be compatible with Coursera's grading requirements.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dlai_grader/__init__.py,sha256=
|
|
1
|
+
dlai_grader/__init__.py,sha256=WZ0vu8B3GbPKjCQEfxe19QGjcoshBZSOIO7NJr0cnec,211
|
|
2
2
|
dlai_grader/cli.py,sha256=NIwboE-AFn1LXOFmF4O70Ow0fkRxgclG_eMwmWiua38,4917
|
|
3
3
|
dlai_grader/compiler.py,sha256=FiORpcrAbxWKRuOnyADrknTOwsIXb_2PFO26mVaLTt4,1315
|
|
4
4
|
dlai_grader/config.py,sha256=HQ3dzaFpRswIA_7EC8XdP8DdJH-XePsbMQMHG8Esblc,1638
|
|
@@ -6,11 +6,11 @@ dlai_grader/grading.py,sha256=Gmft9b7M8At_y_WZDatYdW6tinZMfqQoT7bDXp6uz2I,4606
|
|
|
6
6
|
dlai_grader/io.py,sha256=TB9d01AK5FIbFUQwM8AqOOfuMWzjzrit98i3MhK5AqU,8234
|
|
7
7
|
dlai_grader/notebook.py,sha256=noMU6DzPVylSjkHmSBUcmquVvAz4JigbRtbQrVYJdic,11830
|
|
8
8
|
dlai_grader/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
dlai_grader/templates.py,sha256=
|
|
9
|
+
dlai_grader/templates.py,sha256=ENrAsFzZ1OkzmF0zC-ml4DIt7295_gzFpwsIbkFIZbQ,7797
|
|
10
10
|
dlai_grader/types.py,sha256=_IIVbYL9cMmwA6in0aI5fEWCIaAMNcQbxG64X1P1CkE,335
|
|
11
|
-
dlai_grader-1.
|
|
12
|
-
dlai_grader-1.
|
|
13
|
-
dlai_grader-1.
|
|
14
|
-
dlai_grader-1.
|
|
15
|
-
dlai_grader-1.
|
|
16
|
-
dlai_grader-1.
|
|
11
|
+
dlai_grader-1.20.0.dist-info/LICENSE,sha256=a_kch_UqdJPtyxk35QJr9O84K_koPixqWPYW9On4-io,1072
|
|
12
|
+
dlai_grader-1.20.0.dist-info/METADATA,sha256=kdNqFu86xpqftKounv7q8dptzoqVMCc5--d79lM5sKE,8618
|
|
13
|
+
dlai_grader-1.20.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
14
|
+
dlai_grader-1.20.0.dist-info/entry_points.txt,sha256=4OcSAUIluONXa3ymViQ7CBQ2Lk52nb6xZnfph1rlMnk,71
|
|
15
|
+
dlai_grader-1.20.0.dist-info/top_level.txt,sha256=4YKtA3ztisFtx_g4hsGivy3J2NHnXxFziIMqawC8HWg,12
|
|
16
|
+
dlai_grader-1.20.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|