From 690419d11f19f8b70f9c616d72b87b81e593b1c3 Mon Sep 17 00:00:00 2001 From: stephantul Date: Wed, 14 May 2025 08:16:55 +0200 Subject: [PATCH] fix: add default arg for push_to_hub --- model2vec/inference/model.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model2vec/inference/model.py b/model2vec/inference/model.py index 6dc6e5e..5e25d2d 100644 --- a/model2vec/inference/model.py +++ b/model2vec/inference/model.py @@ -65,7 +65,9 @@ def save_pretrained(self, path: str) -> None: """Save the model to a folder.""" save_pipeline(self, path) - def push_to_hub(self, repo_id: str, subfolder: str, token: str | None = None, private: bool = False) -> None: + def push_to_hub( + self, repo_id: str, subfolder: str | None = None, token: str | None = None, private: bool = False + ) -> None: """ Save a model to a folder, and then push that folder to the hf hub. @@ -219,6 +221,7 @@ def _load_pipeline( """ folder_or_repo_path = Path(folder_or_repo_path) model_filename = _DEFAULT_MODEL_FILENAME + head_pipeline_path: str | Path if folder_or_repo_path.exists(): head_pipeline_path = folder_or_repo_path / model_filename if not head_pipeline_path.exists():