metaflow 2.12.23__py2.py3-none-any.whl → 2.12.25__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/plugins/argo/argo_workflows.py +12 -0
- metaflow/plugins/argo/argo_workflows_cli.py +1 -1
- metaflow/plugins/kubernetes/kubernetes_client.py +3 -6
- metaflow/plugins/pypi/micromamba.py +11 -4
- metaflow/plugins/pypi/pip.py +4 -1
- metaflow/task.py +7 -0
- metaflow/version.py +1 -1
- {metaflow-2.12.23.dist-info → metaflow-2.12.25.dist-info}/METADATA +2 -2
- {metaflow-2.12.23.dist-info → metaflow-2.12.25.dist-info}/RECORD +13 -13
- {metaflow-2.12.23.dist-info → metaflow-2.12.25.dist-info}/LICENSE +0 -0
- {metaflow-2.12.23.dist-info → metaflow-2.12.25.dist-info}/WHEEL +0 -0
- {metaflow-2.12.23.dist-info → metaflow-2.12.25.dist-info}/entry_points.txt +0 -0
- {metaflow-2.12.23.dist-info → metaflow-2.12.25.dist-info}/top_level.txt +0 -0
@@ -2633,6 +2633,9 @@ class ArgoWorkflows(object):
|
|
2633
2633
|
|
2634
2634
|
return (
|
2635
2635
|
DaemonTemplate("heartbeat-daemon")
|
2636
|
+
# NOTE: Even though a retry strategy does not work for Argo daemon containers,
|
2637
|
+
# this has the side-effect of protecting the exit hooks of the workflow from failing in case the daemon container errors out.
|
2638
|
+
.retry_strategy(10, 1)
|
2636
2639
|
.service_account_name(resources["service_account"])
|
2637
2640
|
.container(
|
2638
2641
|
to_camelcase(
|
@@ -3304,6 +3307,15 @@ class DaemonTemplate(object):
|
|
3304
3307
|
self.payload["serviceAccountName"] = service_account_name
|
3305
3308
|
return self
|
3306
3309
|
|
3310
|
+
def retry_strategy(self, times, minutes_between_retries):
|
3311
|
+
if times > 0:
|
3312
|
+
self.payload["retryStrategy"] = {
|
3313
|
+
"retryPolicy": "Always",
|
3314
|
+
"limit": times,
|
3315
|
+
"backoff": {"duration": "%sm" % minutes_between_retries},
|
3316
|
+
}
|
3317
|
+
return self
|
3318
|
+
|
3307
3319
|
def to_json(self):
|
3308
3320
|
return self.payload
|
3309
3321
|
|
@@ -121,10 +121,7 @@ class KubernetesClient(object):
|
|
121
121
|
job_api = self._client.BatchV1Api()
|
122
122
|
pods = self._find_active_pods(flow_name, run_id, user)
|
123
123
|
|
124
|
-
active_pods = False
|
125
|
-
|
126
124
|
def _kill_pod(pod):
|
127
|
-
active_pods = True
|
128
125
|
echo("Killing Kubernetes pod %s\n" % pod.metadata.name)
|
129
126
|
try:
|
130
127
|
stream(
|
@@ -158,10 +155,10 @@ class KubernetesClient(object):
|
|
158
155
|
echo("failed to kill pod %s - %s" % (pod.metadata.name, str(e)))
|
159
156
|
|
160
157
|
with ThreadPoolExecutor() as executor:
|
161
|
-
executor.map(_kill_pod, pods)
|
158
|
+
operated_pods = list(executor.map(_kill_pod, pods))
|
162
159
|
|
163
|
-
|
164
|
-
|
160
|
+
if not operated_pods:
|
161
|
+
echo("No active Kubernetes pods found for run *%s*" % run_id)
|
165
162
|
|
166
163
|
def jobset(self, **kwargs):
|
167
164
|
return KubernetesJobSet(self, **kwargs)
|
@@ -270,15 +270,22 @@ class Micromamba(object):
|
|
270
270
|
except ValueError:
|
271
271
|
vpkg_version = None
|
272
272
|
raise MicromambaException(
|
273
|
-
"
|
274
|
-
"
|
273
|
+
"{msg}\n\n"
|
274
|
+
"*Please set the environment variable CONDA_OVERRIDE_{var} to a specific version{version} of {name}.*\n\n"
|
275
|
+
"Here is an example of supplying environment variables through the command line\n"
|
275
276
|
"CONDA_OVERRIDE_{var}=<{name}-version> python flow.py <args>".format(
|
277
|
+
msg=msg.format(
|
278
|
+
cmd=" ".join(e.cmd),
|
279
|
+
code=e.returncode,
|
280
|
+
output=e.output.decode(),
|
281
|
+
stderr=error,
|
282
|
+
),
|
276
283
|
var=vpkg_name.upper(),
|
277
284
|
version=(
|
278
|
-
"" if not vpkg_version else
|
285
|
+
"" if not vpkg_version else f" ({vpkg_version})"
|
279
286
|
),
|
280
287
|
name=vpkg_name,
|
281
|
-
)
|
288
|
+
)
|
282
289
|
)
|
283
290
|
err.append(error)
|
284
291
|
raise MicromambaException(
|
metaflow/plugins/pypi/pip.py
CHANGED
@@ -140,7 +140,10 @@ class Pip(object):
|
|
140
140
|
metadata_file = METADATA_FILE.format(prefix=prefix)
|
141
141
|
# download packages only if they haven't ever been downloaded before
|
142
142
|
if os.path.isfile(metadata_file):
|
143
|
-
|
143
|
+
with open(metadata_file, "r") as file:
|
144
|
+
metadata = json.load(file)
|
145
|
+
if all(package["url"] in metadata for package in packages):
|
146
|
+
return
|
144
147
|
|
145
148
|
metadata = {}
|
146
149
|
custom_index_url, extra_index_urls = self.indices(prefix)
|
metaflow/task.py
CHANGED
@@ -180,6 +180,10 @@ class MetaflowTask(object):
|
|
180
180
|
# 2) join - pop the topmost frame from the stack
|
181
181
|
# 3) step following a split - push a new frame in the stack
|
182
182
|
|
183
|
+
# We have a non-modifying case (case 4)) where we propagate the
|
184
|
+
# foreach-stack information to all tasks in the foreach. This is
|
185
|
+
# then used later to write the foreach-stack metadata for that task
|
186
|
+
|
183
187
|
# case 1) - reset the stack
|
184
188
|
if step_name == "start":
|
185
189
|
self.flow._foreach_stack = []
|
@@ -264,6 +268,9 @@ class MetaflowTask(object):
|
|
264
268
|
stack = inputs[0]["_foreach_stack"]
|
265
269
|
stack.append(frame)
|
266
270
|
self.flow._foreach_stack = stack
|
271
|
+
# case 4) - propagate in the foreach nest
|
272
|
+
elif "_foreach_stack" in inputs[0]:
|
273
|
+
self.flow._foreach_stack = inputs[0]["_foreach_stack"]
|
267
274
|
|
268
275
|
def _clone_flow(self, datastore):
|
269
276
|
x = self.flow.__class__(use_cli=False)
|
metaflow/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
metaflow_version = "2.12.
|
1
|
+
metaflow_version = "2.12.25"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: metaflow
|
3
|
-
Version: 2.12.
|
3
|
+
Version: 2.12.25
|
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.12.
|
29
|
+
Requires-Dist: metaflow-stubs==2.12.25; extra == "stubs"
|
30
30
|
|
31
31
|

|
32
32
|
|
@@ -31,12 +31,12 @@ metaflow/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
metaflow/pylint_wrapper.py,sha256=zzBY9YaSUZOGH-ypDKAv2B_7XcoyMZj-zCoCrmYqNRc,2865
|
32
32
|
metaflow/runtime.py,sha256=fbBObJJciagHWPzR3T7x9e_jez_RBnLZIHsXMvYnW_M,68875
|
33
33
|
metaflow/tagging_util.py,sha256=ctyf0Q1gBi0RyZX6J0e9DQGNkNHblV_CITfy66axXB4,2346
|
34
|
-
metaflow/task.py,sha256=
|
34
|
+
metaflow/task.py,sha256=5-Qy6wAm7dt7DnhnX1KVhVAKl4DWb3IZWIN5YCdRGIg,29043
|
35
35
|
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=olAvJK3y1it_k99MhLulTaAJo7OFVt5rnrD-ulIFLCU,13616
|
38
38
|
metaflow/vendor.py,sha256=FchtA9tH22JM-eEtJ2c9FpUdMn8sSb1VHuQS56EcdZk,5139
|
39
|
-
metaflow/version.py,sha256=
|
39
|
+
metaflow/version.py,sha256=YNnU6aijCl2Es_80zvwrPAhbV1OF5FlO1xdfXYRyWuA,29
|
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
|
@@ -175,8 +175,8 @@ metaflow/plugins/airflow/sensors/s3_sensor.py,sha256=iDReG-7FKnumrtQg-HY6cCUAAqN
|
|
175
175
|
metaflow/plugins/argo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
176
176
|
metaflow/plugins/argo/argo_client.py,sha256=KTUpP0DmnmNsMp4tbdNyKX_zOdTFRVpUkrf7Vv79d-o,16011
|
177
177
|
metaflow/plugins/argo/argo_events.py,sha256=_C1KWztVqgi3zuH57pInaE9OzABc2NnncC-zdwOMZ-w,5909
|
178
|
-
metaflow/plugins/argo/argo_workflows.py,sha256=
|
179
|
-
metaflow/plugins/argo/argo_workflows_cli.py,sha256=
|
178
|
+
metaflow/plugins/argo/argo_workflows.py,sha256=2todjgM06mkqkXn4_-7ume7AknIqr3ehZNTikJU4bBM,173579
|
179
|
+
metaflow/plugins/argo/argo_workflows_cli.py,sha256=0qAGo0YlC1Y9-1zqYAzhVCpCcITotfOI421VOIRpseM,37232
|
180
180
|
metaflow/plugins/argo/argo_workflows_decorator.py,sha256=yprszMdbE3rBTcEA9VR0IEnPjTprUauZBc4SBb-Q7sA,7878
|
181
181
|
metaflow/plugins/argo/argo_workflows_deployer.py,sha256=wSSZtThn_VPvE_Wu6NB1L0Q86LmBJh9g009v_lpvBPM,8125
|
182
182
|
metaflow/plugins/argo/capture_error.py,sha256=Ys9dscGrTpW-ZCirLBU0gD9qBM0BjxyxGlUMKcwewQc,1852
|
@@ -282,7 +282,7 @@ metaflow/plugins/kubernetes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
282
282
|
metaflow/plugins/kubernetes/kube_utils.py,sha256=fYDlvqi8jYPsWijDwT6Z2qhQswyFqv7tiwtic_I80Vg,749
|
283
283
|
metaflow/plugins/kubernetes/kubernetes.py,sha256=bKBqgZXnIDkoa4xKtKoV6InPtYQy4CujfvcbQ3Pvsbc,31305
|
284
284
|
metaflow/plugins/kubernetes/kubernetes_cli.py,sha256=sFZ9Zrjef85vCO0MGpUF-em8Pw3dePFb3hbX3PtAH4I,13463
|
285
|
-
metaflow/plugins/kubernetes/kubernetes_client.py,sha256=
|
285
|
+
metaflow/plugins/kubernetes/kubernetes_client.py,sha256=tuvXP-QKpdeSmzVolB2R_TaacOr5DIb0j642eKcjsiM,6491
|
286
286
|
metaflow/plugins/kubernetes/kubernetes_decorator.py,sha256=xz2tEIapYWMd9rRiOe8qcYvjRIKT5piWnq-twdySpD8,26031
|
287
287
|
metaflow/plugins/kubernetes/kubernetes_job.py,sha256=Cfkee8LbXC17jSXWoeNdomQRvF_8YSeXNg1gvxm6E_M,31806
|
288
288
|
metaflow/plugins/kubernetes/kubernetes_jobsets.py,sha256=wb0sK1OxW7pRbKdj6bWB4JsskXDsoKKqjyUWo4N9Y6E,41196
|
@@ -293,8 +293,8 @@ metaflow/plugins/pypi/__init__.py,sha256=0YFZpXvX7HCkyBFglatual7XGifdA1RwC3U4kci
|
|
293
293
|
metaflow/plugins/pypi/bootstrap.py,sha256=FI-itExqIz7DUzLnnkGwoB60rFBviygpIFThUtqk_4E,5227
|
294
294
|
metaflow/plugins/pypi/conda_decorator.py,sha256=fPeXxvmg51oSFTnlguNlcWUIdXHA9OuMnp9ElaxQPFo,15695
|
295
295
|
metaflow/plugins/pypi/conda_environment.py,sha256=--q-8lypKupCdGsASpqABNpNqRxtQi6UCDgq8iHDFe4,19476
|
296
|
-
metaflow/plugins/pypi/micromamba.py,sha256=
|
297
|
-
metaflow/plugins/pypi/pip.py,sha256=
|
296
|
+
metaflow/plugins/pypi/micromamba.py,sha256=QaZYMy5w4esW2w_Lb9kZdWU07EtZD_Ky00MVlA4FJw0,14079
|
297
|
+
metaflow/plugins/pypi/pip.py,sha256=Uewmt6-meLyPhNLiAOAkDdfd1P4Go07bkQUD0uE5VIs,13827
|
298
298
|
metaflow/plugins/pypi/pypi_decorator.py,sha256=rDMbHl7r81Ye7-TuIlKAVJ_CDnfjl9jV44ZPws-UsTY,7229
|
299
299
|
metaflow/plugins/pypi/pypi_environment.py,sha256=FYMg8kF3lXqcLfRYWD83a9zpVjcoo_TARqMGZ763rRk,230
|
300
300
|
metaflow/plugins/pypi/utils.py,sha256=ds1Mnv_DaxGnLAYp7ozg_K6oyguGyNhvHfE-75Ia1YA,2836
|
@@ -345,9 +345,9 @@ metaflow/tutorials/07-worldview/README.md,sha256=5vQTrFqulJ7rWN6r20dhot9lI2sVj9W
|
|
345
345
|
metaflow/tutorials/07-worldview/worldview.ipynb,sha256=ztPZPI9BXxvW1QdS2Tfe7LBuVzvFvv0AToDnsDJhLdE,2237
|
346
346
|
metaflow/tutorials/08-autopilot/README.md,sha256=GnePFp_q76jPs991lMUqfIIh5zSorIeWznyiUxzeUVE,1039
|
347
347
|
metaflow/tutorials/08-autopilot/autopilot.ipynb,sha256=DQoJlILV7Mq9vfPBGW-QV_kNhWPjS5n6SJLqePjFYLY,3191
|
348
|
-
metaflow-2.12.
|
349
|
-
metaflow-2.12.
|
350
|
-
metaflow-2.12.
|
351
|
-
metaflow-2.12.
|
352
|
-
metaflow-2.12.
|
353
|
-
metaflow-2.12.
|
348
|
+
metaflow-2.12.25.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
|
349
|
+
metaflow-2.12.25.dist-info/METADATA,sha256=DHT3QDndQ40-jE3c6GyPf9QsX5JP9_QfZtIVKKZMV7o,5906
|
350
|
+
metaflow-2.12.25.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
351
|
+
metaflow-2.12.25.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
|
352
|
+
metaflow-2.12.25.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
|
353
|
+
metaflow-2.12.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|