4 Commits

Author SHA1 Message Date
  Quentin Lhoest f7594c4c04
dev version (#704) 2 months ago
  Quentin Lhoest a4fcb45252
release 0.4.6 (#703) 2 months ago
  Quentin Lhoest 0a82f937ce
Pin hfh in CI for updating repos (#702) 2 months ago
  Lucain 78acda948f
Remove deprecated `HfFolder` (#701) 2 months ago
4 changed files with 6 additions and 12 deletions
Split View
  1. +1
    -1
      .github/workflows/update_spaces.yml
  2. +1
    -1
      setup.py
  3. +1
    -1
      src/evaluate/__init__.py
  4. +3
    -9
      src/evaluate/utils/file_utils.py

+ 1
- 1
.github/workflows/update_spaces.yml View File

@@ -28,7 +28,7 @@ jobs:
working-directory: ./.github/hub
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install huggingface_hub==0.35.0
- name: Update Hub repositories
working-directory: ./.github/hub
run: |


+ 1
- 1
setup.py View File

@@ -126,7 +126,7 @@ EXTRAS_REQUIRE = {

setup(
name="evaluate",
version="0.4.6.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
version="0.4.7.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
description="HuggingFace community-driven open-source library of evaluation",
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",


+ 1
- 1
src/evaluate/__init__.py View File

@@ -17,7 +17,7 @@
# pylint: enable=line-too-long
# pylint: disable=g-import-not-at-top,g-bad-import-order,wrong-import-position

__version__ = "0.4.6.dev0"
__version__ = "0.4.7.dev0"

from packaging import version



+ 3
- 9
src/evaluate/utils/file_utils.py View File

@@ -226,16 +226,10 @@ def get_authentication_headers_for_url(url: str, token: Optional[Union[str, bool
"""Handle the HF authentication"""
headers = {}
if url.startswith(config.HF_ENDPOINT):
if token is False:
token = None
elif isinstance(token, str):
token = token
else:
from huggingface_hub import hf_api
from huggingface_hub.utils import build_hf_headers

headers = build_hf_headers(token=token, library_name="evaluate", library_version=__version__)

token = hf_api.HfFolder.get_token()
if token:
headers["authorization"] = f"Bearer {token}"
return headers




Loading…
Cancel
Save
Baidu
map