Skip to content

Commit 6a8b8eb

Browse files
Wauplinhanouticelina
authored andcommitted
[v1.0] Remove keras2 utilities (#3352)
* Remove keras2 utilities * remove keras from init
1 parent fdaed9b commit 6a8b8eb

File tree

8 files changed

+12
-882
lines changed

8 files changed

+12
-882
lines changed

.github/workflows/python-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ jobs:
130130
tensorflow)
131131
# Cannot be on same line since '_tf*' checks if tensorflow is NOT imported by default
132132
eval "$PYTEST ../tests/test_tf*"
133-
eval "$PYTEST ../tests/test_keras*"
134133
eval "$PYTEST ../tests/test_serialization.py"
135134
;;
136135

docs/source/en/package_reference/mixins.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ how to integrate any ML framework with the Hub.
2121

2222
[[autodoc]] PyTorchModelHubMixin
2323

24-
### Keras
25-
26-
[[autodoc]] KerasModelHubMixin
27-
28-
[[autodoc]] from_pretrained_keras
29-
30-
[[autodoc]] push_to_hub_keras
31-
32-
[[autodoc]] save_pretrained_keras
33-
3424
### Fastai
3525

3626
[[autodoc]] from_pretrained_fastai

docs/source/ko/package_reference/mixins.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ ML 프레임워크를 Hub와 통합하는 방법은 [통합 가이드](../guides
2020

2121
[[autodoc]] PyTorchModelHubMixin
2222

23-
### Keras[[huggingface_hub.KerasModelHubMixin]]
24-
25-
[[autodoc]] KerasModelHubMixin
26-
27-
[[autodoc]] from_pretrained_keras
28-
29-
[[autodoc]] push_to_hub_keras
30-
31-
[[autodoc]] save_pretrained_keras
32-
3323
### Fastai[[huggingface_hub.from_pretrained_fastai]]
3424

3525
[[autodoc]] from_pretrained_fastai

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def get_version() -> str:
6262

6363
extras["tensorflow-testing"] = [
6464
"tensorflow",
65-
"keras<3.0",
6665
]
6766

6867
extras["hf_xet"] = ["hf-xet>=1.1.2,<2.0.0"]

src/huggingface_hub/__init__.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -469,12 +469,6 @@
469469
"inference._mcp.mcp_client": [
470470
"MCPClient",
471471
],
472-
"keras_mixin": [
473-
"KerasModelHubMixin",
474-
"from_pretrained_keras",
475-
"push_to_hub_keras",
476-
"save_pretrained_keras",
477-
],
478472
"repocard": [
479473
"DatasetCard",
480474
"ModelCard",
@@ -687,7 +681,6 @@
687681
"JobOwner",
688682
"JobStage",
689683
"JobStatus",
690-
"KerasModelHubMixin",
691684
"MCPClient",
692685
"ModelCard",
693686
"ModelCardData",
@@ -862,7 +855,6 @@
862855
"fetch_job_logs",
863856
"file_exists",
864857
"from_pretrained_fastai",
865-
"from_pretrained_keras",
866858
"get_async_session",
867859
"get_collection",
868860
"get_dataset_tags",
@@ -933,7 +925,6 @@
933925
"permanently_delete_lfs_files",
934926
"preupload_lfs_files",
935927
"push_to_hub_fastai",
936-
"push_to_hub_keras",
937928
"read_dduf_file",
938929
"reject_access_request",
939930
"rename_discussion",
@@ -949,7 +940,6 @@
949940
"run_as_future",
950941
"run_job",
951942
"run_uv_job",
952-
"save_pretrained_keras",
953943
"save_torch_model",
954944
"save_torch_state_dict",
955945
"scale_to_zero_inference_endpoint",
@@ -1485,12 +1475,6 @@ def __dir__():
14851475
)
14861476
from .inference._mcp.agent import Agent # noqa: F401
14871477
from .inference._mcp.mcp_client import MCPClient # noqa: F401
1488-
from .keras_mixin import (
1489-
KerasModelHubMixin, # noqa: F401
1490-
from_pretrained_keras, # noqa: F401
1491-
push_to_hub_keras, # noqa: F401
1492-
save_pretrained_keras, # noqa: F401
1493-
)
14941478
from .repocard import (
14951479
DatasetCard, # noqa: F401
14961480
ModelCard, # noqa: F401

0 commit comments

Comments
 (0)