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
224 stars 148 forks source link

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

Closed DhanshreeA closed 1 month ago

DhanshreeA commented 5 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 2 months 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 1 month 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 1 month ago

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