From d668cbeb4524649bc64b3698cebba732bc7c14d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Wed, 3 Nov 2021 19:12:55 +0545 Subject: [PATCH] exp init: warn for code/data if they don't exist --- dvc/repo/experiments/init.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dvc/repo/experiments/init.py b/dvc/repo/experiments/init.py index a7cf57481..ef3a59332 100644 --- a/dvc/repo/experiments/init.py +++ b/dvc/repo/experiments/init.py @@ -281,6 +281,13 @@ def init( f"'{value}' {reason}. " "Please retry with an existing parameters file." ) + elif key in ("code", "data"): + if not os.path.exists(value): + ui.error_write( + f"[yellow]'{value}' does not exist in the workspace. " + '"exp run" may fail.[/]', + styled=True, + ) if interactive: defaults = init_interactive(