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

pre commit fixes #1567

Merged
merged 1 commit into from
Feb 25, 2025
Merged

pre commit fixes #1567

merged 1 commit into from
Feb 25, 2025

Conversation

miquelduranfrigola
Copy link
Member

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

Improved template resolver to use FastAPI as a prioritary option and deal with FastAPI versions.

Status
Done

Is this pull request related to any open issue? If yes, replace issueID below with the issue ID

Related to #1562

Copilot generated text below

This pull request introduces several changes to the ersilia package, focusing on enhancing FastAPI support, improving error handling, and adding new utility functions. Here are the most important changes:

Enhancements to FastAPI support:

  • Added FASTAPI_APPROVED_PYTHON_VERSIONS to the list of approved Python versions in ersilia/default.py.
  • Updated is_fastapi method in ersilia/hub/fetch/actions/template_resolver.py to include additional checks for required files and validate the Python version specified in the Dockerfile.

Error handling improvements:

  • Introduced a new exception class WithToolFetchingNotWorking in ersilia/utils/exceptions_utils/fetch_exceptions.py to handle cases where fetching with specific tools fails.
  • Updated _fetch_not_from_dockerhub method in ersilia/hub/fetch/fetch.py to raise WithToolFetchingNotWorking when fetching with FastAPI or BentoML fails.

Utility function additions:

  • Added _less_on_file method in ersilia/hub/fetch/register/standard_example.py to read and format a CSV file for logging purposes.

@miquelduranfrigola
Copy link
Member Author

@GemmaTuron I cannot merge this PR until we update the workflows of model eos3b5e. The reason for this is that it is failing due to outdated S3 data for that model.

@miquelduranfrigola
Copy link
Member Author

@GemmaTuron I have updated (some) workflows of eos3b5e manually, simply to have an S3 version that is in synch with the GitHub repository.

@miquelduranfrigola miquelduranfrigola merged commit 2cb8211 into master Feb 25, 2025
53 checks passed
@miquelduranfrigola miquelduranfrigola deleted the template-resolver-improvements branch February 25, 2025 13:05
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.

1 participant