dlai-grader 1.21.1__tar.gz → 1.21.2__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 (21) hide show
  1. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/PKG-INFO +1 -1
  2. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/__init__.py +1 -1
  3. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/compiler.py +9 -6
  4. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/templates.py +2 -3
  5. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader.egg-info/PKG-INFO +1 -1
  6. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/setup.py +1 -1
  7. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/LICENSE +0 -0
  8. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/README.md +0 -0
  9. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/cli.py +0 -0
  10. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/config.py +0 -0
  11. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/grading.py +0 -0
  12. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/io.py +0 -0
  13. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/notebook.py +0 -0
  14. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/py.typed +0 -0
  15. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader/types.py +0 -0
  16. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader.egg-info/SOURCES.txt +0 -0
  17. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader.egg-info/dependency_links.txt +0 -0
  18. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader.egg-info/entry_points.txt +0 -0
  19. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader.egg-info/requires.txt +0 -0
  20. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/dlai_grader.egg-info/top_level.txt +0 -0
  21. {dlai_grader-1.21.1 → dlai_grader-1.21.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dlai-grader
3
- Version: 1.21.1
3
+ Version: 1.21.2
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__ = "1.21.1"
9
+ __version__ = "1.21.2"
10
10
  __author__ = "Andres Zarta"
11
11
  __credits__ = "DeepLearning.AI"
@@ -41,6 +41,7 @@ def compile_partial_module(
41
41
  module_name: str,
42
42
  verbose: bool = True,
43
43
  exit_on_error: bool = False,
44
+ debug_mode: bool = False,
44
45
  ) -> ModuleType:
45
46
  """Iterates over the code cells of a notebook and includes the ones that run to the compiled module.
46
47
  Args:
@@ -62,14 +63,16 @@ def compile_partial_module(
62
63
 
63
64
  except Exception as e:
64
65
  if exit_on_error:
65
- print(
66
- f"Error during execution of cell. Aborting full compilation.\n\nContents:\n\n{cell_code}\n\nException:\n\n{e}\n"
67
- )
66
+ if debug_mode:
67
+ print(
68
+ f"Error during execution of cell. Aborting full compilation.\n\nContents:\n\n{cell_code}\n\nException:\n\n{e}\n"
69
+ )
68
70
  break
69
71
 
70
- print(
71
- f"Error during execution of cell but kept going.\n\nContents:\n\n{cell_code}\n\nException:\n\n{e}\n"
72
- )
72
+ if debug_mode:
73
+ print(
74
+ f"Error during execution of cell but kept going.\n\nContents:\n\n{cell_code}\n\nException:\n\n{e}\n"
75
+ )
73
76
  continue
74
77
 
75
78
  return module
@@ -218,8 +218,7 @@ def load_templates() -> Dict[str, str]:
218
218
  for t in transformations:
219
219
  solution_nb = t(solution_nb)
220
220
 
221
- solution_script = notebook_to_script(solution_nb)
222
- solution_mod = compile_module(solution_script, "solution_mod", verbose=False)
221
+ solution_mod = compile_partial_module(solution_nb, "solution_mod", verbose=False)
223
222
 
224
223
  g_func = handle_part_id(c.part_id)(learner_mod, solution_mod)
225
224
 
@@ -239,7 +238,7 @@ def load_templates() -> Dict[str, str]:
239
238
 
240
239
  send_feedback(
241
240
  0.0,
242
- f"Object required for grading not found. If you haven't completed the exercise this is expected. Otherwise, check your solution as grader omits cells that throw errors.\n{additional_msg}",
241
+ f"Object required for grading not found. If you haven't completed the exercise this is expected. Otherwise, check your solution as grader omits cells that throw errors.\\n{additional_msg}",
243
242
  err=True,
244
243
  )
245
244
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dlai-grader
3
- Version: 1.21.1
3
+ Version: 1.21.2
4
4
  Summary: Grading utilities for DLAI courses
5
5
  Home-page: https://github.com/https-deeplearning-ai/grader
6
6
  Author: Andres Zarta
@@ -5,7 +5,7 @@ with open("README.md", "r") as f:
5
5
 
6
6
  setup(
7
7
  name="dlai-grader",
8
- version="1.21.1",
8
+ version="1.21.2",
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