dlai-grader 2.0b2__tar.gz → 2.0b3__tar.gz

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.

Files changed (34) hide show
  1. {dlai_grader-2.0b2/dlai_grader.egg-info → dlai_grader-2.0b3}/PKG-INFO +1 -1
  2. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/__init__.py +1 -1
  3. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/entry_py/solution_y_file_y.py +8 -6
  4. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates.py +56 -47
  5. {dlai_grader-2.0b2 → dlai_grader-2.0b3/dlai_grader.egg-info}/PKG-INFO +1 -1
  6. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/pyproject.toml +1 -1
  7. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/setup.py +1 -1
  8. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/LICENSE +0 -0
  9. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/MANIFEST.in +0 -0
  10. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/README.md +0 -0
  11. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/cli.py +0 -0
  12. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/compiler.py +0 -0
  13. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/config.py +0 -0
  14. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/grading.py +0 -0
  15. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/io.py +0 -0
  16. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/notebook.py +0 -0
  17. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/Makefile +0 -0
  18. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/copy_assignment_sh/extrafile_n +0 -0
  19. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/copy_assignment_sh/extrafile_y +0 -0
  20. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/dockerfile/data_n_solution_n +0 -0
  21. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/dockerfile/data_n_solution_y +0 -0
  22. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/dockerfile/data_y_solution_n +0 -0
  23. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/dockerfile/data_y_solution_y +0 -0
  24. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/entry_py/solution_n_file_n.py +0 -0
  25. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/entry_py/solution_n_file_y.py +0 -0
  26. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/entry_py/solution_y_file_n.py +0 -0
  27. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/templates/grader.py +0 -0
  28. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader/types.py +0 -0
  29. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader.egg-info/SOURCES.txt +0 -0
  30. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader.egg-info/dependency_links.txt +0 -0
  31. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader.egg-info/entry_points.txt +0 -0
  32. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader.egg-info/requires.txt +0 -0
  33. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/dlai_grader.egg-info/top_level.txt +0 -0
  34. {dlai_grader-2.0b2 → dlai_grader-2.0b3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dlai-grader
3
- Version: 2.0b2
3
+ Version: 2.0b3
4
4
  Summary: Grading utilities for DLAI courses
5
5
  Home-page: https://github.com/https-deeplearning-ai/grader
6
6
  Author: Andres Zarta
@@ -6,6 +6,6 @@ from . import grading
6
6
  from . import types
7
7
 
8
8
 
9
- __version__ = "2.0b2"
9
+ __version__ = "2.0b3"
10
10
  __author__ = "Andres Zarta"
11
11
  __credits__ = "DeepLearning.AI"
@@ -1,14 +1,16 @@
1
1
  import traceback
2
- from dlai_grader.config import Config, get_part_id
2
+
3
+ from grader import handle_part_id
4
+
3
5
  from dlai_grader.compiler import compile_partial_module
4
- from dlai_grader.io import read_notebook, copy_submission_to_workdir, send_feedback
5
- from dlai_grader.notebook import keep_tagged_cells
6
+ from dlai_grader.config import Config, get_part_id
6
7
  from dlai_grader.grading import (
8
+ LearnerSubmission,
7
9
  compute_grading_score,
8
10
  graded_obj_missing,
9
- LearnerSubmission,
10
11
  )
11
- from grader import handle_part_id
12
+ from dlai_grader.io import copy_submission_to_workdir, read_notebook, send_feedback
13
+ from dlai_grader.notebook import keep_tagged_cells
12
14
 
13
15
 
14
16
  def notebook_grading(config, compile_solution=False):
@@ -60,7 +62,7 @@ def main() -> None:
60
62
  case "123":
61
63
  copy_submission_to_workdir(file_name="{{EXTRA_FILE_NAME}}")
62
64
  c = Config(submission_file="{{EXTRA_FILE_NAME}}")
63
- learner_mod = non_notebook_grading(c)
65
+ learner_mod, solution_mod = non_notebook_grading(c), None
64
66
  case _:
65
67
  copy_submission_to_workdir()
66
68
  c = Config()
@@ -159,30 +159,31 @@ def load_templates() -> dict[str, str]:
159
159
  unit_test_filename = unit_test_filename if unit_test_filename else "unittests"
160
160
  # version = input("Version of the grader (leave empty for version 1): ")
161
161
  version = "1"
162
- data_dir_required = input(
163
- "Do you require a data dir? y/n (leave empty for n): "
164
- )
165
- data_dir_required = data_dir_required if data_dir_required else "n"
166
-
167
- if data_dir_required not in ["y", "n"]:
168
- print("invalid option selected")
169
- sys.exit(1)
170
162
 
171
- sol_dir_required = input(
172
- "Do you require a solution file? y/n (leave empty for n): "
173
- )
174
- sol_dir_required = sol_dir_required if sol_dir_required else "n"
175
- if sol_dir_required not in ["y", "n"]:
176
- print("invalid option selected")
177
- sys.exit(1)
163
+ data_dir_required = ""
164
+ while data_dir_required not in ["y", "n"]:
165
+ data_dir_required = input(
166
+ "Do you require a data dir? y/n (leave empty for n): ",
167
+ )
168
+ if data_dir_required == "":
169
+ data_dir_required = "n"
170
+ # data_dir_required = data_dir_required if data_dir_required else "n"
171
+
172
+ sol_dir_required = ""
173
+ while sol_dir_required not in ["y", "n"]:
174
+ sol_dir_required = input(
175
+ "Do you require a solution file? y/n (leave empty for n): ",
176
+ )
177
+ if sol_dir_required == "":
178
+ sol_dir_required = "n"
178
179
 
179
- non_notebook_grading = input(
180
- "Will you grade a file different from a notebook? y/n (leave empty for n): ",
181
- )
182
- non_notebook_grading = non_notebook_grading if non_notebook_grading else "n"
183
- if non_notebook_grading not in ["y", "n"]:
184
- print("invalid option selected")
185
- sys.exit(1)
180
+ non_notebook_grading = ""
181
+ while non_notebook_grading not in ["y", "n"]:
182
+ non_notebook_grading = input(
183
+ "Will you grade a file different from a notebook? y/n (leave empty for n): ",
184
+ )
185
+ if non_notebook_grading == "":
186
+ non_notebook_grading = "n"
186
187
 
187
188
  extra_file_name = ""
188
189
  if non_notebook_grading == "y":
@@ -190,17 +191,17 @@ def load_templates() -> dict[str, str]:
190
191
  "Name of the extra file to grade: ",
191
192
  )
