huggingface-hub 0.29.0rc6__py3-none-any.whl → 0.29.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of huggingface-hub might be problematic. Click here for more details.

@@ -46,7 +46,7 @@ import sys
46
46
  from typing import TYPE_CHECKING
47
47
 
48
48
 
49
- __version__ = "0.29.0.rc6"
49
+ __version__ = "0.29.1"
50
50
 
51
51
  # Alphabetical order of definitions is ensured in tests
52
52
  # WARNING: any comment added in this dictionary definition will be lost when
@@ -207,16 +207,21 @@ class InferenceEndpoint:
207
207
 
208
208
  start = time.time()
209
209
  while True:
210
- if self.url is not None:
211
- # Means the URL is provisioned => check if the endpoint is reachable
212
- response = get_session().get(self.url, headers=self._api._build_hf_headers(token=self._token))
213
- if response.status_code == 200:
214
- logger.info("Inference Endpoint is ready to be used.")
215
- return self
216
210
  if self.status == InferenceEndpointStatus.FAILED:
217
211
  raise InferenceEndpointError(
218
212
  f"Inference Endpoint {self.name} failed to deploy. Please check the logs for more information."
219
213
  )
214
+ if self.status == InferenceEndpointStatus.UPDATE_FAILED:
215
+ raise InferenceEndpointError(
216
+ f"Inference Endpoint {self.name} failed to update. Please check the logs for more information."
217
+ )
218
+ if self.status == InferenceEndpointStatus.RUNNING and self.url is not None:
219
+ # Verify the endpoint is actually reachable
220
+ response = get_session().get(self.url, headers=self._api._build_hf_headers(token=self._token))
221
+ if response.status_code == 200:
222
+ logger.info("Inference Endpoint is ready to be used.")
223
+ return self
224
+
220
225
  if timeout is not None:
221
226
  if time.time() - start > timeout:
222
227
  raise InferenceEndpointTimeoutError("Timeout while waiting for Inference Endpoint to be deployed.")
@@ -25,6 +25,7 @@ from datetime import datetime
25
25
  from pathlib import Path
26
26
  from threading import Lock
27
27
  from typing import TYPE_CHECKING, List, Optional, Tuple, Union
28
+ from urllib.parse import quote
28
29
 
29
30
  from . import constants
30
31
  from ._commit_api import CommitOperationAdd, UploadInfo, _fetch_upload_modes
@@ -497,7 +498,7 @@ def _get_upload_mode(items: List[JOB_ITEM_T], api: "HfApi", repo_id: str, repo_t
497
498
  repo_type=repo_type,
498
499
  repo_id=repo_id,
499
500
  headers=api._build_hf_headers(),
500
- revision=revision,
501
+ revision=quote(revision, safe=""),
501
502
  )
502
503
  for item, addition in zip(items, additions):
503
504
  paths, metadata = item
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: huggingface-hub
3
- Version: 0.29.0rc6
3
+ Version: 0.29.1
4
4
  Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
5
5
  Home-page: https://github.com/huggingface/huggingface_hub
6
6
  Author: Hugging Face, Inc.
@@ -1,13 +1,13 @@
1
- huggingface_hub/__init__.py,sha256=IkiBA0pYv_9f-ibzxxx0c6ZAq8PQqCmY3_z61Lz9c9A,48765
1
+ huggingface_hub/__init__.py,sha256=T-o7tRMXCYjO5nPSgmN_PAVEpFlQTOp7gh-gh8ucXak,48761
2
2
  huggingface_hub/_commit_api.py,sha256=TqXmu5moVAhBa7iuyJdsqsfRTxTpGMnvsPkb4GgC3dc,32636
3
3
  huggingface_hub/_commit_scheduler.py,sha256=tfIoO1xWHjTJ6qy6VS6HIoymDycFPg0d6pBSZprrU2U,14679
