dlai-grader 1.15.0__tar.gz → 1.16.0__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.
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/PKG-INFO +1 -1
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/__init__.py +1 -1
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/grading.py +9 -3
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader.egg-info/PKG-INFO +1 -1
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/setup.py +1 -1
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/LICENSE +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/README.md +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/cli.py +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/compiler.py +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/config.py +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/io.py +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/notebook.py +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/py.typed +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/templates.py +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader/types.py +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader.egg-info/SOURCES.txt +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader.egg-info/dependency_links.txt +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader.egg-info/entry_points.txt +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader.egg-info/requires.txt +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/dlai_grader.egg-info/top_level.txt +0 -0
- {dlai-grader-1.15.0 → dlai-grader-1.16.0}/setup.cfg +0 -0
|
@@ -40,7 +40,13 @@ def compute_grading_score(
|
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
42
|
num_cases = len(test_cases)
|
|
43
|
-
|
|
43
|
+
if num_cases == 0:
|
|
44
|
+
return (
|
|
45
|
+
0.0,
|
|
46
|
+
"The grader was unable to generate test cases for your implementation. This suggests a bug with your code, please revise your solution and try again.",
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
failed_cases = [t for t in test_cases if t.failed]
|
|
44
50
|
score = 1.0 - len(failed_cases) / num_cases
|
|
45
51
|
feedback_msg = "All tests passed! Congratulations!"
|
|
46
52
|
|
|
@@ -68,7 +74,7 @@ def compute_aggregated_grading_score(
|
|
|
68
74
|
for test_cases in aggregated_test_cases:
|
|
69
75
|
feedback_msg = f"All tests passed for {test_cases.test_name}!\n"
|
|
70
76
|
num_cases = len(test_cases.tests)
|
|
71
|
-
failed_cases = [t for t in test_cases.tests if t.failed
|
|
77
|
+
failed_cases = [t for t in test_cases.tests if t.failed]
|
|
72
78
|
score = 1.0 - len(failed_cases) / num_cases
|
|
73
79
|
score = round(score, 2)
|
|
74
80
|
scores.append(score)
|
|
@@ -117,7 +123,7 @@ def print_feedback(test_cases: List[test_case]) -> None:
|
|
|
117
123
|
Args:
|
|
118
124
|
test_cases (List[test_case]): List of public test cases.
|
|
119
125
|
"""
|
|
120
|
-
failed_cases = [t for t in test_cases if t.failed
|
|
126
|
+
failed_cases = [t for t in test_cases if t.failed]
|
|
121
127
|
feedback_msg = "\033[92m All tests passed!"
|
|
122
128
|
|
|
123
129
|
if failed_cases:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|