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

Add support for offline mode with HF_HUB_OFFLINE envvar #1182

Conversation

JamesHWade
Copy link
Contributor

Added User Token Verification in HuggingFace API

Description

Added an additional check to check_user_token that verifies the user's HuggingFace token. The function checks if the HF_HUB_OFFLINE environment variable is set to '1'. If so, it skips the verification and only local files will be used.

Motivation and Context

This change lets users skip token validation if they are in an offline system (e.g., HPC).

How has this been tested?

This change has been tested by running the function with different environment variables and tokens. The function correctly identifies whether the token is valid or not.

Screenshots (if appropriate)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Social Handles (Optional)

@JamesHWade on Twitter and Discord

@JamesHWade JamesHWade force-pushed the bug/skip-token-verification-offline-mode branch from ff888e6 to 9c5da8b Compare January 24, 2024 01:11
@winglian winglian merged commit 71141de into axolotl-ai-cloud:main Jan 24, 2024
7 checks passed
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.

None yet

2 participants