Skip to content

Fix 3 issues in CSVIterableDataset#3226

Merged
wyli merged 15 commits into
Project-MONAI:devfrom
Nic-Ma:fix-csviterabledataset
Nov 1, 2021
Merged

Fix 3 issues in CSVIterableDataset#3226
wyli merged 15 commits into
Project-MONAI:devfrom
Nic-Ma:fix-csviterabledataset

Conversation

@Nic-Ma

@Nic-Ma Nic-Ma commented Oct 31, 2021

Copy link
Copy Markdown
Contributor

Description

This PR fixed 3 issues in the CSVIterableDataset:

  1. It only returns 1 item in iter, changed return to yield from to fix it.
  2. When shuffle=False, the output order is inverse.
  3. length of buffer is changing during pop, so need to compute in runtime.

Also added more tests to cover the issues.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma

Nic-Ma commented Oct 31, 2021

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Oct 31, 2021

Copy link
Copy Markdown
Contributor Author

/build

@Nic-Ma Nic-Ma requested review from ericspod, rijobro and wyli October 31, 2021 16:05
Comment thread tests/test_csv_iterable_dataset.py Outdated
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma changed the title Fix 2 issues in CSVIterableDataset Fix 3 issues in CSVIterableDataset Oct 31, 2021
@Nic-Ma

Nic-Ma commented Oct 31, 2021

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Oct 31, 2021

Copy link
Copy Markdown
Contributor Author

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma

Nic-Ma commented Oct 31, 2021

Copy link
Copy Markdown
Contributor Author

/build

@Nic-Ma

Nic-Ma commented Nov 1, 2021

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Nov 1, 2021

Copy link
Copy Markdown
Contributor Author

/build

@Nic-Ma

Nic-Ma commented Nov 1, 2021

Copy link
Copy Markdown
Contributor Author

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
@wyli

wyli commented Nov 1, 2021

Copy link
Copy Markdown
Contributor

/build

@wyli wyli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, it looks good to me.

@wyli wyli merged commit 3960a51 into Project-MONAI:dev Nov 1, 2021
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.

2 participants