Skip to content

Windows: from_pretrained("org/repo") fails HF validation — str(Path(repo_id)) uses backslashes #10

@SwapnanilAdhikary

Description

@SwapnanilAdhikary

Description

On Windows, TribeModel.from_pretrained("facebook/tribev2", ...) fails with huggingface_hub.errors.HFValidationError because the Hugging Face repo id is built from str(Path(checkpoint_dir)) after wrapping the string in pathlib.Path. On Windows that produces backslashes (e.g. facebook\tribev2), which is not a valid Hub repo id.

Environment

  • OS: Windows 10/11
  • Python: 3.10+ (reproduced with 3.13)
  • tribev2 installed from Git (current main as of reporting)

Minimal reproduction

from tribev2 import TribeModel
TribeModel.from_pretrained("facebook/tribev2", cache_folder="./cache")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions