Skip to content

bug(cli): intrinsic_uploader builds path_in_repo with os.path.join, producing backslashes on Windows #1870

In progress

Description

@txltedxgod

As noted in #1814, \cli/alora/intrinsic_uploader.py\ constructs \path_in_repo\ using \os.path.join(model_name, base_model_path, type). On Windows this produces backslashes (e.g. \�dapter\base\alora) rather than POSIX forward slashes expected by Hugging Face Hub repositories.

Reproduction on Windows

Running \pytest test/cli/test_alora_upload.py --no-cov -v\ on Windows fails in \ est_upload_intrinsic_token_lookup[test-token-not-a-real-credential]:
\
AssertionError: assert 'adapter\\base\\alora' == 'adapter/base/alora'
\\

Expected behavior

\path_in_repo\ should always use POSIX forward slashes (/) regardless of the host OS (e.g., \posixpath.join\ or \PurePosixPath). Happy to submit a follow-up PR with a fix and cross-platform test coverage.

Activity

  1. planetf1 commented on Nov 25, 2026

    @planetf1
    Contributor

    Yes please a PR would be good. We don't test on windows - if you find any other issues please do raise similar - though path separator is the most likely case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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