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

Address sample_sequence_length greater than min_length_time_axis #45

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mickvangelderen
Copy link

@mickvangelderen mickvangelderen commented Nov 9, 2024

Based on #43, please review that first and if it wasn't merged yet, please review this PR per commit.

The goal of this PR is to make the tests not generate flashbax warnings and to prevent code from being added that would trigger a flashbax warning.

I am not sure that the suggested changes in the last commit are right.

I am unsure why min_length_time_axis=min_length // add_batch_size + 1 is used in the trajectory buffer source code, particularly the + 1. I am also unsure why the min_length fixture is defined as:

@pytest.fixture
def min_length(sample_batch_size: int) -> int:
    return int(sample_batch_size + 1)

I could understand if it was defined in terms of add_batch_size, but it is not.

Makes it so that the warning:

```
Setting max_size dynamically sets the `max_length_time_axis` to be `max_size`//`add_batch_size = .*`
```

will no longer be triggered by legitimate use of `create_flat_buffer` and
`make_prioritised_flat_buffer`.
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