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

#grain Simplify state management in FirstFitPackingIterator. #710

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Jan 28, 2025

#grain Simplify state management in FirstFitPackingIterator.

The conditional in get_state() was making the class hard to reason about.

Now we have a single field for holding the checkpointed parent state. We advance it whenever a batch is fully emitted, since at that point the parent will no longer need to be rewound to before the batch.

@copybara-service copybara-service bot force-pushed the test_720605062 branch 5 times, most recently from 461912c to 62b5567 Compare January 29, 2025 15:22
The conditional in get_state() was making the class hard to reason about.

Now we have a single field for holding the checkpointed parent state. We advance it whenever a batch is fully emitted, since at that point the parent will no longer need to be rewound to before the batch.

PiperOrigin-RevId: 720967916
@copybara-service copybara-service bot merged commit a7d1ec4 into main Jan 29, 2025
@copybara-service copybara-service bot deleted the test_720605062 branch January 29, 2025 15:30
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