galb-dai commited on
Commit
5d63385
·
1 Parent(s): 94eae63

Fix validation (allow newline at end).

Browse files
Files changed (1) hide show
  1. src/validation/validate.py +1 -1
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 not line.endswith("}"):
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