Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO: remove this once https://github.com/huggingface/safetensors/pull/449 is merged. #2516

Closed
yuxi-liu-wired opened this issue Sep 6, 2024 · 3 comments

Comments

@yuxi-liu-wired
Copy link
Contributor

https://github.com/huggingface/huggingface_hub/blob/23bab6a3fdb11bcdf3424f79fbe245ed4b9256ef/src/huggingface_hub/hub_mixin.py#L833C1-L834C1

says

# TODO: remove this once https://github.com/huggingface/safetensors/pull/449 is merged.

huggingface/safetensors#449 has been merged.

@Wauplin
Copy link
Contributor

Wauplin commented Sep 10, 2024

Hi @yuxi-liu-wired, the device parameter has been added in safetensors 0.4.3 release so in the code we should:

  • check safetensors version
  • if below 0.4.3, add current warning + "you should update"
  • if 0.4.3 or above, use the device parameter and avoid to copy to cpu before gpu

Do you want to work on a PR? :)

@yuxi-liu-wired
Copy link
Contributor Author

Okay I'm working on it now.

Wauplin added a commit that referenced this issue Sep 11, 2024
* implemented #2516

* fix ruff error

* Update setup.py

removed torch dependency for ["dev"]

Co-authored-by: Lucain <lucainp@gmail.com>

---------

Co-authored-by: Lucain <lucainp@gmail.com>
@Wauplin
Copy link
Contributor

Wauplin commented Sep 11, 2024

Closed by #2532

@Wauplin Wauplin closed this as completed Sep 11, 2024
clrpackages pushed a commit to clearlinux-pkgs/pypi-huggingface_hub that referenced this issue Sep 19, 2024
…7 to version 0.25.0

010kim (2):
      Define cache errors in errors.py (#2470)
      Add version cli command (#2498)

Amrit Sundarka (1):
      Fixed the issue #2535 Added user followers and following in class User and added test cases for it (#2536)

Anthony (1):
      Correct "login" to "log in" when used as verb (#2434)

AxHa (1):
      Update quick-start.md (#2422)

Celina Hanouti (3):
      Exclude Colab Enterprise from Google Colab token retrieval (#2529)
      Paginate repo likers endpoint (#2530)
      Release: v0.25.0.rc0

Chulhwa (Evan) Han (2):
      Define error (#2444)
      implemented `auth_check` (#2497)

David Steinberg (1):
      Typo for plural (#2439)

Devymex (1):
      Solved: Need to add the max-workers argument to the huggingface-cli command (#2500)

Diverrez morgan (1):
      Bug - [InferenceClient] - use proxy set in var env (#2421)

Jerry Zhang (1):
      Making wrapper tensor subclass to work in serialization (#2440)

Joe Tam (1):
      fix typo in file download warning message about symlinks (#2442)

Lize Cai (1):
      fix .huggingface to .cache/huggingface in doc (#2432)

Lucain (42):
      Tag repos using `HFSummaryWriter` with 'hf-summary-writer' (#2398)
      List organizations in `get_user_overview` (#2404)
      Do not use modelId + remove some self.assert (#2405)
      [hot-fix] Handle [DONE] signal from TGI + remove logic for "non-TGI servers" (#2410)
      Fix filelock if flock not supported (#2402)
      Warn if user tries to upload a parquet file to a model repo (#2403)
      Fix creating empty commit on PR (#2413)
      Prepare for release 0.25 (#2400)
      Fix chat completion url for OpenAI compatibility (#2418)
      Do not raise if branch exists and no write permission (#2426)
      fix repo-files CLI example (#2428)
      Do not raise if chmod fails (#2429)
      Fix shutil move (#2433)
      Fix typo double assignment (#2443)
      Document the difference between model and base_url (#2431)
      Add 'gated' search parameter (#2448)
      [webhooks server] rely on SPACE_ID to check if app is local or in a Sapce (#2450)
      Raise with more info on 416 invalid range (#2449)
      Fix broken AsyncInferenceClient on [DONE] signal (#2458)
      Fix error message on permission issue (#2465)
      Document baseModels and childrenModelCount as expand parameters (#2475)
      Fix: do not erase existing values on update_inference_endpoint (#2476)
      Update endpoint.update signature (#2477)
      Expose `RepoUrl` info in `CommitInfo` object (#2487)
      Refacto error parsing (HfHubHttpError) (#2474)
      Fix `InferenceClient` for HF Nvidia NIM API (#2482)
      [Inference] Support `stop` parameter in `text-generation` instead of `stop_sequences` (#2473)
      Torch: test on 2.0 and latest versions + explicitly load with `weights_only=True` (#2488)
      CLI to upload arbitrary huge folder (#2254)
      Properly close session in `AsyncInferenceClient` (#2496)
      Do not fail on `touch()` if `OSError` (to cache non existence of file) (#2505)
      Paginate followers and following endpoints (#2506)
      Fix 416 requested range not satisfiable (#2511)
      Filter models by inference status (#2517)
      Better support for trending score (#2513)
      Fix unclosed aiohttp.ClientResponse objects (#2528)
      FIX: Use _RECOMMENDED_MODELS_FOR_VCR in TestResolveURL (#2531)
      Fix race-condition issue when downloading from multiple threads (#2534)
      Fix resolve chat completion URL (#2540)
      Add GGUF as supported expand[] parameter (#2545)
      Reduce number of commits in upload large folder (#2546)
      Suggest using upload_large_folder when appropriate (#2547)

Lucain Pouget (4):
      skip unrelevant test in CI
      fix expand in CI
      Release: v0.25.0.rc1
      Release: v0.25.0

Luis Blanche (2):
      feat: ✨ allow passing secrets to the inference endpoint client (#2486)
      fix secrets inference endpoints (#2490)

Luke Cheng (1):
      fixes: URL fixes (#2504)

Quentin Lhoest (1):
      fix empty siblings (#2503)

Roberts Slisans (1):
      expose scan_cache table generation to python (#2437)

Swapnil Jikar (4):
      Update `constants` import to use module-level access #1172 (#2453)
      Update constants imports with module level access #1172 (#2469)
      Refactor all constant imports to module-level access (#2489)
      [Feature] Add `update_repo_settings` function to HfApi #2447 (#2502)

Wu Changming (1):
      Fix broken link and update translation content (#2501)

Yushi Homma (1):
      Add scale_to_zero_timeout parameter to HFApi.create/update_inference_endpoint (#2463)

Yuxi Liu (1):
      Implemented huggingface/huggingface_hub#2516 (#2532)

apolinário (1):
      Add new hardware flavors (#2512)

hlky (2):
      huggingface-cli upload - Validate README.md before file hashing (#2452)
      http_backoff retry with SliceFileObj (#2542)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants