Fix HuggingFace cache path resolution on Windows#5
Open
BASHER-91 wants to merge 2 commits intoYerbaPage:mainfrom
Open
Fix HuggingFace cache path resolution on Windows#5BASHER-91 wants to merge 2 commits intoYerbaPage:mainfrom
BASHER-91 wants to merge 2 commits intoYerbaPage:mainfrom
Conversation
- Expand tilde (~) in cache_dir path using os.path.expanduser() - Convert to absolute path using os.path.abspath() - Fixes WinError 3 when HuggingFace tries to resolve symlinks with relative paths - Applied fix to both code-detection and code-analysis modules Resolves issue where cache_dir defaulting to "~/.cache/huggingface/hub" was not properly expanded, causing symlink resolution failures on Windows.
Added missing packages and version constraints: - huggingface-hub: Better cache handling (fixes Windows path issues) - sentencepiece: Required for many tokenizers - protobuf: Model serialization support - safetensors: Modern model weight format - prettytable: Used in analyze_naturalness.py Added minimum version constraints for all packages to ensure compatibility: - PyTorch >= 2.0.0 - Transformers >= 4.30.0 - Other packages with appropriate minimum versions This ensures the project can run on fresh installations without missing dependencies.
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.
Resolves issue where cache_dir defaulting to "~/.cache/huggingface/hub" was not properly expanded, causing symlink resolution failures on Windows.