Skip to content

Conversation

@BASHER-91
Copy link

  • 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.

- 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.
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.

2 participants