Skip to content

Commit

Permalink
move defaults to the class level (iterative#6762)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Oct 8, 2021
1 parent d33df60 commit 3ed5efc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions dvc/command/experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,15 @@ class CmdExperimentsInit(CmdBase):
DEFAULT_PARAMS = "params.yaml"
PLOTS = "plots"
DVCLIVE = "dvclive"
DEFAULTS = {
"code": CODE,
"data": DATA,
"models": MODELS,
"metrics": DEFAULT_METRICS,
"params": DEFAULT_PARAMS,
"plots": PLOTS,
"live": DVCLIVE,
}

def run(self):
from dvc.command.stage import parse_cmd
Expand All @@ -797,19 +806,10 @@ def run(self):

from dvc.repo.experiments.init import init

global_defaults = {
"code": self.CODE,
"data": self.DATA,
"models": self.MODELS,
"metrics": self.DEFAULT_METRICS,
"params": self.DEFAULT_PARAMS,
"plots": self.PLOTS,
"live": self.DVCLIVE,
}
defaults = {}
if not self.args.explicit:
config = {} # TODO
defaults.update({**global_defaults, **config})
defaults.update({**self.DEFAULTS, **config})

cli_args = compact(
{
Expand Down

0 comments on commit 3ed5efc

Please sign in to comment.