-
Notifications
You must be signed in to change notification settings - Fork 379
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
The plot methods in Datasets should be flexible #116
Comments
As a user I'll want to call plot either with a single sample from the Dataset object (e.g. in a Jupyter Notebook while doing EDA), or with a single sample + predictions (e.g. from a
@isaaccorley @adamjstewart thoughts? |
I agree with making the (optional) prediction be an entry in the sample dict. As for What I would add is a Originally I was thinking about how to make |
Agree on the batching -- we could just run Mild disagree on removing the titles/suptitle -- those are nice convenience features. Users could do those by themselves, but the point of a plot is to make it easy to get a quick rendering of the data. What sort of |
To clarify, I think we should always add titles/suptitles, I don't think we need a parameter to control whether or not they get added. For kwargs, I could see someone wanting a custom cmap maybe. |
(I'm not understanding you) So you think title and suptitle should be non optional? For kwargs, I can see where your coming from -- but now, how do they get routed to the correct |
Yes, titles should be non-optional. I wonder if there is a way to remove them after they've been added... We could require that |
Gotcha, would renaming what I have as I'm still a fan of having an optional suptitle argument that is just a shortcut for writing out a super title in the correct place/size.
Seems good! |
I don't really have too many opinions, but a couple thoughts:
|
@calebrob6 my only complaint about that is that we'll need to add this arg to every plot method, copy the docs, and add an extra if-statement for it. It might be simpler to tell users to clear the title themselves if they really don't like it. |
Yep makes sense! I just see that as part of the normal work (and not like an extra burden). I think we roughly agree (that plotting should happen in the dataset, that it should assume the values it gets are the same values that are returned by a call to getitem, and that we should return a figure). The only tricky part I see is "denormalizing" samples in |
I propose that we skip title, suptitle, kwargs, etc. and just have a single way to plot a sample from each dataset. If someone asks for more customization in the future, we can always add it later. Since these values are all optional, it won't be a breaking API change to add it later. I think it's better to keep it simple and add complexity only when we need to. |
Skipping titles is something I use often (which is why I added it -- e.g. I often create figures in draw.io where I stack several samples and add the titles / other annotation manually). suptitles is especially useful for adding the sample id of an image when debugging (e.g. if validation dataloader is on shuffle, it is useful to do this so you can find an interesting sample again). |
I think we've decided on a basic API for now, tracking of which datasets still need a new/updated plot method can happen in #253. |
As a user I will frequently want to
plot
images, predictions, masks, etc. The current definition ofplot
in RasterDataset is limited.The text was updated successfully, but these errors were encountered: