huggingface-hub 0.22.0rc1__py3-none-any.whl → 0.22.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.
- huggingface_hub/__init__.py +1 -1
- huggingface_hub/hub_mixin.py +6 -1
- huggingface_hub/inference/_client.py +3 -1
- huggingface_hub/inference/_generated/_async_client.py +3 -1
- {huggingface_hub-0.22.0rc1.dist-info → huggingface_hub-0.22.1.dist-info}/METADATA +1 -1
- {huggingface_hub-0.22.0rc1.dist-info → huggingface_hub-0.22.1.dist-info}/RECORD +10 -10
- {huggingface_hub-0.22.0rc1.dist-info → huggingface_hub-0.22.1.dist-info}/LICENSE +0 -0
- {huggingface_hub-0.22.0rc1.dist-info → huggingface_hub-0.22.1.dist-info}/WHEEL +0 -0
- {huggingface_hub-0.22.0rc1.dist-info → huggingface_hub-0.22.1.dist-info}/entry_points.txt +0 -0
- {huggingface_hub-0.22.0rc1.dist-info → huggingface_hub-0.22.1.dist-info}/top_level.txt +0 -0
huggingface_hub/__init__.py
CHANGED
huggingface_hub/hub_mixin.py
CHANGED
|
@@ -403,7 +403,12 @@ class ModelHubMixin:
|
|
|
403
403
|
# Forward config to model initialization
|
|
404
404
|
model_kwargs["config"] = config
|
|
405
405
|
|
|
406
|
-
|
|
406
|
+
# Inject config if `**kwargs` are expected
|
|
407
|
+
if is_dataclass(cls):
|
|
408
|
+
for key in cls.__dataclass_fields__:
|
|
409
|
+
if key not in model_kwargs and key in config:
|
|
410
|
+
model_kwargs[key] = config[key]
|
|
411
|
+
elif any(param.kind == inspect.Parameter.VAR_KEYWORD for param in cls._hub_mixin_init_parameters.values()):
|
|
407
412
|
for key, value in config.items():
|
|
408
413
|
if key not in model_kwargs:
|
|
409
414
|
model_kwargs[key] = value
|
|
@@ -548,7 +548,9 @@ class InferenceClient:
|
|
|
548
548
|
if _is_chat_completion_server(model):
|
|
549
549
|
# First, let's consider the server has a `/v1/chat/completions` endpoint.
|
|
550
550
|
# If that's the case, we don't have to render the chat template client-side.
|
|
551
|
-
model_url = self._resolve_url(model)
|
|
551
|
+
model_url = self._resolve_url(model)
|
|
552
|
+
if not model_url.endswith("/chat/completions"):
|
|
553
|
+
model_url += "/v1/chat/completions"
|
|
552
554
|
|
|
553
555
|
try:
|
|
554
556
|
data = self.post(
|
|
@@ -548,7 +548,9 @@ class AsyncInferenceClient:
|
|
|
548
548
|
if _is_chat_completion_server(model):
|
|
549
549
|
# First, let's consider the server has a `/v1/chat/completions` endpoint.
|
|
550
550
|
# If that's the case, we don't have to render the chat template client-side.
|
|
551
|
-
model_url = self._resolve_url(model)
|
|
551
|
+
model_url = self._resolve_url(model)
|
|
552
|
+
if not model_url.endswith("/chat/completions"):
|
|
553
|
+
model_url += "/v1/chat/completions"
|
|
552
554
|
|
|
553
555
|
try:
|
|
554
556
|
data = await self.post(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: huggingface-hub
|
|
3
|
-
Version: 0.22.
|
|
3
|
+
Version: 0.22.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,4 +1,4 @@
|
|
|
1
|
-
huggingface_hub/__init__.py,sha256=
|
|
1
|
+
huggingface_hub/__init__.py,sha256=bgYqPqxJ6TyexQ5vJ8zmlXnQR1jwB7smA8xv4x5yOSc,31075
|
|
2
2
|
huggingface_hub/_commit_api.py,sha256=ANamHMhHjvA6xCaLuyWcbwK62JMvEnGwIkpmHBlVoZo,29175
|
|
3
3
|
huggingface_hub/_commit_scheduler.py,sha256=FgfjYv3E0oK3iBxDdy45Y7t78FWkmjnBR4dRd5aZviU,13653
|
|
4
4
|
huggingface_hub/_inference_endpoints.py,sha256=wGcnxZNFCbMK77SA90fPsZ9bqNGwPopSVr-sTbdw3o8,15763
|
|
@@ -16,7 +16,7 @@ huggingface_hub/fastai_utils.py,sha256=5I7zAfgHJU_mZnxnf9wgWTHrCRu_EAV8VTangDVfE
|
|
|
16
16
|
huggingface_hub/file_download.py,sha256=DmOEVmhEsRnX8M0kZmLPLC76eptMT0riTwtThFioV8Q,77476
|
|
17
17
|
huggingface_hub/hf_api.py,sha256=GeE8iATWVij6Ntr9H0jlhRiOYEOsYAtu3ijUMLCPuFI,367572
|
|
18
18
|
huggingface_hub/hf_file_system.py,sha256=JUCT-VZBesDCB-uN__fvQt3uprGQETGnUlzjC7StQLM,37272
|
|
19
|
-
huggingface_hub/hub_mixin.py,sha256=
|
|
19
|
+
huggingface_hub/hub_mixin.py,sha256=xkUTJiP5TiAiVj6ts9Thffcm4wufZS3jMWil3LB2uvw,30423
|
|
20
20
|
huggingface_hub/inference_api.py,sha256=UXOKu_Ez2I3hDsjguqCcCrj03WFDndehpngYiIAucdg,8331
|
|
21
21
|
huggingface_hub/keras_mixin.py,sha256=8L0FEIWy_kmKsGI5d61q_33dGYbmLGhy4kZbqn-YFns,19681
|
|
22
22
|
huggingface_hub/lfs.py,sha256=sXSd48kBIaPQHM19I01nA7ShdlhfDVsY5XliKZWP47s,19402
|
|
@@ -34,12 +34,12 @@ huggingface_hub/commands/scan_cache.py,sha256=4o_jQsZloicRa-P8gncUBncVyWswpSF9T6
|
|
|
34
34
|
huggingface_hub/commands/upload.py,sha256=Mr69qO60otqCVw0sVSBPykUTkL9HO-pkCyulSD2mROM,13622
|
|
35
35
|
huggingface_hub/commands/user.py,sha256=QApZJOCQEHADhjunM3hlQ72uqHsearCiCE4SdpzGdcc,6893
|
|
36
36
|
huggingface_hub/inference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
huggingface_hub/inference/_client.py,sha256
|
|
37
|
+
huggingface_hub/inference/_client.py,sha256=D4O07nYFo7v5lXZ7id3zubV6u8_RxhTVStoeAgEBs-E,104854
|
|
38
38
|
huggingface_hub/inference/_common.py,sha256=BOOBNpF0_V8fDXsi2q5eQ9i4KIlPS6VfMxYxLSgkRdM,16570
|
|
39
39
|
huggingface_hub/inference/_templating.py,sha256=_X7CoUjOmMh5KBXx-WGey-z3uh_fP1QT36X638UZpZw,4051
|
|
40
40
|
huggingface_hub/inference/_types.py,sha256=C73l5-RO8P1UMBHF8OAO9CRUq7Xdv33pcADoJsGMPSU,1782
|
|
41
41
|
huggingface_hub/inference/_generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
|
-
huggingface_hub/inference/_generated/_async_client.py,sha256=
|
|
42
|
+
huggingface_hub/inference/_generated/_async_client.py,sha256=d7fvZyyBNnG9zivHS7rCwaR7TlETN7JENR-M_ZEo_3c,108053
|
|
43
43
|
huggingface_hub/inference/_generated/types/__init__.py,sha256=SoKeNQ8JjBgKkQIgBTsWJe4-Z75Ebz6WkdL4ZQ27yNc,4450
|
|
44
44
|
huggingface_hub/inference/_generated/types/audio_classification.py,sha256=wk4kUTLQZoXWLpiUOpKRHRRE-JYqqJlzGVe62VACR-0,1347
|
|
45
45
|
huggingface_hub/inference/_generated/types/audio_to_audio.py,sha256=n7GeCepzt254yoSLsdjrI1j4fzYgjWzxoaKE5gZJc48,881
|
|
@@ -105,9 +105,9 @@ huggingface_hub/utils/insecure_hashlib.py,sha256=OjxlvtSQHpbLp9PWSrXBDJ0wHjxCBU-
|
|
|
105
105
|
huggingface_hub/utils/logging.py,sha256=Cp03s0uEl3kDM9XHQW9a8GAoExODQ-e7kEtgMt-_To8,4728
|
|
106
106
|
huggingface_hub/utils/sha.py,sha256=QLlIwPCyz46MmUc_4L8xl87KfYoBks9kPgsMZ5JCz-o,902
|
|
107
107
|
huggingface_hub/utils/tqdm.py,sha256=2H80n_kDpvp7P4i7MaYR47t41i0l6ODi5mab1oof1dk,6335
|
|
108
|
-
huggingface_hub-0.22.
|
|
109
|
-
huggingface_hub-0.22.
|
|
110
|
-
huggingface_hub-0.22.
|
|
111
|
-
huggingface_hub-0.22.
|
|
112
|
-
huggingface_hub-0.22.
|
|
113
|
-
huggingface_hub-0.22.
|
|
108
|
+
huggingface_hub-0.22.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
109
|
+
huggingface_hub-0.22.1.dist-info/METADATA,sha256=7Nl2lNIAPqBZO6Z9KBDn1LKVKfHA_qhDkHKGFaGtDPg,12869
|
|
110
|
+
huggingface_hub-0.22.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
111
|
+
huggingface_hub-0.22.1.dist-info/entry_points.txt,sha256=Y3Z2L02rBG7va_iE6RPXolIgwOdwUFONyRN3kXMxZ0g,131
|
|
112
|
+
huggingface_hub-0.22.1.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
|
|
113
|
+
huggingface_hub-0.22.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|