WIP: testing only#2047
Draft
assafvayner wants to merge 13 commits into
Draft
Conversation
Migrates `from_pretrained` to the new `HFClient` / `HFRepository` API (builder-pattern download, owner/name split, `blocking` feature). The `rustls-tls` cargo feature is preserved as a no-op since hf-hub 1.0 no longer exposes a TLS-backend toggle.
|
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. |
4 tasks
Without this, edition 2018 + no explicit `resolver` defaults to v1. v1 unifies feature activations globally across the resolve graph, including those introduced by `[target.'cfg(...)'.dependencies]` blocks for targets that aren't active. xet-data (transitive via hf-hub -> hf-xet) gates `sha2/asm` to non-Windows targets, but v1 leaks the activation onto Windows anyway and pulls in `sha2-asm`, which doesn't compile on `windows-msvc`. Resolver v2 respects the target gate. Verified with `cargo tree --target x86_64-pc-windows-msvc` — `sha2-asm` is no longer in the resolve. Python and Node bindings already use edition 2021 (default v2), so they're unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hf-hubRust dependency to1.0.0-rc.0(was0.4.1).tokenizers/src/utils/from_pretrained.rsto the newHFClient/HFRepositorybuilder-pattern API: splitowner/name,download_file().filename(...).revision(...).send(),user_agentHashMap formatted askey/value; ....ureqtoblocking(the new sync-API gate). Therustls-tlsfeature intokenizersis preserved as a no-op since hf-hub 1.0 no longer exposes a TLS-backend toggle (reqwest's default TLS is used).Test plan
cargo check --features http(passes locally)cargo check --features "http rustls-tls"(passes locally)cargo clippy --features http -- -D warnings(passes locally)cargo test --features http --test from_pretrainedagainst the network to confirm the new API still resolvestokenizer.jsonforbert-base-cased,anthony/tokenizers-test, and revision overrides.WIP: testing only.