ob-metaflow 2.12.30.1__py2.py3-none-any.whl → 2.12.30.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.

Potentially problematic release.


This version of ob-metaflow might be problematic. Click here for more details.

@@ -4,7 +4,6 @@ import math
4
4
  import random
5
5
  import time
6
6
  from collections import namedtuple
7
-
8
7
  from metaflow.exception import MetaflowException
9
8
  from metaflow.metaflow_config import KUBERNETES_JOBSET_GROUP, KUBERNETES_JOBSET_VERSION
10
9
  from metaflow.tracing import inject_tracing_vars
@@ -320,33 +319,49 @@ class RunningJobSet(object):
320
319
  def kill(self):
321
320
  plural = "jobsets"
322
321
  client = self._client.get()
323
- # Get the jobset
324
- with client.ApiClient() as api_client:
325
- api_instance = client.CustomObjectsApi(api_client)
326
- try:
327
- obj = api_instance.get_namespaced_custom_object(
328
- group=self._group,
329
- version=self._version,
330
- namespace=self._namespace,
331
- plural=plural,
332
- name=self._name,
333
- )
334
-
335
- # Suspend the jobset
336
- obj["spec"]["suspend"] = True
337
-
338
- api_instance.replace_namespaced_custom_object(
339
- group=self._group,
340
- version=self._version,
341
- namespace=self._namespace,
342
- plural=plural,
343
- name=obj["metadata"]["name"],
344
- body=obj,
345
- )
346
- except Exception as e:
347
- raise KubernetesJobsetException(
348
- "Exception when suspending existing jobset: %s\n" % e
349
- )
322
+ try:
323
+ # Killing the control pod will trigger the jobset to mark everything as failed.
324
+ # Since jobsets have a successPolicy set to `All` which ensures that everything has
325
+ # to succeed for the jobset to succeed.
326
+ from kubernetes.stream import stream
327
+
328
+ control_pod = self._fetch_pod()
329
+ stream(
330
+ client.CoreV1Api().connect_get_namespaced_pod_exec,
331
+ name=control_pod["metadata"]["name"],
332
+ namespace=control_pod["metadata"]["namespace"],
333
+ command=[
334
+ "/bin/sh",
335
+ "-c",
336
+ "/sbin/killall5",
337
+ ],
338
+ stderr=True,
339
+ stdin=False,
340
+ stdout=True,
341
+ tty=False,
342
+ )
343
+ except Exception as e:
344
+ with client.ApiClient() as api_client:
345
+ # If we are unable to kill the control pod then
346
+ # Delete the jobset to kill the subsequent pods.
347
+ # There are a few reasons for deleting a jobset to kill it :
348
+ # 1. Jobset has a `suspend` attribute to suspend it's execution, but this
349
+ # doesn't play nicely when jobsets are deployed with other components like kueue.
350
+ # 2. Jobset doesn't play nicely when we mutate status
351
+ # 3. Deletion is a gaurenteed way of removing any pods.
352
+ api_instance = client.CustomObjectsApi(api_client)
353
+ try:
354
+ api_instance.delete_namespaced_custom_object(
355
+ group=self._group,
356
+ version=self._version,
357
+ namespace=self._namespace,
358
+ plural=plural,
359
+ name=self._name,
360
+ )
361
+ except Exception as e:
362
+ raise KubernetesJobsetException(
363
+ "Exception when deleting existing jobset: %s\n" % e
364
+ )
350
365
 
351
366
  @property
352
367
  def id(self):
metaflow/version.py CHANGED
@@ -1 +1 @@
1
- metaflow_version = "2.12.30.1"
1
+ metaflow_version = "2.12.30.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-metaflow
3
- Version: 2.12.30.1
3
+ Version: 2.12.30.2
4
4
  Summary: Metaflow: More Data Science, Less Engineering
5
5
  Author: Netflix, Outerbounds & the Metaflow Community
6
6
  Author-email: help@outerbounds.co
@@ -12,7 +12,7 @@ Requires-Dist: boto3
12
12
  Requires-Dist: pylint
13
13
  Requires-Dist: kubernetes
14
14
  Provides-Extra: stubs
15
- Requires-Dist: metaflow-stubs==2.12.30.1; extra == "stubs"
15
+ Requires-Dist: metaflow-stubs==2.12.30.2; extra == "stubs"
16
16
 
