Upload_large_folder for uploading to a PR

Hi everyone,

Does somebody have experience uploading to a datasets PR with upload_large_folder? Is that even possible? I could not find anything about it in he documentation and when trying it, I get a 404 error. I also tried to use the PR name, same result.

api.upload_large_folder(repo_id=<id>, folder_path=upload_folder, repo_type="dataset", revision="pr/2:refs/pr/2" )

Failed to get upload mode: 404 Client Error: Not Found for url: https://huggingface.co/api/datasets/user/dataset/preupload/pr/2:refs/pr/2

If it is not possible, what is the preferred way to upload large datasets to a PR?

Thanks.

1 Like

If you create the PR first, wouldn’t that prevent a 404 error?

you cannot create a PR directly. Please create a PR first (from the UI or using create_pull_request()) and then commit to it by passing revision.

This is exactly what I did. I am sorry I did not make this clear before. I have created the PR in the UI before trying to upload to it, however, the PR is still in “draft” mode.

1 Like