Skip to content

Upgrade hf-hub to 1.0.0#2203

Draft
assafvayner wants to merge 1 commit into
feat/train_encode_splitfrom
upgrade-hf-hub-1.0
Draft

Upgrade hf-hub to 1.0.0#2203
assafvayner wants to merge 1 commit into
feat/train_encode_splitfrom
upgrade-hf-hub-1.0

Conversation

@assafvayner

Copy link
Copy Markdown

Upgrades the hf-hub dependency from 0.4.1 to 1.0.0.

  • The ureq cargo feature no longer exists in hf-hub 1.0; the sync API is now behind the blocking feature.
  • The Api/Repo/RepoType enum API was replaced by HFClient/typed repository handles, so from_pretrained is ported to HFClient::builder().build_sync() + client.model(owner, name).download_file(). Env-based configuration (HF_TOKEN, HF_ENDPOINT, cache dirs) is still resolved by the builder, and the explicit token parameter still overrides it.

Verified with cargo check --features http, clippy, and cargo test --features http --test from_pretrained (4 tests pass against the Hub).

The ureq feature was replaced by blocking, and the sync Api/Repo API was
replaced by HFClient/HFRepository handles; port from_pretrained accordingly.
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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

Successfully merging this pull request may close these issues.

2 participants