tidy(mm): remove convenience methods from high level model manager service

These were added as a hold-me-over for the nodes API changes, no longer needed. A followup commit will fix the nodes API to not rely on these.
This commit is contained in:
psychedelicious
2024-03-06 19:04:33 +11:00
parent 4eefed12f0
commit afd9ae7712
5 changed files with 10 additions and 99 deletions

View File

@ -42,9 +42,10 @@ def install_and_load_model(
# If the requested model is already installed, return its LoadedModel
with contextlib.suppress(UnknownModelException):
# TODO: Replace with wrapper call
loaded_model: LoadedModel = model_manager.load_model_by_attr(
configs = model_manager.store.search_by_attr(
model_name=model_name, base_model=base_model, model_type=model_type
)
loaded_model: LoadedModel = model_manager.load.load_model(configs[0])
return loaded_model
# Install the requested model.
@ -53,7 +54,7 @@ def install_and_load_model(
assert job.complete
try:
loaded_model = model_manager.load_model_by_config(job.config_out)
loaded_model = model_manager.load.load_model(job.config_out)
return loaded_model
except UnknownModelException as e:
raise Exception(