Skip to content

fix(scripts): upload README.md in upload_hf.py - #116

Open
agourakis82 wants to merge 1 commit into
Edge0-AI:mainfrom
agourakis82:fix/upload-hf-readme
Open

agourakis82 wants to merge 1 commit into
Edge0-AI:mainfrom
agourakis82:fix/upload-hf-readme

Conversation

@agourakis82

Copy link
Copy Markdown
Contributor

Fixes #103.

upload_hf.py's file listing explicitly excluded README.md with the comment "README usually already uploaded; skip leftovers handled below" — but nothing below handled leftovers, so the README was simply never uploaded. Given a checkpoint dir of README.md, config.json, model.safetensors, only the last two were recorded as uploaded.

Fix

Removed the exclusion and extracted the file-selection logic into files_to_upload() so the rule (skip dotfiles and .bak_vision backups, upload everything else) is independently unit-testable without touching the network.

Test plan

  • Added tests/test_upload_hf.py: files_to_upload() includes README.md, excludes dotfiles and .bak_vision backups.
  • pytest -m 'not slow': 81 passed, 1 skipped (no regressions).

The upload-file listing explicitly excluded README.md ("README usually
already uploaded; skip leftovers handled below"), but nothing below
handled leftovers -- the README is simply never uploaded. Given a
checkpoint directory of README.md, config.json, and model.safetensors,
only config.json and model.safetensors were recorded as uploaded.

Removes the exclusion and extracts the listing into files_to_upload()
so the file-selection rule (dotfiles and .bak_vision backups excluded,
everything else included) is independently testable without touching
the network.

Fixes Edge0-AI#103.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

scripts/upload_hf.py silently never uploads README.md

1 participant