File size: 1,797 Bytes
189339c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | Metadata-Version: 2.4
Name: hf_transfer
Version: 0.1.9
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
License-File: LICENSE
Summary: Speed up file transfers with the Hugging Face Hub.
Requires-Python: >=3.7
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Issues, https://github.com/huggingface/hf_transfer/issues
Project-URL: Repository, https://github.com/huggingface/hf_transfer.git
# HF Transfer
Speed up file transfers with the Hub.
# DISCLAIMER
This library is a power user tool, to go beyond `~500MB/s` on very high bandwidth
network, where Python cannot cap out the available bandwidth.
This is *not* meant to be a general usability tool.
It purposefully lacks progressbars and comes generally as-is.
Please file issues *only* if there's an issue on the underlying downloaded file.
## Contributing
```sh
python3 -m venv ~/.venv/hf_transfer
source ~/.venv/hf_transfer/bin/activate
pip install maturin
maturin develop
```
### `huggingface_hub`
If you are working on changes with `huggingface_hub`
```sh
git clone git@github.com:huggingface/huggingface_hub.git
# git clone https://github.com/huggingface/huggingface_hub.git
cd huggingface_hub
python3 -m pip install -e ".[quality]"
```
You can use the following test script:
```py
import os
# os.environ["HF_ENDPOINT"] = "http://localhost:5564"
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
from huggingface_hub import HfApi, logging
logging.set_verbosity_debug()
hf = HfApi()
hf.upload_file(path_or_fileobj="/path/to/my/repo/some_file", path_in_repo="some_file", repo_id="my/repo", repo_type="model")
```
|