-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
unify progress bar for datasets #1625
Conversation
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.
Thanks!
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
3b91230
to
7263d61
Compare
@@ -51,14 +51,16 @@ class Dataset(_TorchDataset): | |||
}, }, }] | |||
""" | |||
|
|||
def __init__(self, data: Sequence, transform: Optional[Callable] = None) -> None: | |||
def __init__(self, data: Sequence, transform: Optional[Callable] = None, progress: bool = True) -> None: |
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.
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...
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.
I think you're right, sorry about that. A couple of choices:
- New middleman class.
DatasetWithProgress
.PersistentDataset
andCacheDataset
would inherit from it. - Update current documentation for base class:
progress: whether to display a progress bar **(if relevant)**.
- Revert this PR.
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.
thanks, I vote for option 1... @Nic-Ma thoughts?
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.
I agree with you guys, progress
should not be in the base class.
Thanks.
unify arguments for progress bar in datasets.