-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Automatically revert to last successful commit to hub when a push_to_hub is interrupted #5045
Comments
Could you share the error you got please ? Maybe the full stack trace if you have it ? Maybe |
I think that would definitely be the way to go. Do you know the reasons why not implementing it like this in the first place ? I guess it is because of not been able to upload all at once with For now, maybe it's best to wait for a proper implementation instead of creating a temporary workaround :) |
Ideally we would want to upload the files iteratively - and then once everything is uploaded we proceed to commit. When we implemented For more context: for each shard to upload we do:
So to avoid OOM we need to upload the files iteratively.
Let us know if we can help ! |
Oh I see. So maybe this has to be done in an implementation specific to You can maybe have a look at how I can help you if you have questions how to do it in (also cc @coyotte508 and @SBrandeis who implemented LFS upload in |
Here’s part of the stack trace, that I can reproduce at the moment from a photo I took (potential typos from OCR):
The column 'hc' was removed before the interrupted push_to_hub(). It appears in the column list in curly brackets but not in the column list above. Let me know, if I can be of any help. |
Is your feature request related to a problem? Please describe.
I pushed a modification of a large dataset (remove a column) to the hub. The push was interrupted after some files were committed to the repo. This left the dataset to raise an error on load_dataset() (ValueError couldn’t cast … because column names don’t match). Only by specifying the previous (complete) commit as revision=commit_hash in load_data(), I was able to repair this and after a successful, complete push, the dataset loads without error again.
Describe the solution you'd like
Would it make sense to detect an incomplete push_to_hub() and automatically revert to the previous commit/revision?
Describe alternatives you've considered
Leave everything as is, the revision parameter in load_dataset() allows to manually fix this problem.
Additional context
Provide useful defaults
The text was updated successfully, but these errors were encountered: