Skip to content

Conversation

@rijobro
Copy link
Contributor

@rijobro rijobro commented Feb 23, 2021

unify arguments for progress bar in datasets.

Copy link
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

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

Thanks!

@rijobro rijobro mentioned this pull request Feb 23, 2021
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
@rijobro rijobro enabled auto-merge (squash) February 23, 2021 21:44
@rijobro rijobro merged commit db2dbb0 into Project-MONAI:master Feb 23, 2021
@rijobro rijobro deleted the unify_progress_bar branch February 24, 2021 09:32
"""

def __init__(self, data: Sequence, transform: Optional[Callable] = None) -> None:
def __init__(self, data: Sequence, transform: Optional[Callable] = None, progress: bool = True) -> None:
Copy link
Contributor

@wyli wyli Feb 26, 2021

Choose a reason for hiding this comment

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

perhaps the progress is not a fundamental property of a Dataset, so it shouldn't be in this base class, what do you think? for a user of the Dataset API, it's difficult to understand this option without looking at the cache dataset and some of the concrete implementations... (progress is not needed in all subclasses)

@Nic-Ma @rijobro sorry I should have had this discussion earlier during my review, somehow I missed it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you're right, sorry about that. A couple of choices:

  1. New middleman class. DatasetWithProgress. PersistentDataset and CacheDataset would inherit from it.
  2. Update current documentation for base class: progress: whether to display a progress bar **(if relevant)**.
  3. Revert this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks, I vote for option 1... @Nic-Ma thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with you guys, progress should not be in the base class.

Thanks.

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.

3 participants