-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: Allow multiple ML models to be preloaded #15418
Conversation
machine-learning/app/main.py
Outdated
@@ -77,29 +77,31 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]: | |||
async def preload_models(preload: PreloadModelData) -> None: | |||
log.info(f"Preloading models: clip:{preload.clip} facial_recognition:{preload.facial_recognition}") | |||
|
|||
async def load_models(model_string: str, model_type: "ModelType", model_task: "ModelTask") -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the quoted types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason I thought they were required.
Quotes have been removed, however I have not tested this latest version yet as I've made changes on mobile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found time to run it locally. It seems to load models as desired
Co-authored-by: Mert <[email protected]>
Add support for a comma separated values in ML preload environment variables