192
193
 
193
- cpus = input("CPU Units (leave empty for 0.25): ")
194
- cpus = cpus if cpus else "0.25"
194
+ cpus = ""
195
+ while cpus not in ["0.25", "0.5", "0.75", "1"]:
196
+ cpus = input("CPU Units (leave empty for 0.25): ")
197
+ if cpus == "":
198
+ cpus = "0.25"
195
199
 
196
- if cpus not in ["0.25", "0.5", "0.75", "1"]:
197
- print("invalid option selected")
198
- sys.exit(1)
200
+ if cpus not in ["0.25", "0.5", "0.75", "1"]:
201
+ print(f"Options are: {['0.25', '0.5', '0.75', '1']}")
199
202
 
200
- soft_memory = input("Memory Reservation (leave empty for 512m): ")
201
- soft_memory = soft_memory if soft_memory else "512m"
202
-
203
- if soft_memory not in [
203
+ soft_memory = ""
204
+ soft_memory_options = [
204
205
  "512m",
205
206
  "768m",
206
207
  "1024m",
@@ -211,14 +212,17 @@ def load_templates() -> dict[str, str]:
211
212
  "2g",
212
213
  "4g",
213
214
  "8g",
214
- ]:
215
- print("invalid option selected")
216
- sys.exit(1)
215
+ ]
216
+ while soft_memory not in soft_memory_options:
217
+ soft_memory = input("Memory Reservation (leave empty for 512m): ")
218
+ if soft_memory == "":
219
+ soft_memory = "512m"
217
220
 
218
- hard_memory = input("Memory Limit (leave empty for 1g): ")
219
- hard_memory = hard_memory if hard_memory else "1g"
221
+ if soft_memory not in soft_memory_options:
222
+ print(f"Options are: {soft_memory_options}")
220
223
 
221
- if hard_memory not in [
224
+ hard_memory = ""
225
+ hard_memory_options = [
222
226
  "1024m",
223
227
  "2048m",
224
228
  "4096m",
@@ -229,9 +233,14 @@ def load_templates() -> dict[str, str]:
229
233
  "4g",
230
234
  "8g",
231
235
  "15g",
232
- ]:
233
- print("invalid option selected")
234
- sys.exit(1)
236
+ ]
237
+ while hard_memory not in hard_memory_options:
238
+ hard_memory = input("Memory Limit (leave empty for 1g): ")
239
+ if hard_memory == "":
240
+ hard_memory = "1g"
241
+
242
+ if hard_memory not in hard_memory_options:
243
+ print(f"Options are: {hard_memory_options}")
235
244
 
236
245
  if grader_mvp == "y":
237
246
  unit_test_filename = "unittests"
@@ -257,18 +266,18 @@ def load_templates() -> dict[str, str]:
257
266
  TAG_ID=V$(GRADER_VERSION)
258
267
  SUB_DIR=mount
259
268
  MEMORY_LIMIT=4096
260
- HARD_MEMORY={hard_memory}
261
269
  CPUS={cpus}
262
270
  SOFT_MEMORY={soft_memory}
271
+ HARD_MEMORY={hard_memory}
263
272
  """
264
273
 
265
- # assignment_name = f"C{course}M{module}_Assignment.ipynb"
274
+ assignment_name = f"C{course}M{module}_Assignment.ipynb"
266
275
 
267
- # copy_assignment_to_submission_sh = generate_copy_assignment_script(
268
- # extra_file_required=non_notebook_grading,
269
- # assignment_name=assignment_name,
270
- # extra_file_name=extra_file_name,
271
- # )
276
+ copy_assignment_to_submission_sh = generate_copy_assignment_script(
277
+ extra_file_required=non_notebook_grading,
278
+ assignment_name=assignment_name,
279
+ extra_file_name=extra_file_name,
280
+ )
272
281
 
273
282
  makefile = copy_makefile()
274
283
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dlai-grader
3
- Version: 2.0b2
3
+ Version: 2.0b3
4
4
  Summary: Grading utilities for DLAI courses
5
5
  Home-page: https://github.com/https-deeplearning-ai/grader
6
6
  Author: Andres Zarta
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dlai-grader"
7
- version = "2.0b2"
7
+ version = "2.0b3"
8
8
  description = "Grading utilities for DLAI courses"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -5,7 +5,7 @@ with open("README.md", "r") as f:
5
5
 
6
6
  setup(
7
7
  name="dlai-grader",
8
- version="2.0b2",
8
+ version="2.0b3",
9
9
  description="Grading utilities for DLAI courses",
10
10
  url="https://github.com/https-deeplearning-ai/grader",
11
11
  author="Andres Zarta",
File without changes
File without changes
File without changes
File without changes