exp show :Add `--hide-queued` and `--hide-failed` flag
-
[x] ❗ I have followed the Contributing to DVC checklist.
-
[x] 📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
fix: #7986
- Add "status" to replace "running" and "queued" in output of
exp show. - Add flags
--hide-queuedand--hide-failedtoexp show - Allow
exp showto show failed experiments. - Add unit test for the failed experiments shown.
- Add error msg to the
exp showoutput
Need a coordinate with VS-CODE extension. @mattseddon
Example of current output in JSON: for failed exp
"data": {
"timestamp": ANY,
"params": {"params.yaml": {"data": {"foo": 2}}},
"deps": {"copy.py": {"hash": None, "size": None, "nfiles": None}},
"outs": {},
"status": "Failed",
"executor": None,
"error": {
"msg": "ERROR: failed to reproduce 'failed-copy-file': "
"failed to run: python -c 'import sys; sys.exit(1)', "
"exited with 1",
"type": "",
},
}
for other
"data": {
"deps": {
"copy.py": {
"hash": ANY,
"size": ANY,
"nfiles": None,
}
},
"metrics": {},
"outs": {},
"params": {"params.yaml": {"data": {"foo": 1}}},
"status": "Success",
"executor": None,
"timestamp": timestamp,
"name": "master",
"error": {},
}
- ["data"]["error"]["type"] is now only a placeholder. Need to define different types and other info. 2.["data"]["error"]["msg"] will show the last line of the output log.
- The old ["data"]["running"] and ["data"]["queued"] were obsolete because they will show the wrong status on the failed experiment to the user.
- Current status list in
dvc/repo/experiments/show.py
class ExpStatus(Enum):
Success = 0
Queued = 1
Running = 2
Failed = 3
for failed exp
"data": { "timestamp": ANY, "params": {"params.yaml": {"data": {"foo": 2}}}, "deps": {"copy.py": {"hash": None, "size": None, "nfiles": None}}, "outs": {}, "status": "Failed", "executor": None, "error": { "msg": "ERROR: failed to reproduce 'failed-copy-file': " "failed to run: python -c 'import sys; sys.exit(1)', " "exited with 1", "type": "", }, }for other
"data": { "deps": { "copy.py": { "hash": ANY, "size": ANY, "nfiles": None, } }, "metrics": {}, "outs": {}, "params": {"params.yaml": {"data": {"foo": 1}}}, "status": "Success", "executor": None, "timestamp": timestamp, "name": "master", "error": {}, }
It would be helpful if you could not add the error key into the dict unless there has been an error (i.e the dict is non-empty).
Use a more general message to replace the error message. BTW, I found the tasks can fail for
- Failed to acquire lock.
- Too many open files. ... We should gather these and they are helpful msg for the users. But this is a separate feature request from this.
Thanks @karajan1001! Could you rebase?
Do you need either @pmrowla or @mattseddon to review?
Thanks @karajan1001! Could you rebase?
Do you need either @pmrowla or @mattseddon to review?
I think both the engineering and the API sides require a check.