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

Concatenate last batches for batched inference #200

Conversation

CeliaBenquet
Copy link
Member

fix #199.

To still transform the extra samples that are not contained in a full batch while not getting an error regarding the next to last batch batch_end_idx above the length of the input, I propose to concatenate the penultimate batch (so the last complete batch) with the last batch (the incomplete batch from 1 to batch_size).

Copy link
Member

@stes stes left a comment

Choose a reason for hiding this comment

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

Thanks, @CeliaBenquet . Can you add a test case which highlights the issue (and breaks in the "old" codebase), and then confirm that your fix passes the test?

@cla-bot cla-bot bot added the CLA signed label Nov 29, 2024
@CeliaBenquet CeliaBenquet requested a review from stes November 29, 2024 09:38
tests/test_sklearn.py Show resolved Hide resolved
@stes stes merged commit 81b964c into AdaptiveMotorControlLab:batched-inference-and-padding Jan 21, 2025
1 check passed
@stes stes deleted the batched-inference-incomplete-batch branch January 21, 2025 22:47
@stes
Copy link
Member

stes commented Jan 21, 2025

merged this for now, conversation can be continued in #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants