Skip to content

Support grain data checkpoint for elastic training#3673

Draft
aireenmei wants to merge 2 commits intomainfrom
aireen/elastic_data
Draft

Support grain data checkpoint for elastic training#3673
aireenmei wants to merge 2 commits intomainfrom
aireen/elastic_data

Conversation

@aireenmei
Copy link
Copy Markdown
Collaborator

@aireenmei aireenmei commented Apr 15, 2026

Description

  • migrate RemoteIterator to colocated python class
  • Add checkpointing logic to RemoteIterator, so data iterator in the colocated sidecar writes checkpoint to the checkpoint path, prevent sending data iterator state to the controller
  • Add grain.ElasticIterator support controlled by flag grain_use_elastic_iterator, can be used with or without elastic training. This class allows recovering checkpoint with a dynamic scale (up or down), with the following limitations:
    (1). Only arrayrecord files are supported, parquet or tfrecord are not supported
    (2). Does not support many-to-one transformations, including packing, filtering
    (3). Does not support mixing datasets

Tests

Tested on Pathways saving and restoring data iterator checkpoints with different # of v5e-32 slices
jobset.yaml
Test scaling down:

  • Start with 2 slices: log (Num devices: 64)
  • Scale down to 1 slice: log (Num devices: 32)
    Test scaling up:
  • Start with 1 slice: log(Num devices: 32)
  • Scale up to 2 slices: log(Num devices: 64)

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

@aireenmei aireenmei force-pushed the aireen/elastic_data branch from 9ace2e6 to 7bd4359 Compare April 16, 2026 01:51
@aireenmei aireenmei force-pushed the aireen/elastic_data branch from 7bd4359 to 947c587 Compare April 16, 2026 19:35
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.

1 participant