17
17
  ![Metaflow_Logo_Horizontal_FullColor_Ribbon_Dark_RGB](https://user-images.githubusercontent.com/763451/89453116-96a57e00-d713-11ea-9fa6-82b29d4d6eff.png)
18
18
 
@@ -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=olAvJK3y1it_k99MhLulTaAJo7OFVt5rnrD-ulIFLCU,13616
38
38
  metaflow/vendor.py,sha256=FchtA9tH22JM-eEtJ2c9FpUdMn8sSb1VHuQS56EcdZk,5139
39
- metaflow/version.py,sha256=j8u0wUFUxQDxzFpUcYG2kGTEPuZAlkmFvpD3yPM8DHs,31
39
+ metaflow/version.py,sha256=nknR2DfeAnylyxU3XA56ZGOxb1mhw0fbB01Ff8zHwBY,31
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
@@ -287,7 +287,7 @@ metaflow/plugins/kubernetes/kubernetes_cli.py,sha256=TAYOKTQegYxex5piasLc53kNQPL
287
287
  metaflow/plugins/kubernetes/kubernetes_client.py,sha256=tuvXP-QKpdeSmzVolB2R_TaacOr5DIb0j642eKcjsiM,6491
288
288
  metaflow/plugins/kubernetes/kubernetes_decorator.py,sha256=HnOwkkEhGu_kZU-G2VOm6HX8OuVWUJqBW48PWUujTBM,28686
289
289
  metaflow/plugins/kubernetes/kubernetes_job.py,sha256=E2Aa-IItwYErlwAbPgwdqJI_l6axBQ-IzKY__psW-nE,32865
290
- metaflow/plugins/kubernetes/kubernetes_jobsets.py,sha256=TNj1qLAL_yjmMmj5Xh0lReOLgMn730Hy6W4pS1S-dSs,41027
290
+ metaflow/plugins/kubernetes/kubernetes_jobsets.py,sha256=iehUEKv2KogyJKnp5jejdGP8R-TtF2aX9Wx1WpjKLvM,42030
291
291
  metaflow/plugins/metadata_providers/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
292
292
  metaflow/plugins/metadata_providers/local.py,sha256=9UAxe9caN6kU1lkSlIoJbRGgTqsMa62cBTnyMwhqiaA,22446
293
293
  metaflow/plugins/metadata_providers/service.py,sha256=NKZfFMamx6upP6aFRJfXlfYIhySgFNzz6kbp1yPD7LA,20222
@@ -348,9 +348,9 @@ metaflow/tutorials/07-worldview/README.md,sha256=5vQTrFqulJ7rWN6r20dhot9lI2sVj9W
348
348
  metaflow/tutorials/07-worldview/worldview.ipynb,sha256=ztPZPI9BXxvW1QdS2Tfe7LBuVzvFvv0AToDnsDJhLdE,2237
349
349
  metaflow/tutorials/08-autopilot/README.md,sha256=GnePFp_q76jPs991lMUqfIIh5zSorIeWznyiUxzeUVE,1039
350
350
  metaflow/tutorials/08-autopilot/autopilot.ipynb,sha256=DQoJlILV7Mq9vfPBGW-QV_kNhWPjS5n6SJLqePjFYLY,3191
351
- ob_metaflow-2.12.30.1.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
352
- ob_metaflow-2.12.30.1.dist-info/METADATA,sha256=A5_EFWmi42m0QDPt6dx0_QFe6NS6jgQOTB7YJ8dlnOk,5143
353
- ob_metaflow-2.12.30.1.dist-info/WHEEL,sha256=0VNUDWQJzfRahYI3neAhz2UVbRCtztpN5dPHAGvmGXc,109
354
- ob_metaflow-2.12.30.1.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
355
- ob_metaflow-2.12.30.1.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
356
- ob_metaflow-2.12.30.1.dist-info/RECORD,,
351
+ ob_metaflow-2.12.30.2.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
352
+ ob_metaflow-2.12.30.2.dist-info/METADATA,sha256=OffCjay8GQ4FhMlUJ7RRXgWsPbIGV5vf8MSTyK0pqeI,5143
353
+ ob_metaflow-2.12.30.2.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
354
+ ob_metaflow-2.12.30.2.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
355
+ ob_metaflow-2.12.30.2.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
356
+ ob_metaflow-2.12.30.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any