exp init: warn for code/data if they don't exist

This commit is contained in:
Saugat Pachhai (सौगात)
2021-11-11 08:09:37 +05:45
committed by Saugat Pachhai
parent a466241552
commit d668cbeb45
+7
View File
@@ -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(