4
- huggingface_hub/_inference_endpoints.py,sha256=PmW6IdIq9SAvlniPuyh3alKfahAmm4cyArQ_vrIcgQE,16992
4
+ huggingface_hub/_inference_endpoints.py,sha256=SLoZOQtv_hNl0Xuafo34L--zuCZ3zSJja2tSkYkG5V4,17268
5
5
  huggingface_hub/_local_folder.py,sha256=ScpCJUITFC0LMkiebyaGiBhAU6fvQK8w7pVV6L8rhmc,16575
6
6
  huggingface_hub/_login.py,sha256=ssf4viT5BhHI2ZidnSuAZcrwSxzaLOrf8xgRVKuvu_A,20298
7
7
  huggingface_hub/_snapshot_download.py,sha256=zZDaPBb4CfMCU7DgxjbaFmdoISCY425RaH7wXwFijEM,14992
8
8
  huggingface_hub/_space_api.py,sha256=QVOUNty2T4RxPoxf9FzUjXmjHiGXP0mqXJzqQ7GmoJo,5363
9
9
  huggingface_hub/_tensorboard_logger.py,sha256=ZkYcAUiRC8RGL214QUYtp58O8G5tn-HF6DCWha9imcA,8358
10
- huggingface_hub/_upload_large_folder.py,sha256=g9P2-pQkbOd9UF_unXd9SpCX8p_U0gLyjqXZpkUl4p0,23484
10
+ huggingface_hub/_upload_large_folder.py,sha256=eedUTowflZx1thFVLDv7hLd_LQqixa5NVsUco7R6F5c,23531
11
11
  huggingface_hub/_webhooks_payload.py,sha256=Xm3KaK7tCOGBlXkuZvbym6zjHXrT1XCrbUFWuXiBmNY,3617
12
12
  huggingface_hub/_webhooks_server.py,sha256=oCvpFrYjrhJjClAMw26SQfvN4DUItgK2IhFp1OVh2bU,15623
13
13
  huggingface_hub/community.py,sha256=4MtcoxEI9_0lmmilBEnvUEi8_O1Ivfa8p6eKxYU5-ts,12198
@@ -123,9 +123,9 @@ huggingface_hub/utils/insecure_hashlib.py,sha256=OjxlvtSQHpbLp9PWSrXBDJ0wHjxCBU-
123
123
  huggingface_hub/utils/logging.py,sha256=0A8fF1yh3L9Ka_bCDX2ml4U5Ht0tY8Dr3JcbRvWFuwo,4909
124
124
  huggingface_hub/utils/sha.py,sha256=OFnNGCba0sNcT2gUwaVCJnldxlltrHHe0DS_PCpV3C4,2134
125
125
  huggingface_hub/utils/tqdm.py,sha256=ZgdphuTnwAIaUKnnD2P7qVvNHpzHAyrYoItkiV0aEjQ,9835
126
- huggingface_hub-0.29.0rc6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
127
- huggingface_hub-0.29.0rc6.dist-info/METADATA,sha256=UfLTmwTCvqvIM1yPiAnP3vtsBxipf9w8aUbeQuSkJuM,13483
128
- huggingface_hub-0.29.0rc6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
129
- huggingface_hub-0.29.0rc6.dist-info/entry_points.txt,sha256=Y3Z2L02rBG7va_iE6RPXolIgwOdwUFONyRN3kXMxZ0g,131
130
- huggingface_hub-0.29.0rc6.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
131
- huggingface_hub-0.29.0rc6.dist-info/RECORD,,
126
+ huggingface_hub-0.29.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
127
+ huggingface_hub-0.29.1.dist-info/METADATA,sha256=B8dl2q55ILPp7jxGZ3Nx0zT0AlCd74Z0ipYxygbW3FI,13480
128
+ huggingface_hub-0.29.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
129
+ huggingface_hub-0.29.1.dist-info/entry_points.txt,sha256=Y3Z2L02rBG7va_iE6RPXolIgwOdwUFONyRN3kXMxZ0g,131
130
+ huggingface_hub-0.29.1.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
131
+ huggingface_hub-0.29.1.dist-info/RECORD,,