exp init: Update DVCLive paths.

Closes #8531
This commit is contained in:
David de la Iglesia Castro
2022-11-07 12:45:32 +01:00
parent 240f0ebdc3
commit 78e25747a4
2 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -250,8 +250,8 @@ def init(
models = context.get("models")
live_path = context.pop("live", None)
live_metrics = f"{live_path}.json" if live_path else None
live_plots = os.path.join(live_path, "scalars") if live_path else None
live_metrics = f"{live_path}/metrics.json" if live_path else None
live_plots = os.path.join(live_path, "plots") if live_path else None
if type == "checkpoint":
outs_key = "checkpoints"
+8 -6
View File
@@ -345,11 +345,13 @@ def test_init_interactive_live(
"train": {
"cmd": "python script.py",
"deps": ["data", "script.py"],
"metrics": [{"dvclive.json": {"cache": False}}],
"metrics": [
{os.path.join("dvclive", "metrics.json"): {"cache": False}}
],
"outs": ["models"],
"params": [{"params.yaml": None}],
"plots": [
{os.path.join("dvclive", "scalars"): {"cache": False}}
{os.path.join("dvclive", "plots"): {"cache": False}}
],
}
}
@@ -434,12 +436,12 @@ def test_init_with_type_default_and_live_provided(
"cmd": "cmd",
"deps": ["data", "src"],
"metrics": [
{"live.json": {"cache": False}},
{os.path.join("live", "metrics.json"): {"cache": False}},
],
"outs": ["models"],
"params": [{"params.yaml": None}],
"plots": [
{os.path.join("live", "scalars"): {"cache": False}},
{os.path.join("live", "plots"): {"cache": False}},
],
}
}
@@ -477,13 +479,13 @@ def test_init_with_live_and_metrics_plots_provided(
"cmd": "cmd",
"deps": ["data", "src"],
"metrics": [
{"live.json": {"cache": False}},
{os.path.join("live", "metrics.json"): {"cache": False}},
{"metrics.json": {"cache": False}},
],
"outs": ["models"],
"params": [{"params.yaml": None}],
"plots": [
{os.path.join("live", "scalars"): {"cache": False}},
{os.path.join("live", "plots"): {"cache": False}},
{"plots": {"cache": False}},
],
}