Skip to content

Fix HF token validation to support Hugging Face CLI cache#4325

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_941292796
Open

Fix HF token validation to support Hugging Face CLI cache#4325
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_941292796

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Fix HF token validation to support Hugging Face CLI cache

This CL ports changes from GitHub PR #4313 (CL 941206211) and adds the necessary Google3 BUILD dependency and visibility updates.

  • Fallback to huggingface_hub.get_token() if config.hf_access_token is missing.
  • Pass the fallback token to the checkpoint conversion subprocess.
  • Add unit tests to verify authentication behavior.
  • Add huggingface_hub dependency to maxtext:model_creation_utils.
  • Add maxtext to friends package group in huggingface_hub visibility.

PiperOrigin-RevId: 941292796
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/utils/model_creation_utils.py 83.33% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant