Skip to content

Update trackio integration to use Buckets and "freeze" Space after training - #45329

Merged
SunMarc merged 48 commits into
mainfrom
update-trackio
Apr 13, 2026
Merged

Update trackio integration to use Buckets and "freeze" Space after training#45329
SunMarc merged 48 commits into
mainfrom
update-trackio

Conversation

@abidlabs

@abidlabs abidlabs commented Apr 8, 2026

Copy link
Copy Markdown
Member

Updates TrackioCallback and TrainingArguments for the latest version of Trackio using HF Buckets as the backend, and control over creating a static Space for the Trackio dashboard during or at the end of training.

These are now the TrainingArguments relevant for trackio:

trackio_space_id — Only affects the live read and write Gradio Space used during training.

  • None (default): metrics stay local (no Gradio Space for logging).
  • str: create/use that Gradio Space and stream metrics there for the run.

trackio_static_space_id — Controls the creation of a static read-only Trackio Space:

  • False: no static Space — no sync(sdk="static") on Hub push, no freeze after training.
  • None (default) or str: a static Trackio Space is created in two cases:
    • when a model checkpoint is pushed to the Hub (local-only runs): trackio.sync(..., sdk="static") so the model card can link a static dashboard; auto Space name if None, or use the string as the static Space id.
    • End of training when trackio_space_id was set (Gradio): trackio.freeze from that Gradio Space; None lets Trackio name the static Space, str sets the destination id.

Example of static Space created: https://huggingface.co/spaces/abidlabs/trackio-transformers-demo-493111-static-d0a1cc
Example of model card created: https://huggingface.co/abidlabs/trackio-transformers-demo-493111

@abidlabs abidlabs changed the title changes Update trackio integration to use Buckets and "freeze" Space after training Apr 8, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@abidlabs
abidlabs requested review from SunMarc and qgallouedec April 9, 2026 01:55

@SunMarc SunMarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! Left some minor comments

Comment thread src/transformers/integrations/integration_utils.py Outdated
Comment thread src/transformers/integrations/integration_utils.py Outdated
Comment on lines +1082 to +1084
gradio_space_id = self._resolve_trackio_space_id(args)
if gradio_space_id is None:
return

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the code in _resolve_trackio_space_id, it feels like gradio_space_id is never None no or SQLiteStorage.get_space_id(args.project) can return None ? Also maybe we can rename a bit the method to call it get_trackio_space_id maybe ?

Comment thread src/transformers/integrations/integration_utils.py Outdated
Comment thread src/transformers/integrations/integration_utils.py Outdated
Comment thread src/transformers/integrations/integration_utils.py Outdated
Comment on lines 1133 to 1140
@@ -1041,13 +1141,22 @@ def on_push_begin(self, args, state, control, model, **kwargs):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed

Comment thread src/transformers/integrations/integration_utils.py Outdated
Comment thread src/transformers/integrations/integration_utils.py
Comment thread src/transformers/training_args.py Outdated
Comment thread src/transformers/integrations/integration_utils.py Outdated
@abidlabs

abidlabs commented Apr 10, 2026

Copy link
Copy Markdown
Member Author

Thanks again for the thorough review @SunMarc! I think I've addressed everything

(cc @qgallouedec for visibility)

Edit: I think this broke the links on the model card, let me fix that

@SunMarc SunMarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for iterating ! Can you have a look @qgallouedec ?

@SunMarc

SunMarc commented Apr 10, 2026

Copy link
Copy Markdown
Member

@bot /style

@github-actions

github-actions Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Style fix bot fixed some files and pushed the changes.

@abidlabs

Copy link
Copy Markdown
Member Author

Should be all set now! Tested end-to-end with this model: https://huggingface.co/abidlabs/trackio-transformers-demo-493111 and the Static Space shows up as expected:

Screen.Recording.2026-04-10.at.11.19.19.AM.mov

@SunMarc
SunMarc added this pull request to the merge queue Apr 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 13, 2026
@SunMarc
SunMarc added this pull request to the merge queue Apr 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 13, 2026
@SunMarc
SunMarc added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit 7afee86 Apr 13, 2026
29 checks passed
@SunMarc
SunMarc deleted the update-trackio branch April 13, 2026 14:30
sirzechs66 pushed a commit to sirzechs66/transformers that referenced this pull request Apr 18, 2026
…training (huggingface#45329)

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* Apply repo consistency fixes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* chore: empty commit

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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