-
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
plots: allow definition of plots section as list #8412
Conversation
Somehow related to #8371, since in that case I'd expect params/metrics to be lists and not mappings |
@pared What do you think? I think this was purposely a mapping since unique keys are required, but isn't that true for stage plots and other deps/outs that take lists? |
@dberenbaum yep, I think that we can enforce uniqueness with schema validation rules. Also that would make plots more conforming with how we handle outputs. |
@dtrifiro Great idea. Let's do it! |
Agreed, I don't think we should need mappings support for these. |
e2a8617
to
372a8a9
Compare
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.
Reminder to update https://github.com/iterative/dvcyaml-schema
Thanks @daavoo: iterative/dvcyaml-schema#23 |
372a8a9
to
ca82ce1
Compare
@dberenbaum can we merge this? |
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.
Let's merge, although I don't have permission to merge
What is the canonical way of writing top-level plots now? Although I prefer this schema, I am -1 on this as I don't see much difference between the two, and only increases the maintenance burden and worsens the error message ( Also, the top-level plots section is not the same as plots: Union[
Dict[
PlotIdOrFilePath, Union[TopLevelPlotFlags, EmptyTopLevelPlotFlags]
],
List[
Dict[
PlotIdOrFilePath,
Union[TopLevelPlotFlags, EmptyTopLevelPlotFlags],
]
],
] Regarding 3.0 deprecation, we haven't deprecated anything in |
I think list format should be the canonical way. It matches stage plots and stage outputs and also upcoming top-level sections like params and metrics. We need to update docs here. We can update now to only mention list support. We can even only add list support to schema validation. Not sure how much it saves us to make the breaking change in 3.0 of dropping mapping/dict support. I'm fine with leaving it unless it will cause major headaches so as not to break anyone's projects. |
Top-level section for
plots
currently requires a mapping, which looks like this:with this PR, we allow for the
plots
top-level section to be defined as a list, which should make it more similar to how plots are defined in the stage sections: