Skip to content

fix: avoid unconditional model_info call in _patch_mistral_regex#44923

Draft
prakhar-agarwal wants to merge 1 commit intohuggingface:mainfrom
prakhar-agarwal:fix-offline-tokenizer
Draft

fix: avoid unconditional model_info call in _patch_mistral_regex#44923
prakhar-agarwal wants to merge 1 commit intohuggingface:mainfrom
prakhar-agarwal:fix-offline-tokenizer

Conversation

@prakhar-agarwal
Copy link
Copy Markdown

@prakhar-agarwal prakhar-agarwal commented Mar 22, 2026

Addresses issue #44843. Verified with isolated repro logic.

Changes made: Updated the logic to properly identify local and offline scenarios upfront. Now, is_local is correctly set to True if:

  1. is_offline_mode() is active.
  2. The local_files_only flag is True.
  3. The provided path is a local directory (os.path.isdir).

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