dvc icon indicating copy to clipboard operation
dvc copied to clipboard

exp show :Add `--hide-queued` and `--hide-failed` flag

Open karajan1001 opened this issue 3 years ago • 1 comments

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

fix: #7986

  1. Add "status" to replace "running" and "queued" in output of exp show.
  2. Add flags --hide-queued and --hide-failed to exp show
  3. Allow exp show to show failed experiments.
  4. Add unit test for the failed experiments shown.
  5. Add error msg to the exp show output

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": {}, 
}
  1. ["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.
  2. The old ["data"]["running"] and ["data"]["queued"] were obsolete because they will show the wrong status on the failed experiment to the user.
  3. Current status list in dvc/repo/experiments/show.py
class ExpStatus(Enum):
    Success = 0
    Queued = 1
    Running = 2
    Failed = 3

asciicast

karajan1001 avatar Sep 19 '22 03:09 karajan1001

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).

mattseddon avatar Sep 20 '22 06:09 mattseddon

Use a more general message to replace the error message. BTW, I found the tasks can fail for

  1. Failed to acquire lock.
  2. 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.

karajan1001 avatar Sep 30 '22 10:09 karajan1001

Thanks @karajan1001! Could you rebase?

Do you need either @pmrowla or @mattseddon to review?

dberenbaum avatar Sep 30 '22 15:09 dberenbaum

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.

karajan1001 avatar Oct 03 '22 08:10 karajan1001