From ce6c8a5678e776f4ad98ec11356c4cd7adea221a 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 16:41:16 +0545 Subject: [PATCH] exp init: fix --explicit failing with KeyError Fixes #6917 --- dvc/repo/experiments/init.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dvc/repo/experiments/init.py b/dvc/repo/experiments/init.py index 4b5fdc918..5519485aa 100644 --- a/dvc/repo/experiments/init.py +++ b/dvc/repo/experiments/init.py @@ -240,10 +240,10 @@ def init( # suppress `metrics`/`params` if live is selected, unless # it is also provided via overrides/cli. # This makes output to be a checkpoint as well. - defaults.pop("metrics") - defaults.pop("params") + defaults.pop("metrics", None) + defaults.pop("params", None) else: - defaults.pop("live") # suppress live otherwise + defaults.pop("live", None) # suppress live otherwise context: Dict[str, str] = {**defaults, **overrides} assert "cmd" in context