From 9c7e6d0d7a870cc7fd312a51f8cbb16b6d93d9f5 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Mon, 14 Oct 2024 16:25:39 +0200 Subject: [PATCH 1/9] running CI with python 3.12 --- .github/workflows/build_repocard_examples.yaml | 2 +- .github/workflows/python-tests.yml | 12 ++++++------ docs/source/cn/installation.md | 2 +- docs/source/de/installation.md | 2 +- docs/source/en/installation.md | 2 +- docs/source/fr/installation.md | 6 +++--- docs/source/hi/installation.md | 2 +- docs/source/ko/installation.md | 2 +- setup.py | 1 + 9 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_repocard_examples.yaml b/.github/workflows/build_repocard_examples.yaml index 03d9f91861..feea0aa9f1 100644 --- a/.github/workflows/build_repocard_examples.yaml +++ b/.github/workflows/build_repocard_examples.yaml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.11 + python-version: 3.12 # Install dependencies - name: Configure and install dependencies diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 2bce55d2c6..b9fcfa04af 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.11"] + python-version: ["3.8", "3.12"] test_name: [ "Repository only", @@ -30,16 +30,16 @@ jobs: "torch_latest", ] include: - - python-version: "3.11" # LFS not ran on 3.8 + - python-version: "3.12" # LFS not ran on 3.8 test_name: "lfs" - python-version: "3.8" - test_name: "fastai" # fastai not supported on 3.11 -> test it on 3.10 - - python-version: "3.10" + test_name: "fastai" + - python-version: "3.10" # fastai not supported on 3.12 and 3.11 -> test it on 3.10 test_name: "fastai" - python-version: "3.8" - test_name: "tensorflow" # Tensorflow not supported on 3.11 -> test it on 3.10 - - python-version: "3.10" test_name: "tensorflow" + - python-version: "3.11" + test_name: "tensorflow" # Tensorflow not supported on 3.12 -> test it on 3.11 steps: - uses: actions/checkout@v2 diff --git a/docs/source/cn/installation.md b/docs/source/cn/installation.md index 8c58425670..c46de7ce52 100644 --- a/docs/source/cn/installation.md +++ b/docs/source/cn/installation.md @@ -97,7 +97,7 @@ cd huggingface_hub pip install -e . ``` -这些命令将你克隆存储库的文件夹与你的 Python 库路径链接起来。Python 现在将除了正常的库路径之外,还会在你克隆到的文件夹中查找。例如,如果你的 Python 包通常安装在`./.venv/lib/python3.11/site-packages/`中,Python 还会搜索你克隆的文件夹`./huggingface_hub/` +这些命令将你克隆存储库的文件夹与你的 Python 库路径链接起来。Python 现在将除了正常的库路径之外,还会在你克隆到的文件夹中查找。例如,如果你的 Python 包通常安装在`./.venv/lib/python3.12/site-packages/`中,Python 还会搜索你克隆的文件夹`./huggingface_hub/` ## 通过 conda 安装 diff --git a/docs/source/de/installation.md b/docs/source/de/installation.md index 9dc4d62ba5..0a00c15d10 100644 --- a/docs/source/de/installation.md +++ b/docs/source/de/installation.md @@ -90,7 +90,7 @@ cd huggingface_hub pip install -e . ``` -Diese Befehle verknüpfen den Ordner, in den Sie das Repository geklont haben, mit Ihren Python-Bibliothekspfaden. Python wird nun zusätzlich zu den normalen Bibliothekspfaden im geklonten Ordner suchen. Wenn Ihre Python-Pakete normalerweise in `./.venv/lib/python3.11/site-packages/` installiert sind, wird Python auch den geklonten Ordner `./huggingface_hub/` durchsuchen. +Diese Befehle verknüpfen den Ordner, in den Sie das Repository geklont haben, mit Ihren Python-Bibliothekspfaden. Python wird nun zusätzlich zu den normalen Bibliothekspfaden im geklonten Ordner suchen. Wenn Ihre Python-Pakete normalerweise in `./.venv/lib/python3.12/site-packages/` installiert sind, wird Python auch den geklonten Ordner `./huggingface_hub/` durchsuchen. ## Installieren mit conda diff --git a/docs/source/en/installation.md b/docs/source/en/installation.md index 47e672a576..c769d75fbe 100644 --- a/docs/source/en/installation.md +++ b/docs/source/en/installation.md @@ -104,7 +104,7 @@ pip install -e . These commands will link the folder you cloned the repository to and your Python library paths. Python will now look inside the folder you cloned to in addition to the normal library paths. -For example, if your Python packages are typically installed in `./.venv/lib/python3.11/site-packages/`, +For example, if your Python packages are typically installed in `./.venv/lib/python3.12/site-packages/`, Python will also search the folder you cloned `./huggingface_hub/`. ## Install with conda diff --git a/docs/source/fr/installation.md b/docs/source/fr/installation.md index 4531cc6d67..a06a838a95 100644 --- a/docs/source/fr/installation.md +++ b/docs/source/fr/installation.md @@ -59,7 +59,7 @@ pip install 'huggingface_hub[cli,torch]' Voici une liste des dépendances optionnelles dans `huggingface_hub`: - `cli` fournit une interface d'invite de commande plus pratique pour `huggingface_hub`. - `fastai`, `torch` et `tensorflow` sont des dépendances pour utiliser des fonctionnalités spécifiques à un framework. -- `dev` permet de contribuer à la librairie. Cette dépendance inclut `testing` (pour lancer des tests), `typing` (pour lancer le vérifieur de type) et `quality` (pour lancer des linters). +- `dev` permet de contribuer à la librairie. Cette dépendance inclut `testing` (pour lancer des tests), `typing` (pour lancer le vérifieur de type) et `quality` (pour lancer des linters). @@ -104,7 +104,7 @@ pip install -e . Python regardera maintenant à l'intérieur du dossier dans lequel vous avez cloné le dépôt en plus des chemins de librairie classiques. Par exemple, si vos packages Python sont installés dans -`./.venv/lib/python3.11/site-packages/`, Python regardera aussi dans le dossier que vous avez +`./.venv/lib/python3.12/site-packages/`, Python regardera aussi dans le dossier que vous avez cloné `./huggingface_hub/`. ## Installation avec conda @@ -158,4 +158,4 @@ pour que nous cherchions une solution. Une fois que `huggingface_hub` est installé correctement sur votre machine, vous aurez peut-être besoin de [configurer les variables d'environnement](package_reference/environment_variables) ou de [lire un de nos guides](guides/overview) -pour vous lancer. \ No newline at end of file +pour vous lancer. diff --git a/docs/source/hi/installation.md b/docs/source/hi/installation.md index cf145b1484..d154d0fc5a 100644 --- a/docs/source/hi/installation.md +++ b/docs/source/hi/installation.md @@ -103,7 +103,7 @@ pip install -e . ये कमांड उस फ़ोल्डर को लिंक करेंगे जिसे आपने रिपॉजिटरी में क्लोन किया है और आपके पायथन लाइब्रेरी पथ। पाइथॉन अब सामान्य लाइब्रेरी पथों के अलावा आपके द्वारा क्लोन किए गए फ़ोल्डर के अंदर भी देखेगा। -उदाहरण के लिए, यदि आपके पायथन पैकेज आमतौर पर `./.venv/lib/python3.11/site-packages/` में स्थापित हैं, +उदाहरण के लिए, यदि आपके पायथन पैकेज आमतौर पर `./.venv/lib/python3.12/site-packages/` में स्थापित हैं, पायथन आपके द्वारा क्लोन किए गए फ़ोल्डर `./huggingface_hub/` को भी खोजेगा। ## कोंडा के साथ स्थापित करें diff --git a/docs/source/ko/installation.md b/docs/source/ko/installation.md index bc5329c2ce..346189835a 100644 --- a/docs/source/ko/installation.md +++ b/docs/source/ko/installation.md @@ -94,7 +94,7 @@ pip install -e . 이렇게 클론한 레포지토리 폴더와 Python 경로를 연결합니다. 이제 Python은 일반적인 라이브러리 경로 외에도 복제된 폴더 내부를 찾습니다. -예를 들어 파이썬 패키지가 일반적으로 `./.venv/lib/python3.11/site-packages/`에 설치되어 있다면, Python은 복제된 폴더 `./huggingface_hub/`도 검색하게 됩니다. +예를 들어 파이썬 패키지가 일반적으로 `./.venv/lib/python3.12/site-packages/`에 설치되어 있다면, Python은 복제된 폴더 `./huggingface_hub/`도 검색하게 됩니다. ## conda로 설치하기 [[install-with-conda]] diff --git a/setup.py b/setup.py index 373e3119cf..069651780f 100644 --- a/setup.py +++ b/setup.py @@ -134,6 +134,7 @@ def get_version() -> str: "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Artificial Intelligence", ], include_package_data=True, From e8bdefc901e153f0d495061c710ac08c57fd0f8c Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Mon, 14 Oct 2024 16:34:50 +0200 Subject: [PATCH 2/9] test tensorflow with python 3.12 --- .github/workflows/python-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index b9fcfa04af..da2895a3ac 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -38,8 +38,8 @@ jobs: test_name: "fastai" - python-version: "3.8" test_name: "tensorflow" - - python-version: "3.11" - test_name: "tensorflow" # Tensorflow not supported on 3.12 -> test it on 3.11 + - python-version: "3.12" + test_name: "tensorflow" steps: - uses: actions/checkout@v2 From cadad99c12cbf7dde8847e83025b5b10088da84b Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Mon, 14 Oct 2024 16:50:20 +0200 Subject: [PATCH 3/9] remove deprecated assertEquals --- tests/test_snapshot_download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_snapshot_download.py b/tests/test_snapshot_download.py index 4edca4d60e..727dfd8aab 100644 --- a/tests/test_snapshot_download.py +++ b/tests/test_snapshot_download.py @@ -150,7 +150,7 @@ def test_download_model_local_only(self): snapshot_download(self.repo_id, local_dir=tmpdir) # now load from local_dir storage_folder = snapshot_download(self.repo_id, local_dir=tmpdir, local_files_only=True) - self.assertEquals(str(tmpdir), storage_folder) + self.assertEqual(str(tmpdir), storage_folder) def test_download_model_to_local_dir_with_offline_mode(self): """Test that an already downloaded folder is returned when there is a connection error""" @@ -161,7 +161,7 @@ def test_download_model_to_local_dir_with_offline_mode(self): for offline_mode in OfflineSimulationMode: with offline(mode=offline_mode): storage_folder = snapshot_download(self.repo_id, local_dir=tmpdir) - self.assertEquals(str(tmpdir), storage_folder) + self.assertEqual(str(tmpdir), storage_folder) def test_download_model_offline_mode_not_in_local_dir(self): """Test when connection error but local_dir is empty.""" From 37ba41ce42822936d521d56fb6c0a32c4bfc16a0 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Mon, 14 Oct 2024 18:40:00 +0200 Subject: [PATCH 4/9] run torch 1.* tests only on python 3.8 --- .github/workflows/python-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index da2895a3ac..52a920b91d 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -26,7 +26,6 @@ jobs: [ "Repository only", "Everything else", - "torch_1.11", "torch_latest", ] include: @@ -38,9 +37,10 @@ jobs: test_name: "fastai" - python-version: "3.8" test_name: "tensorflow" - - python-version: "3.12" + - python-version: "3.10" # tensorflow not supported on 3.12 -> test it on 3.10 test_name: "tensorflow" - + - python-version: "3.8" # test torch~=1.11 on python 3.8 only. + test_name: "Python 3.8, torch_1.11" steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -81,7 +81,7 @@ jobs: uv pip install --upgrade torch ;; - torch_1.11) + Python 3.8, torch_1.11) uv pip install "huggingface_hub[torch] @ ." uv pip install torch~=1.11 ;; From e8864e08ad13c02a14fae0cd96eb5a4e1b170742 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Mon, 14 Oct 2024 21:47:36 +0200 Subject: [PATCH 5/9] fix workflow --- .github/workflows/python-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 52a920b91d..25dc2c0583 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -81,7 +81,7 @@ jobs: uv pip install --upgrade torch ;; - Python 3.8, torch_1.11) + "Python 3.8, torch_1.11") uv pip install "huggingface_hub[torch] @ ." uv pip install torch~=1.11 ;; @@ -132,7 +132,7 @@ jobs: eval "$PYTEST ../tests/test_serialization.py" ;; - torch_1.11 | torch_latest) + "Python 3.8, torch_1.11" | torch_latest) eval "$PYTEST ../tests/test_hub_mixin*" eval "$PYTEST ../tests/test_serialization.py" ;; From 6b1494dd6c6542c7c963acc5d53fdce92d92a493 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 15 Oct 2024 14:33:33 +0200 Subject: [PATCH 6/9] skip completion test --- tests/test_init_lazy_loading.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_init_lazy_loading.py b/tests/test_init_lazy_loading.py index 9312543128..203ec8e489 100644 --- a/tests/test_init_lazy_loading.py +++ b/tests/test_init_lazy_loading.py @@ -4,6 +4,9 @@ class TestHuggingfaceHubInit(unittest.TestCase): + @unittest.skip( + reason="`jedi.Completion.get_signatures()` returns different results whether run with python 3.12 or earlier" + ) def test_autocomplete_on_root_imports(self) -> None: """Test autocomplete with `huggingface_hub` works with Jedi. From 0a84ed63581c96f2e3f7808aa652d76e0b25e218 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 15 Oct 2024 14:40:15 +0200 Subject: [PATCH 7/9] update skipping comment --- tests/test_init_lazy_loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_init_lazy_loading.py b/tests/test_init_lazy_loading.py index 203ec8e489..cddf59e6ad 100644 --- a/tests/test_init_lazy_loading.py +++ b/tests/test_init_lazy_loading.py @@ -5,7 +5,7 @@ class TestHuggingfaceHubInit(unittest.TestCase): @unittest.skip( - reason="`jedi.Completion.get_signatures()` returns different results whether run with python 3.12 or earlier" + reason="`jedi.Completion.get_signatures()` output differs between Python 3.12 and earlier versions, affecting test consistency" ) def test_autocomplete_on_root_imports(self) -> None: """Test autocomplete with `huggingface_hub` works with Jedi. From e9a03bfe03dc93d2994382f297784fe9cc4f1ff4 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 15 Oct 2024 14:57:56 +0200 Subject: [PATCH 8/9] Run CI on python 3.13 and update docs --- .github/workflows/build_repocard_examples.yaml | 2 +- .github/workflows/python-tests.yml | 11 ++++++----- docs/source/cn/installation.md | 2 +- docs/source/de/installation.md | 2 +- docs/source/en/installation.md | 2 +- docs/source/fr/installation.md | 2 +- docs/source/hi/installation.md | 2 +- docs/source/ko/installation.md | 2 +- setup.py | 1 + tests/test_init_lazy_loading.py | 2 +- 10 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_repocard_examples.yaml b/.github/workflows/build_repocard_examples.yaml index feea0aa9f1..7cfcf37ea9 100644 --- a/.github/workflows/build_repocard_examples.yaml +++ b/.github/workflows/build_repocard_examples.yaml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.12 + python-version: 3.13 # Install dependencies - name: Configure and install dependencies diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 25dc2c0583..a86a26daf1 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -21,24 +21,25 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.12"] + python-version: ["3.8", "3.13"] test_name: [ "Repository only", "Everything else", - "torch_latest", ] include: - - python-version: "3.12" # LFS not ran on 3.8 + - python-version: "3.13" # LFS not ran on 3.8 test_name: "lfs" - python-version: "3.8" test_name: "fastai" - - python-version: "3.10" # fastai not supported on 3.12 and 3.11 -> test it on 3.10 + - python-version: "3.10" # fastai not supported on 3.13, 3.12 and 3.11 -> test it on 3.10 test_name: "fastai" - python-version: "3.8" test_name: "tensorflow" - - python-version: "3.10" # tensorflow not supported on 3.12 -> test it on 3.10 + - python-version: "3.10" # tensorflow not supported on 3.13 and 3.12 -> test it on 3.10 test_name: "tensorflow" + - python-version: "3.12" # torch not supported on 3.13 -> test it on 3.12 + test_name: "torch_latest" - python-version: "3.8" # test torch~=1.11 on python 3.8 only. test_name: "Python 3.8, torch_1.11" steps: diff --git a/docs/source/cn/installation.md b/docs/source/cn/installation.md index c46de7ce52..b7e0f06a46 100644 --- a/docs/source/cn/installation.md +++ b/docs/source/cn/installation.md @@ -97,7 +97,7 @@ cd huggingface_hub pip install -e . ``` -这些命令将你克隆存储库的文件夹与你的 Python 库路径链接起来。Python 现在将除了正常的库路径之外,还会在你克隆到的文件夹中查找。例如,如果你的 Python 包通常安装在`./.venv/lib/python3.12/site-packages/`中,Python 还会搜索你克隆的文件夹`./huggingface_hub/` +这些命令将你克隆存储库的文件夹与你的 Python 库路径链接起来。Python 现在将除了正常的库路径之外,还会在你克隆到的文件夹中查找。例如,如果你的 Python 包通常安装在`./.venv/lib/python3.13/site-packages/`中,Python 还会搜索你克隆的文件夹`./huggingface_hub/` ## 通过 conda 安装 diff --git a/docs/source/de/installation.md b/docs/source/de/installation.md index 0a00c15d10..1b3b32af29 100644 --- a/docs/source/de/installation.md +++ b/docs/source/de/installation.md @@ -90,7 +90,7 @@ cd huggingface_hub pip install -e . ``` -Diese Befehle verknüpfen den Ordner, in den Sie das Repository geklont haben, mit Ihren Python-Bibliothekspfaden. Python wird nun zusätzlich zu den normalen Bibliothekspfaden im geklonten Ordner suchen. Wenn Ihre Python-Pakete normalerweise in `./.venv/lib/python3.12/site-packages/` installiert sind, wird Python auch den geklonten Ordner `./huggingface_hub/` durchsuchen. +Diese Befehle verknüpfen den Ordner, in den Sie das Repository geklont haben, mit Ihren Python-Bibliothekspfaden. Python wird nun zusätzlich zu den normalen Bibliothekspfaden im geklonten Ordner suchen. Wenn Ihre Python-Pakete normalerweise in `./.venv/lib/python3.13/site-packages/` installiert sind, wird Python auch den geklonten Ordner `./huggingface_hub/` durchsuchen. ## Installieren mit conda diff --git a/docs/source/en/installation.md b/docs/source/en/installation.md index c769d75fbe..e6ca51028b 100644 --- a/docs/source/en/installation.md +++ b/docs/source/en/installation.md @@ -104,7 +104,7 @@ pip install -e . These commands will link the folder you cloned the repository to and your Python library paths. Python will now look inside the folder you cloned to in addition to the normal library paths. -For example, if your Python packages are typically installed in `./.venv/lib/python3.12/site-packages/`, +For example, if your Python packages are typically installed in `./.venv/lib/python3.13/site-packages/`, Python will also search the folder you cloned `./huggingface_hub/`. ## Install with conda diff --git a/docs/source/fr/installation.md b/docs/source/fr/installation.md index a06a838a95..2ba58e84bd 100644 --- a/docs/source/fr/installation.md +++ b/docs/source/fr/installation.md @@ -104,7 +104,7 @@ pip install -e . Python regardera maintenant à l'intérieur du dossier dans lequel vous avez cloné le dépôt en plus des chemins de librairie classiques. Par exemple, si vos packages Python sont installés dans -`./.venv/lib/python3.12/site-packages/`, Python regardera aussi dans le dossier que vous avez +`./.venv/lib/python3.13/site-packages/`, Python regardera aussi dans le dossier que vous avez cloné `./huggingface_hub/`. ## Installation avec conda diff --git a/docs/source/hi/installation.md b/docs/source/hi/installation.md index d154d0fc5a..c134796ae7 100644 --- a/docs/source/hi/installation.md +++ b/docs/source/hi/installation.md @@ -103,7 +103,7 @@ pip install -e . ये कमांड उस फ़ोल्डर को लिंक करेंगे जिसे आपने रिपॉजिटरी में क्लोन किया है और आपके पायथन लाइब्रेरी पथ। पाइथॉन अब सामान्य लाइब्रेरी पथों के अलावा आपके द्वारा क्लोन किए गए फ़ोल्डर के अंदर भी देखेगा। -उदाहरण के लिए, यदि आपके पायथन पैकेज आमतौर पर `./.venv/lib/python3.12/site-packages/` में स्थापित हैं, +उदाहरण के लिए, यदि आपके पायथन पैकेज आमतौर पर `./.venv/lib/python3.13/site-packages/` में स्थापित हैं, पायथन आपके द्वारा क्लोन किए गए फ़ोल्डर `./huggingface_hub/` को भी खोजेगा। ## कोंडा के साथ स्थापित करें diff --git a/docs/source/ko/installation.md b/docs/source/ko/installation.md index 346189835a..265d4c6842 100644 --- a/docs/source/ko/installation.md +++ b/docs/source/ko/installation.md @@ -94,7 +94,7 @@ pip install -e . 이렇게 클론한 레포지토리 폴더와 Python 경로를 연결합니다. 이제 Python은 일반적인 라이브러리 경로 외에도 복제된 폴더 내부를 찾습니다. -예를 들어 파이썬 패키지가 일반적으로 `./.venv/lib/python3.12/site-packages/`에 설치되어 있다면, Python은 복제된 폴더 `./huggingface_hub/`도 검색하게 됩니다. +예를 들어 파이썬 패키지가 일반적으로 `./.venv/lib/python3.13/site-packages/`에 설치되어 있다면, Python은 복제된 폴더 `./huggingface_hub/`도 검색하게 됩니다. ## conda로 설치하기 [[install-with-conda]] diff --git a/setup.py b/setup.py index 069651780f..88071dd43b 100644 --- a/setup.py +++ b/setup.py @@ -135,6 +135,7 @@ def get_version() -> str: "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Artificial Intelligence", ], include_package_data=True, diff --git a/tests/test_init_lazy_loading.py b/tests/test_init_lazy_loading.py index cddf59e6ad..af9e832fbe 100644 --- a/tests/test_init_lazy_loading.py +++ b/tests/test_init_lazy_loading.py @@ -5,7 +5,7 @@ class TestHuggingfaceHubInit(unittest.TestCase): @unittest.skip( - reason="`jedi.Completion.get_signatures()` output differs between Python 3.12 and earlier versions, affecting test consistency" + reason="`jedi.Completion.get_signatures()` output differs between Python >= 3.12 and < 3.12, affecting test consistency" ) def test_autocomplete_on_root_imports(self) -> None: """Test autocomplete with `huggingface_hub` works with Jedi. From 9998119588b4f5dfb6f5c7e25492b46846da1749 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 15 Oct 2024 15:13:29 +0200 Subject: [PATCH 9/9] Revert "Run CI on python 3.13 and update docs" This reverts commit e9a03bfe03dc93d2994382f297784fe9cc4f1ff4. --- .github/workflows/build_repocard_examples.yaml | 2 +- .github/workflows/python-tests.yml | 11 +++++------ docs/source/cn/installation.md | 2 +- docs/source/de/installation.md | 2 +- docs/source/en/installation.md | 2 +- docs/source/fr/installation.md | 2 +- docs/source/hi/installation.md | 2 +- docs/source/ko/installation.md | 2 +- setup.py | 1 - tests/test_init_lazy_loading.py | 2 +- 10 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_repocard_examples.yaml b/.github/workflows/build_repocard_examples.yaml index 7cfcf37ea9..feea0aa9f1 100644 --- a/.github/workflows/build_repocard_examples.yaml +++ b/.github/workflows/build_repocard_examples.yaml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.13 + python-version: 3.12 # Install dependencies - name: Configure and install dependencies diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index a86a26daf1..25dc2c0583 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -21,25 +21,24 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.13"] + python-version: ["3.8", "3.12"] test_name: [ "Repository only", "Everything else", + "torch_latest", ] include: - - python-version: "3.13" # LFS not ran on 3.8 + - python-version: "3.12" # LFS not ran on 3.8 test_name: "lfs" - python-version: "3.8" test_name: "fastai" - - python-version: "3.10" # fastai not supported on 3.13, 3.12 and 3.11 -> test it on 3.10 + - python-version: "3.10" # fastai not supported on 3.12 and 3.11 -> test it on 3.10 test_name: "fastai" - python-version: "3.8" test_name: "tensorflow" - - python-version: "3.10" # tensorflow not supported on 3.13 and 3.12 -> test it on 3.10 + - python-version: "3.10" # tensorflow not supported on 3.12 -> test it on 3.10 test_name: "tensorflow" - - python-version: "3.12" # torch not supported on 3.13 -> test it on 3.12 - test_name: "torch_latest" - python-version: "3.8" # test torch~=1.11 on python 3.8 only. test_name: "Python 3.8, torch_1.11" steps: diff --git a/docs/source/cn/installation.md b/docs/source/cn/installation.md index b7e0f06a46..c46de7ce52 100644 --- a/docs/source/cn/installation.md +++ b/docs/source/cn/installation.md @@ -97,7 +97,7 @@ cd huggingface_hub pip install -e . ``` -这些命令将你克隆存储库的文件夹与你的 Python 库路径链接起来。Python 现在将除了正常的库路径之外,还会在你克隆到的文件夹中查找。例如,如果你的 Python 包通常安装在`./.venv/lib/python3.13/site-packages/`中,Python 还会搜索你克隆的文件夹`./huggingface_hub/` +这些命令将你克隆存储库的文件夹与你的 Python 库路径链接起来。Python 现在将除了正常的库路径之外,还会在你克隆到的文件夹中查找。例如,如果你的 Python 包通常安装在`./.venv/lib/python3.12/site-packages/`中,Python 还会搜索你克隆的文件夹`./huggingface_hub/` ## 通过 conda 安装 diff --git a/docs/source/de/installation.md b/docs/source/de/installation.md index 1b3b32af29..0a00c15d10 100644 --- a/docs/source/de/installation.md +++ b/docs/source/de/installation.md @@ -90,7 +90,7 @@ cd huggingface_hub pip install -e . ``` -Diese Befehle verknüpfen den Ordner, in den Sie das Repository geklont haben, mit Ihren Python-Bibliothekspfaden. Python wird nun zusätzlich zu den normalen Bibliothekspfaden im geklonten Ordner suchen. Wenn Ihre Python-Pakete normalerweise in `./.venv/lib/python3.13/site-packages/` installiert sind, wird Python auch den geklonten Ordner `./huggingface_hub/` durchsuchen. +Diese Befehle verknüpfen den Ordner, in den Sie das Repository geklont haben, mit Ihren Python-Bibliothekspfaden. Python wird nun zusätzlich zu den normalen Bibliothekspfaden im geklonten Ordner suchen. Wenn Ihre Python-Pakete normalerweise in `./.venv/lib/python3.12/site-packages/` installiert sind, wird Python auch den geklonten Ordner `./huggingface_hub/` durchsuchen. ## Installieren mit conda diff --git a/docs/source/en/installation.md b/docs/source/en/installation.md index e6ca51028b..c769d75fbe 100644 --- a/docs/source/en/installation.md +++ b/docs/source/en/installation.md @@ -104,7 +104,7 @@ pip install -e . These commands will link the folder you cloned the repository to and your Python library paths. Python will now look inside the folder you cloned to in addition to the normal library paths. -For example, if your Python packages are typically installed in `./.venv/lib/python3.13/site-packages/`, +For example, if your Python packages are typically installed in `./.venv/lib/python3.12/site-packages/`, Python will also search the folder you cloned `./huggingface_hub/`. ## Install with conda diff --git a/docs/source/fr/installation.md b/docs/source/fr/installation.md index 2ba58e84bd..a06a838a95 100644 --- a/docs/source/fr/installation.md +++ b/docs/source/fr/installation.md @@ -104,7 +104,7 @@ pip install -e . Python regardera maintenant à l'intérieur du dossier dans lequel vous avez cloné le dépôt en plus des chemins de librairie classiques. Par exemple, si vos packages Python sont installés dans -`./.venv/lib/python3.13/site-packages/`, Python regardera aussi dans le dossier que vous avez +`./.venv/lib/python3.12/site-packages/`, Python regardera aussi dans le dossier que vous avez cloné `./huggingface_hub/`. ## Installation avec conda diff --git a/docs/source/hi/installation.md b/docs/source/hi/installation.md index c134796ae7..d154d0fc5a 100644 --- a/docs/source/hi/installation.md +++ b/docs/source/hi/installation.md @@ -103,7 +103,7 @@ pip install -e . ये कमांड उस फ़ोल्डर को लिंक करेंगे जिसे आपने रिपॉजिटरी में क्लोन किया है और आपके पायथन लाइब्रेरी पथ। पाइथॉन अब सामान्य लाइब्रेरी पथों के अलावा आपके द्वारा क्लोन किए गए फ़ोल्डर के अंदर भी देखेगा। -उदाहरण के लिए, यदि आपके पायथन पैकेज आमतौर पर `./.venv/lib/python3.13/site-packages/` में स्थापित हैं, +उदाहरण के लिए, यदि आपके पायथन पैकेज आमतौर पर `./.venv/lib/python3.12/site-packages/` में स्थापित हैं, पायथन आपके द्वारा क्लोन किए गए फ़ोल्डर `./huggingface_hub/` को भी खोजेगा। ## कोंडा के साथ स्थापित करें diff --git a/docs/source/ko/installation.md b/docs/source/ko/installation.md index 265d4c6842..346189835a 100644 --- a/docs/source/ko/installation.md +++ b/docs/source/ko/installation.md @@ -94,7 +94,7 @@ pip install -e . 이렇게 클론한 레포지토리 폴더와 Python 경로를 연결합니다. 이제 Python은 일반적인 라이브러리 경로 외에도 복제된 폴더 내부를 찾습니다. -예를 들어 파이썬 패키지가 일반적으로 `./.venv/lib/python3.13/site-packages/`에 설치되어 있다면, Python은 복제된 폴더 `./huggingface_hub/`도 검색하게 됩니다. +예를 들어 파이썬 패키지가 일반적으로 `./.venv/lib/python3.12/site-packages/`에 설치되어 있다면, Python은 복제된 폴더 `./huggingface_hub/`도 검색하게 됩니다. ## conda로 설치하기 [[install-with-conda]] diff --git a/setup.py b/setup.py index 88071dd43b..069651780f 100644 --- a/setup.py +++ b/setup.py @@ -135,7 +135,6 @@ def get_version() -> str: "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Artificial Intelligence", ], include_package_data=True, diff --git a/tests/test_init_lazy_loading.py b/tests/test_init_lazy_loading.py index af9e832fbe..cddf59e6ad 100644 --- a/tests/test_init_lazy_loading.py +++ b/tests/test_init_lazy_loading.py @@ -5,7 +5,7 @@ class TestHuggingfaceHubInit(unittest.TestCase): @unittest.skip( - reason="`jedi.Completion.get_signatures()` output differs between Python >= 3.12 and < 3.12, affecting test consistency" + reason="`jedi.Completion.get_signatures()` output differs between Python 3.12 and earlier versions, affecting test consistency" ) def test_autocomplete_on_root_imports(self) -> None: """Test autocomplete with `huggingface_hub` works with Jedi.