Spaces:
Runtime error
Runtime error
Fix validation (allow newline at end).
Browse files
src/validation/validate.py
CHANGED
|
@@ -74,7 +74,7 @@ def is_submission_file_valid(submission_path: str) -> bool:
|
|
| 74 |
logger.warning(f"Got submission with more than {MAX_SUBMISSION_LINES} lines")
|
| 75 |
return False
|
| 76 |
|
| 77 |
-
if not line.startswith("{") or
|
| 78 |
logger.warning("Submission has line that does not appear to be a JSONL")
|
| 79 |
return False
|
| 80 |
|
|
|
|
| 74 |
logger.warning(f"Got submission with more than {MAX_SUBMISSION_LINES} lines")
|
| 75 |
return False
|
| 76 |
|
| 77 |
+
if not (line.startswith("{") and (line.endswith("}") or line.endswith("}\n"))):
|
| 78 |
logger.warning("Submission has line that does not appear to be a JSONL")
|
| 79 |
return False
|
| 80 |
|