Skip to content

Commit

Permalink
Remove templating utility (#2611)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin authored Oct 16, 2024
1 parent 8d9409d commit 07896ee
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 122 deletions.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def get_version() -> str:

extras["inference"] = [
"aiohttp", # for AsyncInferenceClient
"minijinja>=1.0", # for chat-completion if not TGI-served
]

extras["torch"] = [
Expand Down
7 changes: 0 additions & 7 deletions src/huggingface_hub/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ class NotASafetensorsRepoError(Exception):
"""


# TEMPLATING ERRORS


class TemplateError(Exception):
"""Any error raised while trying to fetch or render a chat template."""


# TEXT GENERATION ERRORS


Expand Down
102 changes: 0 additions & 102 deletions src/huggingface_hub/inference/_templating.py

This file was deleted.

2 changes: 0 additions & 2 deletions src/huggingface_hub/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
get_hf_hub_version,
get_hf_transfer_version,
get_jinja_version,
get_minijinja_version,
get_numpy_version,
get_pillow_version,
get_pydantic_version,
Expand All @@ -92,7 +91,6 @@
is_graphviz_available,
is_hf_transfer_available,
is_jinja_available,
is_minijinja_available,
is_notebook,
is_numpy_available,
is_package_available,
Expand Down
10 changes: 0 additions & 10 deletions src/huggingface_hub/utils/_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"hf_transfer": {"hf_transfer"},
"jinja": {"Jinja2"},
"keras": {"keras"},
"minijinja": {"minijinja"},
"numpy": {"numpy"},
"pillow": {"Pillow"},
"pydantic": {"pydantic"},
Expand Down Expand Up @@ -161,15 +160,6 @@ def get_keras_version() -> str:
return _get_version("keras")


# Minijinja
def is_minijinja_available() -> bool:
return is_package_available("minijinja")


def get_minijinja_version() -> str:
return _get_version("minijinja")


# Numpy
def is_numpy_available() -> bool:
return is_package_available("numpy")
Expand Down

0 comments on commit 07896ee

Please sign in to comment.