Next: Allow in place local installs of models

This commit is contained in:
Brandon Rising
2024-02-29 15:13:38 -05:00
committed by psychedelicious
parent f6028a4c61
commit 893bcd16fc
2 changed files with 4 additions and 1 deletions

View File

@ -451,6 +451,7 @@ async def add_model_record(
)
async def install_model(
source: str = Query(description="Model source to install, can be a local path, repo_id, or remote URL"),
inplace: Optional[bool] = Query(description="Whether or not to install a local model in place", default=False),
# TODO(MM2): Can we type this?
config: Optional[Dict[str, Any]] = Body(
description="Dict of fields that override auto-probed values in the model config record, such as name, description and prediction_type ",
@ -493,6 +494,7 @@ async def install_model(
source=source,
config=config,
access_token=access_token,
inplace=bool(inplace),
)
logger.info(f"Started installation of {source}")
except UnknownModelException as e: