-
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: return error messages for failed plots #7692
Comments
What will be the |
We'll be processing the errors before displaying anything to the user. Would be good to have a way to identify where certain revisions are missing data due to errors (as in the example provided in #7691). |
@pared Any progress on this one? |
No, but I believe we could include it as a part of implementing iterative/vscode-dvc#1757 |
@pared Any updates on looking into this one? |
I consider it as a part of aforementioned issue on |
Note to self: since returning errors will probably require data structure change, we need to remember to get rid of filling |
I didn't left any comment during research, so: |
I see that data collection depends on the https://github.com/iterative/vscode-dvc/blob/main/extension/src/plots/model/collect.ts#L372 @mattseddon do you remember from the top of your head if we need Are there some proposals, tickets, PRs for the plots JSON format? |
I do not think that we need it. |
The original PR is here: #7367. From reading the description it looks like the data being duplicated is a bug for the |
No, I don't think so. For the duplicated data, I'm missing something because I have different output from what @shcheklein shows above. I don't see all the data in {
"dvc.yaml::Accuracy": [
{
"type": "vega",
"revisions": [
"504206e",
"f586d67",
"workspace"
],
"content": {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": "<DVC_METRIC_DATA>" # Nothing else shows up in this field.
},
... |
@dberenbaum my bad, I didn't use |
Updated the description - some examples of the current output. Next - try to add an error for an image plot (not directory with images_ case for now ( |
In general, I find returning errors to be a mistake. It increases a lot of maintenance burden, for which we are not ready internally. |
@skshetry it's a bad user experience to not show anything at all in case something fails and since we. I think if it's done right it won't be a bigger burden at all and code doesn't have to be complicated. We already have this data we just need to propagate it (I think so at least, I can be wrong). And to clarify, we don't talk here about processing specific types of errors, we just need a signal that plot exists in a revision and that it can't be loaded for some reason. On the maintenance side - I think the whole plots logic and related index part should be the first thing to improve. E.g. after the last refactoring we still have two plot accessors ( |
That's where the complexity is, right? It's easy to log or suppress but extremely hard to propagate up. We need small sets of APIs at the high level where we do this. At the moment we are spreading this logic to deep layers which increases the burden. I think there should be a symmetry between the product and the engineering side, and here I think the expectation on the product side is too high (or, was too high). :) |
Doesn't have to be. Sometimes dropping some code (that removes and / or transforms things) instead of exposing them directly (which might be just fine in this case) can simplify it. We'll see how it goes. I definitely want to avoid adding tons of custom code for this.
I think it's a wrong dichotomy in this case. I'm not sure if it's possible to do it now w/o complicating things. It's definitely doesn't add much complexity to do this from scratch. If we had the standard in mind (it's not high at all) we would have spent some small additional percent of time. Product expectation - we talk about VS Code, right (that's what I have in mind in the first place), not DVC? Just in case. I'm fine (more or less) for DVC to return a generic error (and write something in logs). In VS Code it leads to bad experience. It's not top priority (that's why I'm doing this in background), but it can and should be fixed. And we should have a higher standard for out products. |
For visibility: got distracted by some other plots issues (broken smooth templates, new DVCLive release) and didn't have capacity for this hands on work (which is not a lot of time by default). I'll try to get back to this asap. Some design decisions that are tricky here. If we have a plot directory we expand each file in that directory as its own plot when we return the result. It's fine. The problem is that we don't know the layout if we can't download the |
@shcheklein Can you clarify the full scope of the issue? Is it only about plot directories, or is that merely one case you are trying to solve for? |
Yes, @dberenbaum . It's related to this issues - iterative/vscode-dvc#2277 and iterative/vscode-dvc#1649 in VS Code repo. Very high level - we need to distinguish absent plots from errors and show some signal to users vs silently ignoring things and/or showing misleading messages (refresh button when there is nothing to refresh in an experiment).
Thus: The full scope: show error message for all plot definitions, not only directories / images. |
@skshetry Can you follow up with questions you have, and @shcheklein and I can respond to define the scope better? By next week when you are finished with support duty, let's try to have a solid plan and estimate 🙏 . |
I could not look into this during support duty, as some p0s/bugs came. |
We do seem to preserve errors during |
@skshetry 🤔 tbh I don't think VS Code requires anything specific here. We should come up with a decent general format for this data. We can adjust VS Code if needed. |
I think what we've learned is that it's helpful to share drafts early and often to get feedback as you go so we know mostly what works in both products by the time we are ready to merge. |
Description and Motivation
If plots can't be processed we log only basic message and skip those plots in the
json
output:We need to have better results, granular messages about failed plots so that we can show in VS Code properly instead of silently ignoring it, see
Current Output
All examples are done for multiple revisions,
--json
+--split
flags.Single image
Flexible (top-level) plot
Multiple images
Stage linear plot
Unblocks, Related
iterative/vscode-dvc#2277
iterative/vscode-dvc#1649
Next Steps
The text was updated successfully, but these errors were encountered: