metaflow 2.14.1__py2.py3-none-any.whl → 2.14.2__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
metaflow/cli.py CHANGED
@@ -16,7 +16,6 @@ from .exception import CommandException, MetaflowException
16
16
  from .flowspec import _FlowState
17
17
  from .graph import FlowGraph
18
18
  from .metaflow_config import (
19
- DECOSPECS,
20
19
  DEFAULT_DATASTORE,
21
20
  DEFAULT_ENVIRONMENT,
22
21
  DEFAULT_EVENT_LOGGER,
@@ -106,26 +105,6 @@ def logger(body="", system_msg=False, head="", bad=False, timestamp=True, nl=Tru
106
105
  click.secho(body, bold=system_msg, fg=LOGGER_BAD_COLOR if bad else None, nl=nl)
107
106
 
108
107
 
109
- def config_merge_cb(ctx, param, value):
110
- # Callback to:
111
- # - read the Click auto_envvar variable from both the
112
- # environment AND the configuration
113
- # - merge that value with the value passed in the command line (value)
114
- # - return the value as a tuple
115
- # Note that this function gets called even if there is no option passed on the
116
- # command line.
117
- # NOTE: Assumes that ctx.auto_envvar_prefix is set to METAFLOW (same as in
118
- # from_conf)
119
-
120
- # Special case where DECOSPECS and value are the same. This happens
121
- # when there is no --with option at the TL and DECOSPECS is read from
122
- # the env var. In this case, click also passes it as value
123
- splits = DECOSPECS.split()
124
- if len(splits) == len(value) and all([a == b for (a, b) in zip(splits, value)]):
125
- return value
126
- return tuple(list(value) + DECOSPECS.split())
127
-
128
-
129
108
  @click.group(
130
109
  cls=LazyGroup,
131
110
  lazy_subcommands={
@@ -284,7 +263,6 @@ def version(obj):
284
263
  multiple=True,
285
264
  help="Add a decorator to all steps. You can specify this option "
286
265
  "multiple times to attach multiple decorators in steps.",
287
- callback=config_merge_cb,
288
266
  )
289
267
  @click.option(
290
268
  "--pylint/--no-pylint",
@@ -8,6 +8,7 @@ from .. import decorators, namespace, parameters, tracing
8
8
  from ..exception import CommandException
9
9
  from ..graph import FlowGraph
10
10
  from ..metaflow_current import current
11
+ from ..metaflow_config import DEFAULT_DECOSPECS
11
12
  from ..package import MetaflowPackage
12
13
  from ..runtime import NativeRuntime
13
14
  from ..system import _system_logger
@@ -70,6 +71,23 @@ def write_file(file_path, content):
70
71
  f.write(str(content))
71
72
 
72
73
 
74
+ def config_merge_cb(ctx, param, value):
75
+ # Callback to:
76
+ # - read the Click auto_envvar variable from both the
77
+ # environment AND the configuration
78
+ # - merge that value with the value passed in the command line (value)
79
+ # - return the value as a tuple
80
+ # Note that this function gets called even if there is no option passed on the
81
+ # command line.
82
+ # NOTE: Assumes that ctx.auto_envvar_prefix is set to METAFLOW (same as in
83
+ # from_conf)
84
+
85
+ # Read decospecs options from the environment (METAFLOW_DEFAULT_DECOSPECS=...)
86
+ # and merge them with the one provided as --with.
87
+ splits = DEFAULT_DECOSPECS.split()
88
+ return tuple(list(value) + splits)
89
+
90
+
73
91
  def common_run_options(func):
74
92
  @click.option(
75
93
  "--tag",
@@ -109,6 +127,7 @@ def common_run_options(func):
109
127
  help="Add a decorator to all steps. You can specify this "
110
128
  "option multiple times to attach multiple decorators "
111
129
  "in steps.",
130
+ callback=config_merge_cb,
112
131
  )
113
132
  @click.option(
114
133
  "--run-id-file",
@@ -284,7 +284,7 @@ CONTACT_INFO = from_conf(
284
284
  ###
285
285
  # Format is a space separated string of decospecs (what is passed
286
286
  # using --with)
287
- DECOSPECS = from_conf("DECOSPECS", "")
287
+ DEFAULT_DECOSPECS = from_conf("DEFAULT_DECOSPECS", "")
288
288
 
289
289
  ###
290
290
  # AWS Batch configuration
@@ -577,9 +577,9 @@ try:
577
577
  _TOGGLE_DECOSPECS.extend(o)
578
578
  elif not n.startswith("__") and not isinstance(o, types.ModuleType):
579
579
  globals()[n] = o
580
- # If DECOSPECS is set, use that, else extrapolate from extensions
581
- if not DECOSPECS:
582
- DECOSPECS = " ".join(_TOGGLE_DECOSPECS)
580
+ # If DEFAULT_DECOSPECS is set, use that, else extrapolate from extensions
581
+ if not DEFAULT_DECOSPECS:
582
+ DEFAULT_DECOSPECS = " ".join(_TOGGLE_DECOSPECS)
583
583
 
584
584
  finally:
585
585
  # Erase all temporary names to avoid leaking things
metaflow/version.py CHANGED
@@ -1 +1 @@
1
- metaflow_version = "2.14.1"
1
+ metaflow_version = "2.14.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: metaflow
3
- Version: 2.14.1
3
+ Version: 2.14.2
4
4
  Summary: Metaflow: More Data Science, Less Engineering
5
5
  Author: Metaflow Developers
6
6
  Author-email: help@metaflow.org
@@ -26,7 +26,7 @@ License-File: LICENSE
26
26
  Requires-Dist: requests
27
27
  Requires-Dist: boto3
28
28
  Provides-Extra: stubs
29
- Requires-Dist: metaflow-stubs==2.14.1; extra == "stubs"
29
+ Requires-Dist: metaflow-stubs==2.14.2; extra == "stubs"
30
30
  Dynamic: author
31
31
  Dynamic: author-email
32
32
  Dynamic: classifier
@@ -1,7 +1,7 @@
1
1
  metaflow/R.py,sha256=CqVfIatvmjciuICNnoyyNGrwE7Va9iXfLdFbQa52hwA,3958
2
2
  metaflow/__init__.py,sha256=fbhdWiWnEoAX4KnzRHMY_iQcT-uYlMWhzrXPKvK0i5g,5832
3
3
  metaflow/cards.py,sha256=IbRmredvmFEU0V6JL7DR8wCESwVmmZJubr6x24bo7U4,442
4
- metaflow/cli.py,sha256=mFTp2QzKoi_5rhf9_ht-GHj8-sVBbVdXqOXEMIjnktA,21846
4
+ metaflow/cli.py,sha256=RU-yXpT-Lfl3xGyFNtL742e9KEqcRxEnQ-4mwXrXhvo,20928
5
5
  metaflow/cli_args.py,sha256=hDsdWdRmfXYifVGq6b6FDfgoWxtIG2nr_lU6EBV0Pnk,3584
6
6
  metaflow/clone_util.py,sha256=LSuVbFpPUh92UW32DBcnZbL0FFw-4w3CLa0tpEbCkzk,2066
7
7
  metaflow/cmd_with_io.py,sha256=kl53HkAIyv0ecpItv08wZYczv7u3msD1VCcciqigqf0,588
@@ -16,7 +16,7 @@ metaflow/includefile.py,sha256=kWKDSlzVcRVNGG9PV5eB3o2ynrzqhVsfaLtkqjshn7Q,20948
16
16
  metaflow/info_file.py,sha256=wtf2_F0M6dgiUu74AFImM8lfy5RrUw5Yj7Rgs2swKRY,686
17
17
  metaflow/integrations.py,sha256=LlsaoePRg03DjENnmLxZDYto3NwWc9z_PtU6nJxLldg,1480
18
18
  metaflow/lint.py,sha256=x4p6tnRzYqNNniCGXyrUW0WuYfTUgnaOMRivxvnxask,11661
19
- metaflow/metaflow_config.py,sha256=t9x39B64B3OWmWRexKseHkb0lnaEaYYY4UAzE7Uyjls,23289
19
+ metaflow/metaflow_config.py,sha256=IUy5WQTR93EO5aUxIZvBe88tZvDy-Szq7ceZciI-LzM,23329
20
20
  metaflow/metaflow_config_funcs.py,sha256=5GlvoafV6SxykwfL8D12WXSfwjBN_NsyuKE_Q3gjGVE,6738
21
21
  metaflow/metaflow_current.py,sha256=pfkXmkyHeMJhxIs6HBJNBEaBDpcl5kz9Wx5mW6F_3qo,7164
22
22
  metaflow/metaflow_environment.py,sha256=gs_UpYpuOKEEfFM0z0tnwje7zAVsQ5Ck7Dp2M9_1utQ,8065
@@ -36,7 +36,7 @@ metaflow/tuple_util.py,sha256=_G5YIEhuugwJ_f6rrZoelMFak3DqAR2tt_5CapS1XTY,830
36
36
  metaflow/unbounded_foreach.py,sha256=p184WMbrMJ3xKYHwewj27ZhRUsSj_kw1jlye5gA9xJk,387
37
37
  metaflow/util.py,sha256=mJBkV5tShIyCsLDeM1zygQGeciQVMrVPm_qI8Oi33G0,14656
38
38
  metaflow/vendor.py,sha256=FchtA9tH22JM-eEtJ2c9FpUdMn8sSb1VHuQS56EcdZk,5139
39
- metaflow/version.py,sha256=fyDZXks2VX1Hb8fXY7qYRCSj4E6RJ_8skOF33Cnea4w,28
39
+ metaflow/version.py,sha256=M5GonkG8Qlp7paw-5B7c8scuFg_dwcxAm9VsfN3geHk,28
40
40
  metaflow/_vendor/__init__.py,sha256=y_CiwUD3l4eAKvTVDZeqgVujMy31cAM1qjAB-HfI-9s,353
41
41
  metaflow/_vendor/typing_extensions.py,sha256=0nUs5p1A_UrZigrAVBoOEM6TxU37zzPDUtiij1ZwpNc,110417
42
42
  metaflow/_vendor/zipp.py,sha256=ajztOH-9I7KA_4wqDYygtHa6xUBVZgFpmZ8FE74HHHI,8425
@@ -113,7 +113,7 @@ metaflow/_vendor/v3_6/importlib_metadata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCe
113
113
  metaflow/cli_components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
114
114
  metaflow/cli_components/dump_cmd.py,sha256=SZEX51BWNd1o3H2uHDkYA8KRvou5X8g5rTwpdu5vnNQ,2704
115
115
  metaflow/cli_components/init_cmd.py,sha256=Er-BO59UEUV1HIsg81bRtZWT2D2IZNMp93l-AoZLCls,1519
116
- metaflow/cli_components/run_cmds.py,sha256=FHXqYyGXlr4m2CVOoBagfPgKny4nu2L_QReVgBGVRVA,10530
116
+ metaflow/cli_components/run_cmds.py,sha256=gAJeiuFt5y1IcVclwH6TV9p-JCy6-rDtEKUj2ioMO0s,11304
117
117
  metaflow/cli_components/step_cmd.py,sha256=zGJgTv7wxrv34nWDi__CHaC2eS6kItR95EdVGJX803w,4766
118
118
  metaflow/cli_components/utils.py,sha256=gpoDociadjnJD7MuiJup_MDR02ZJjjleejr0jPBu29c,6057
119
119
  metaflow/client/__init__.py,sha256=1GtQB4Y_CBkzaxg32L1syNQSlfj762wmLrfrDxGi1b8,226
@@ -360,9 +360,9 @@ metaflow/user_configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
360
360
  metaflow/user_configs/config_decorators.py,sha256=qCKVAvd0NKgaCxQ2OThes5-DYHXq6A1HqURubYNeFdw,20481
361
361
  metaflow/user_configs/config_options.py,sha256=m6jccSpzI4qUJ7vyYkYBIf8G3V0Caunxg_k7zg4Zlqg,21067
362
362
  metaflow/user_configs/config_parameters.py,sha256=oeJGVKu1ao_YQX6Lg6P2FEv5k5-_F4sARLlVpTW9ezM,15502
363
- metaflow-2.14.1.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
364
- metaflow-2.14.1.dist-info/METADATA,sha256=s4WRKmdEujHhp-jJSvjY2JBNVuwTmHQlomqc7PHrJB8,6121
365
- metaflow-2.14.1.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
366
- metaflow-2.14.1.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
367
- metaflow-2.14.1.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
368
- metaflow-2.14.1.dist-info/RECORD,,
363
+ metaflow-2.14.2.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
364
+ metaflow-2.14.2.dist-info/METADATA,sha256=WKIgaDRqgKkOW2Y-pxA-bNn6z-YVywE7GQo10Rfu2-A,6121
365
+ metaflow-2.14.2.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
366
+ metaflow-2.14.2.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
367
+ metaflow-2.14.2.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
368
+ metaflow-2.14.2.dist-info/RECORD,,