studio: Send metrics on done event. (#9027)

This commit is contained in:
David de la Iglesia Castro
2023-03-07 19:47:22 +01:00
committed by GitHub
parent 7ede45af2d
commit f1ea64c4ef
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -21,6 +21,7 @@ from typing import (
Union,
)
from funcy import get_in
from scmrepo.exceptions import SCMError
from dvc.env import DVC_EXP_AUTO_PUSH, DVC_EXP_GIT_REMOTE
@@ -590,6 +591,7 @@ class BaseExecutor(ABC):
info.name,
"dvc",
experiment_rev=dvc.experiments.scm.get_ref(EXEC_BRANCH),
metrics=get_in(dvc.metrics.show(), ["", "data"]),
)
if infofile is not None:
+1 -1
View File
@@ -37,7 +37,7 @@ dependencies = [
"dvc-data>=0.42.1,<0.43",
"dvc-http",
"dvc-render>=0.1.2",
"dvc-studio-client>=0.1.1",
"dvc-studio-client>=0.5.0,<1",
"dvc-task>=0.2.0,<1",
"flatten_dict<1,>=0.4.1",
"flufl.lock>=5",
@@ -38,4 +38,5 @@ def test_post_to_studio(tmp_dir, dvc, scm, exp_stage, mocker, monkeypatch, tmp):
"name": name,
"client": "dvc",
"experiment_rev": exp_rev,
"metrics": {"metrics.yaml": {"data": {"foo": 1}}},
}