Refactor to support API prefixed Model example I/O files #1493
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for taking your time to contribute to Ersilia, just a few checks before we proceed
Description
This PR refactors Ersilia to support the handling of model example input and output files, ensuring backward compatibility with the previously used input.csv and output.csv filenames. It introduces changes to accommodate the new file naming convention with a run_ prefix (e.g., run_input.csv, run_output.csv), while still maintaining support for models that use the old naming convention.
This is part of the ongoing effort to support multiple APIs within Ersilia models and provide flexibility for future extensions.
Changes to be made
run_input.csv
andrun_output.csv
alongside the existinginput.csv
andoutput.csv
.PREDEFINED_EXAMPLE_FILES
indefault.py
to include the new file naming conventions.run_input.csv
andrun_output.csv
during the build process, ensuring they are available in the container for model inference._write_api_schema
to handle the new example files(run_input.csv and run_output.csv)
in addition to the old files.input.csv
andoutput.csv
files continue to function without modification, while working towards renaming the files to include run prefix in model repositories.Status
Ongoing
To do
Related to #74