From b05a1528f038cd5b31ea3d1eb74e8c639e30649a Mon Sep 17 00:00:00 2001 From: Wauplin Date: Thu, 30 Jan 2025 14:34:25 +0100 Subject: [PATCH] Replace deprecated update_repo_visibility --- setup.py | 2 +- src/transformers/dependency_versions_table.py | 2 +- tests/utils/test_modeling_utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 0fce910aa89d..39ddbf7f1852 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ "fugashi>=1.0", "GitPython<3.1.19", "hf-doc-builder>=0.3.0", - "huggingface-hub>=0.24.0,<1.0", + "huggingface-hub>=0.26.0,<1.0", "importlib_metadata", "ipadic>=1.0.0,<2.0", "isort>=5.5.4", diff --git a/src/transformers/dependency_versions_table.py b/src/transformers/dependency_versions_table.py index 6edc38351670..3a35919e9758 100644 --- a/src/transformers/dependency_versions_table.py +++ b/src/transformers/dependency_versions_table.py @@ -24,7 +24,7 @@ "fugashi": "fugashi>=1.0", "GitPython": "GitPython<3.1.19", "hf-doc-builder": "hf-doc-builder>=0.3.0", - "huggingface-hub": "huggingface-hub>=0.24.0,<1.0", + "huggingface-hub": "huggingface-hub>=0.26.0,<1.0", "importlib_metadata": "importlib_metadata", "ipadic": "ipadic>=1.0.0,<2.0", "isort": "isort>=5.5.4", diff --git a/tests/utils/test_modeling_utils.py b/tests/utils/test_modeling_utils.py index dd52927a250b..da6847775b39 100644 --- a/tests/utils/test_modeling_utils.py +++ b/tests/utils/test_modeling_utils.py @@ -1981,7 +1981,7 @@ def test_safetensors_on_the_fly_wrong_user_opened_pr(self): self.assertEqual(discussion.title, "Adding `safetensors` variant of this model") # We now switch the repo visibility to public - self.api.update_repo_visibility(self.repo_name, private=False) + self.api.update_repo_settings(self.repo_name, private=False) # We once again call from_pretrained, which should call the bot to open a PR BertModel.from_pretrained(self.repo_name, use_safetensors=True, token=self.token)