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

Refactor to support API prefixed Model example I/O files #1493

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Malikbadmus
Copy link
Contributor

@Malikbadmus Malikbadmus commented Jan 8, 2025

Thank you for taking your time to contribute to Ersilia, just a few checks before we proceed

  • Have you followed the guidelines in our Contribution Guide
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

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

  • Added support for run_input.csv and run_output.csv alongside the existing input.csv and output.csv.
  • Updated PREDEFINED_EXAMPLE_FILES in default.py to include the new file naming conventions.
  • Updated Dockerfile to copy both run_input.csv and run_output.csv during the build process, ensuring they are available in the container for model inference.
  • Modified _write_api_schema to handle the new example files (run_input.csv and run_output.csv) in addition to the old files.
  • Ensured that older models using the previous input.csv and output.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

dockerfiles/dockerize-ersiliapack/model/Dockerfile.conda Outdated Show resolved Hide resolved
dockerfiles/dockerize-ersiliapack/model/Dockerfile.pip Outdated Show resolved Hide resolved
ersilia/default.py Outdated Show resolved Hide resolved
@DhanshreeA
Copy link
Member

Thanks @Malikbadmus I think we can safely take the plunge into renaming everything and keeping just the new version.

@Malikbadmus
Copy link
Contributor Author

Malikbadmus commented Jan 13, 2025

Noted, @DhanshreeA. I will proceed with renaming the example files in the model repositories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants