Skip to content

Conversation

@Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Nov 27, 2025

Add a new parameter commit_mode to HfApi.create_commit with value:

  • "immediate": commit is processed immediately (default)
  • "queued": commit is pending. No commit info returned.
  • "flush": all pending commits are processed and merged into one commit

By default, no commit mode is sent to the server which default to immediate commit.

Goal is to always upload from multiple nodes without getting concurrency or rate limit issues.

Related PRs:

TODO:

  • test on staging Hub
  • return payload in case of queued commit
  • add commit_mode to upload_file / upload_folder / delete_file methods once syntax is definitive
  • add tests

cc @coyotte508

@Wauplin Wauplin marked this pull request as draft November 27, 2025 16:02
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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.

3 participants