-
Notifications
You must be signed in to change notification settings - Fork 421
bugfix: pulling n * chunk_size + 1
#4662
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
bugfix: pulling n * chunk_size + 1
#4662
Conversation
for more information, see https://pre-commit.ci
@@ -68,8 +68,7 @@ def __getitem__( | |||
offsets = list(range(start, stop, FETCHING_BATCH_SIZE)) | |||
limits = [FETCHING_BATCH_SIZE] * len(offsets) | |||
if stop % FETCHING_BATCH_SIZE != 0: | |||
offsets[-1] = stop - (stop % FETCHING_BATCH_SIZE) + 1 | |||
limits[-1] = (stop % FETCHING_BATCH_SIZE) - 1 | |||
limits[-1] = (stop % FETCHING_BATCH_SIZE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alvarobartt I think I'm not missing any other case. We should just adapt the last chunk limit starting at 1 instead of 0. So %
result is enough.
The URL of the deployed environment for this PR is https://argilla-quickstart-pr-4662-ki24f765kq-no.a.run.app |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4662 +/- ##
===========================================
- Coverage 90.13% 89.07% -1.06%
===========================================
Files 233 190 -43
Lines 12493 11666 -827
===========================================
- Hits 11261 10392 -869
- Misses 1232 1274 +42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
This PR fixes errors computing chunk limits when pulling records from some argilla dataset
Type of change
(Please delete options that are not relevant. Remember to title the PR according to the type of change)
How Has This Been Tested
(Please describe the tests that you ran to verify your changes. And ideally, reference
tests
)Checklist
CHANGELOG.md
file (See https://keepachangelog.com/)