You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I want to load my finetuned model which I have fine-tuned using the GenericLoraModel class. But when I try to load the saved model using GenericLoraModel.load("local_path") I got the following error.
Hi,
I want to load my finetuned model which I have fine-tuned using the GenericLoraModel class. But when I try to load the saved model using GenericLoraModel.load("local_path") I got the following error.
in <module> │ │ │ │ 1 from xturing.models.base import BaseModel │ │ 2 │ │ ❱ 3 model = BaseModel.load("saved_model/") │ │ 4 │ │ │ │ /usr/local/lib/python3.9/dist-packages/xturing/models/base.py:24 in load │ │ │ │ 21 │ │ │ return cls.load_from_local(weights_dir_or_model_name) │ │ 22 │ │ else: │ │ 23 │ │ │ print("Loading model from xTuring hub") │ │ ❱ 24 │ │ │ return cls.load_from_hub(weights_dir_or_model_name) │ │ 25 │ │ │ 26 │ @classmethod │ │ 27 │ def load_from_hub(cls, model_name): │ │ │ │ /usr/local/lib/python3.9/dist-packages/xturing/models/base.py:29 in load_from_hub │ │ │ │ 26 │ @classmethod │ │ 27 │ def load_from_hub(cls, model_name): │ │ 28 │ │ hub = ModelHub() │ │ ❱ 29 │ │ model_path = hub.load(model_name) │ │ 30 │ │ return cls.load_from_local(model_path) │ │ 31 │ │ │ 32 │ @classmethod │ │ │ │ /usr/local/lib/python3.9/dist-packages/xturing/utils/hub.py:27 in load │ │ │ │ 24 │ │ return item[len(self.prefix) :], self.static_path_map[item[len(self.prefix) :]] │ │ 25 │ │ │ 26 │ def load(self, path: str): │ │ ❱ 27 │ │ model_name, url = self[path] │ │ 28 │ │ model_dir = self.cache_path / model_name │ │ 29 │ │ │ │ 30 │ │ if not model_dir.exists(): │ │ │ │ /usr/local/lib/python3.9/dist-packages/xturing/utils/hub.py:21 in __getitem__ │ │ │ │ 18 │ │ │ 19 │ def __getitem__(self, item: str): │ │ 20 │ │ if item[: len(self.prefix)] != self.prefix: │ │ ❱ 21 │ │ │ raise ValueError( │ │ 22 │ │ │ │ f"Hub path {item} does not start with {self.prefix}, so it is not a vali │ │ 23 │ │ │ ) │ │ 24 │ │ return item[len(self.prefix) :], self.static_path_map[item[len(self.prefix) :]] │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: Hub path saved_model/ does not start with x/, so it is not a valid hub path.
The text was updated successfully, but these errors were encountered: