ersilia-os / ersilia

The Ersilia Model Hub, a repository of AI/ML models for infectious and neglected disease research.
https://ersilia.io
GNU General Public License v3.0
203 stars 131 forks source link

🐕 Batch: Make Ersilia CLI work with new Packing strategy #1140

Closed DhanshreeA closed 3 days ago

DhanshreeA commented 3 months ago

Summary

Ersilia CLI needs to evolve with the new packing strategy and use the correct one when fetching and serving a model.

Objective(s)

Documentation

No response

GemmaTuron commented 1 week ago

Hi @DhanshreeA

A lot of work has been done in that front. Please update this issue with all the changes and new features before closing it when it is complete.

DhanshreeA commented 3 days ago

Ersilia now has the functionality to both figure out which way a model is packed, or be forced to fetch a model in a way that it is packed with FastAPI, or BentoML.

The resolution happens by way of a TemplateResolver class where Ersilia inspects the file structure of the given model to determine whether to use FastAPI (aka, the new template + ersilia pack format), or to use BentoML (aka, the legacy template + bentoml format) to pack a model while fetching it.

Alternatively, users can also make this decision for ersilia by setting the following flags: --with_fastapi, or --with_bentoml.

GemmaTuron commented 3 days ago

I will close this as completed but documentation is still pending.