Skip to content

Commit

Permalink
do not let default decospec overwrite existing --with
Browse files Browse the repository at this point in the history
updat econfig merge

add more temp code
  • Loading branch information
darinyu committed Jan 17, 2025
1 parent e1ae62c commit f257476
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions metaflow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ def config_merge_cb(ctx, param, value):
# command line.
# NOTE: Assumes that ctx.auto_envvar_prefix is set to METAFLOW (same as in
# from_conf)

# Special case where DECOSPECS and value are the same. This happens
# when there is no --with option at the TL and DECOSPECS is read from
# the env var. In this case, click also passes it as value
splits = DECOSPECS.split()
if len(splits) == len(value) and all([a == b for (a, b) in zip(splits, value)]):
return value
return tuple(list(value) + DECOSPECS.split())


Expand Down Expand Up @@ -221,7 +214,6 @@ def output_dot(obj):
)
echo_always(obj.graph.output_dot(), err=False)


@cli.command(help="Print the Metaflow version")
@click.pass_obj
def version(obj):
Expand Down Expand Up @@ -285,7 +277,6 @@ def version(obj):
multiple=True,
help="Add a decorator to all steps. You can specify this option "
"multiple times to attach multiple decorators in steps.",
callback=config_merge_cb,
)
@click.option(
"--pylint/--no-pylint",
Expand Down Expand Up @@ -334,6 +325,7 @@ def start(
config_value=None,
**deco_options
):

if quiet:
echo = echo_dev_null
else:
Expand Down

0 comments on commit f257476

Please sign in to comment.