From b3b486bd24aa45bdd50a7c8a5bbaafa1fc2599c2 Mon Sep 17 00:00:00 2001 From: FangYin Cheng Date: Fri, 20 Oct 2023 17:25:35 +0800 Subject: [PATCH] fix(model): Fix embedding start error --- pilot/model/cluster/manager_base.py | 6 +++++- setup.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pilot/model/cluster/manager_base.py b/pilot/model/cluster/manager_base.py index 80170ce2f..bcbfe5099 100644 --- a/pilot/model/cluster/manager_base.py +++ b/pilot/model/cluster/manager_base.py @@ -28,7 +28,11 @@ class WorkerRunData: def _to_print_key(self): model_name = self.model_params.model_name - model_type = self.model_params.model_type + model_type = ( + self.model_params.model_type + if hasattr(self.model_params, "model_type") + else "text2vec" + ) host = self.host port = self.port return f"model {model_name}@{model_type}({host}:{port})" diff --git a/setup.py b/setup.py index 2a343c7ef..2c807b010 100644 --- a/setup.py +++ b/setup.py @@ -316,6 +316,7 @@ def core_requires(): "jsonschema", # TODO move transformers to default "transformers>=4.31.0", + "alembic==1.12.0", ] @@ -424,7 +425,6 @@ def default_requires(): "dashscope", "chardet", "GitPython", - "alembic==1.12.0", ] setup_spec.extras["default"] += setup_spec.extras["framework"] setup_spec.extras["default"] += setup_spec.extras["knowledge"]