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

Add copy operation to commit API #1083

Closed
mariosasko opened this issue Sep 26, 2022 · 6 comments · Fixed by #1495
Closed

Add copy operation to commit API #1083

mariosasko opened this issue Sep 26, 2022 · 6 comments · Fixed by #1495
Assignees
Labels
enhancement New feature or request

Comments

@mariosasko
Copy link
Contributor

For hffs, it would be nice to have a CopyOperation in the commit API for efficiently copying repo siblings.

PS: this would also require some changes server-side, so "low priority" for now

@mariosasko mariosasko added the enhancement New feature or request label Sep 26, 2022
@Wauplin
Copy link
Contributor

Wauplin commented Sep 27, 2022

(cc @Pierrci @SBrandeis for the moon-landing related request)

Issue is related to hffs: huggingface/hffs#1 (comment). I agree on the low priority as a sub-optimal workaround is possible (requires to download/copy a file locally).

@julien-c
Copy link
Member

IIRC S3 doesn't support copy for >5GB files (you have to multipart upload) so this would/might be tricky to implement in a more efficient way than downloading and uploading. cc @coyotte508

@coyotte508
Copy link
Member

Is it copying within a repo or across repos?

Within a repo, the only thing to copy is a pointer file, so no issue.

@SBrandeis
Copy link
Contributor

IIRC S3 doesn't support copy for >5GB files (you have to multipart upload) so this would/might be tricky to implement in a more efficient way than downloading and uploading

You can, but it requires some extra steps: https://docs.aws.amazon.com/AmazonS3/latest/userguide/CopyingObjectsMPUapi.html

@mariosasko
Copy link
Contributor Author

@coyotte508 Our use case in hffs is copying within a repo.

@Wauplin
Copy link
Contributor

Wauplin commented Oct 28, 2022

Now possible thanks to @coyotte508's work in https://github.com/huggingface/moon-landing/pull/4252 and https://github.com/huggingface/moon-landing/pull/4271 (internal links).

EDIT: I mixed up "copy a file" and "rename a file". Renaming is now possible out of the box from moon landing put copying is still not.

@Wauplin Wauplin added this to the v0.11 milestone Oct 28, 2022
@Wauplin Wauplin self-assigned this Oct 28, 2022
@Wauplin Wauplin removed this from the v0.11 milestone Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants