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

Refactor _BatchManager to have list of batches per step #353

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

gabrielmbmb
Copy link
Member

Description

The current implementation of _BatchManager was very limited, as it only allowed to have one batch per step. This implementation was not realistic as some steps are faster than others.

For example, step3 depends on step2 and step1. step1 is faster than step2 and is able to generate 2 batches faster than step2 to generate one. As one batch was already added to _BatchManager for step1, when the second is going to be added the current implementation would raise a ValueError as there is a batch from step1 already waiting for step2.

This PR modifies the _BatchManager, so it has a list of batches per step. In addition, the attribute seq_no has been added to _Batch, to be able to sync the input batches for a step.

@gabrielmbmb gabrielmbmb added the enhancement New feature or request label Feb 21, 2024
@gabrielmbmb gabrielmbmb added this to the 1.0.0 milestone Feb 21, 2024
@gabrielmbmb gabrielmbmb self-assigned this Feb 21, 2024
@gabrielmbmb gabrielmbmb changed the base branch from main to core-refactor February 21, 2024 11:13
@gabrielmbmb gabrielmbmb merged commit 4d03ec8 into core-refactor Feb 21, 2024
4 checks passed
@gabrielmbmb gabrielmbmb deleted the improve_batch_manager branch February 21, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant