Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validating output files without an accompanying metadata file #138

Closed
elray1 opened this issue Oct 29, 2024 · 3 comments · Fixed by #144
Closed

validating output files without an accompanying metadata file #138

elray1 opened this issue Oct 29, 2024 · 3 comments · Fixed by #144

Comments

@elray1
Copy link
Contributor

elray1 commented Oct 29, 2024

If I try to validate a model output file without an accompanying metadata file, I get an early exit before most checks are performed:

> hubValidations::validate_submission(
+     hub_path = ".",
+     file_path = file.path("example-submission", paste0(reference_date, "-example-submission.csv")),
+     skip_submit_window_check = TRUE
+ )

── FluSight-forecast-hub ────

✔ [valid_config]: All hub config files are valid.

── 2024-11-16-example-submission.csv ────

✔ [file_exists]: File exists at path model-output/example-submission/2024-11-16-example-submission.csv.
✔ [file_name]: File name "2024-11-16-example-submission.csv" is valid.
✔ [file_location]: File directory name matches `model_id` metadata in file name.
✔ [round_id_valid]: `round_id` is valid.
✔ [file_format]: File is accepted hub format.
ⓧ [metadata_exists]: Metadata file does not exist at path model-metadata/example-submission.yml or
  model-metadata/example-submission.yaml.

I would think that most of the remaining checks would not depend on the existence of a model metadata file. Is there any way to get around this?

@zkamvar
Copy link
Member

zkamvar commented Oct 29, 2024

Would the proposal of a validate_model_tbl() function in #130 help? This would allow you to circumvent the need to write the table to a file if you are iterating.

@elray1
Copy link
Contributor Author

elray1 commented Oct 29, 2024

That would certainly help! I am also wondering if this is something where that check is resulting an error that results in halting the validations process, where we could change it to a non-halting failure.

@annakrystalli
Copy link
Member

Agreed, early return is a bit excessive for this. Fixed in #144

As an aside, you could use validate_model_data() to just validate file contents.

@annakrystalli annakrystalli moved this from Todo to Ready for Review in hubverse Development overview Oct 30, 2024
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in hubverse Development overview Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
3 participants