Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload only files that have changed since last upload in upload_folder #1576

Open
Wauplin opened this issue Aug 3, 2023 · 0 comments
Open

Comments

@Wauplin
Copy link
Contributor

Wauplin commented Aug 3, 2023

Related to discussion that happened in huggingface/diffusers#4128 but implementing this would be beneficial in more cases.

The idea would be to have a modified_after: datetime | int | None = None param for upload_folder. Instead of listing and uploading all files in the folder, we would upload only files that have being changed after modified_after. This would allow to make regular uploads of a folder in a more optimized way.

Note: LFS files are never re-uploaded to the Hub. This optimization would be more to:

  • have less files in the /commit payload
  • don't push existing text files again
  • save the time it takes to compute the sha256 of each file (even large ones)
    This would come at the cost of checking disk info for each file. Should still be quicker than reading the content of the files.
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

No branches or pull requests

1 participant