Files
NexQuant/rdagent/scenarios/data_science/example/eval/arf-12-hours-prediction-task/valid.py
T
Linlang 81d0ac7185 docs: update data science docs (#1015)
* update data science docs part1

* update data science docs part2

* update data science docs part3

* update data science docs part4

* update data science docs part5

* format with isort

* update data science docs part6

* add check environment scripts

* format with isort

* format with isort

* merge env_check to health_check

* format with isort

* format with black

* optimize code

* use boolean cli options

* replace fire with typer

* replace fire with typer

* optimizing parameter and variable naming
2025-07-19 18:35:24 +08:00

22 lines
653 B
Python

from pathlib import Path
# Check if our submission file exists
assert Path("submission.csv").exists(), "Error: submission.csv not found"
submission_lines = Path("submission.csv").read_text().splitlines()
test_lines = Path("submission_test.csv").read_text().splitlines()
is_valid = len(submission_lines) == len(test_lines)
if is_valid:
message = "submission.csv and submission_test.csv have the same number of lines."
else:
message = (
f"submission.csv has {len(submission_lines)} lines, while submission_test.csv has {len(test_lines)} lines."
)
print(message)
if not is_valid:
raise AssertionError("Submission is invalid")