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

Modify Workflow to Allow IterableDataset Inputs #8263

Merged
merged 12 commits into from
Dec 19, 2024

Conversation

ericspod
Copy link
Member

Description

This modifies the behaviour of Workflow to permit IterableDataset to be used correctly. A check against the epoch_length value is removed, to allow that value to be None, and a test is added to verify this. The length of a data loader is not defined when using iterable datasets, so try/raise is added to allow that to be queried safely. This is related to my work on the streaming support, in my prototype gist I had to provide a bogus epoch length value in the then change it to None later once the evaluator object was created. This PR will remove the need for this hack.

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 --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@KumoLiu
Copy link
Contributor

KumoLiu commented Dec 16, 2024

/build

Copy link
Contributor

@KumoLiu KumoLiu left a comment

Choose a reason for hiding this comment

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

Thanks for the pr, looks good to me. One minor comments inline.

monai/engines/workflow.py Outdated Show resolved Hide resolved
Eric Kerfoot and others added 4 commits December 18, 2024 13:56
Signed-off-by: Eric Kerfoot <eric.kerfoot@gmail>
Signed-off-by: Eric Kerfoot <eric.kerfoot@gmail>
I, Eric Kerfoot <eric.kerfoot@gmail>, hereby add my Signed-off-by to this commit: 10d8c9a
I, Eric Kerfoot <eric.kerfoot@gmail>, hereby add my Signed-off-by to this commit: aac82f5

Signed-off-by: Eric Kerfoot <[email protected]>
@ericspod
Copy link
Member Author

I just noticed pre-commit.ci made changes to the source file that were incompatible with isort's expectations. It added a new import line instead of appending to an existing one.

I, Eric Kerfoot <eric.kerfoot@gmail>, hereby add my Signed-off-by to this commit: 10d8c9a
I, Eric Kerfoot <eric.kerfoot@gmail>, hereby add my Signed-off-by to this commit: aac82f5

Signed-off-by: Eric Kerfoot <eric.kerfoot@gmail>
@KumoLiu
Copy link
Contributor

KumoLiu commented Dec 18, 2024

/build

@KumoLiu KumoLiu merged commit e1e3d8e into Project-MONAI:dev Dec 19, 2024
28 checks passed
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