ob-metaflow 2.12.18.1__py2.py3-none-any.whl → 2.12.19.1__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.

@@ -256,6 +256,7 @@ DEFAULT_RUNTIME_LIMIT = from_conf("DEFAULT_RUNTIME_LIMIT", 5 * 24 * 60 * 60)
256
256
  # Organization customizations
257
257
  ###
258
258
  UI_URL = from_conf("UI_URL")
259
+ PAGERDUTY_TEMPLATE_URL = from_conf("PAGERDUTY_TEMPLATE_URL")
259
260
 
260
261
  ###
261
262
  # Capture error logs from argo
@@ -49,6 +49,7 @@ from metaflow.metaflow_config import (
49
49
  SERVICE_HEADERS,
50
50
  SERVICE_INTERNAL_URL,
51
51
  UI_URL,
52
+ PAGERDUTY_TEMPLATE_URL,
52
53
  )
53
54
  from metaflow.metaflow_config_funcs import config_values
54
55
  from metaflow.mflog import BASH_SAVE_LOGS, bash_capture_logs, export_mflog_env_vars
@@ -2387,10 +2388,18 @@ class ArgoWorkflows(object):
2387
2388
  def _pager_duty_notification_links(self):
2388
2389
  links = []
2389
2390
  if UI_URL:
2391
+ if PAGERDUTY_TEMPLATE_URL:
2392
+ pdproject = ''
2393
+ pdbranch = ''
2394
+ if getattr(current, "project_name", None):
2395
+ pdproject = current.project_name
2396
+ pdbranch = current.branch_name
2397
+ href_val = PAGERDUTY_TEMPLATE_URL.format(pd_flow=self.flow.name, pd_namespace=KUBERNETES_NAMESPACE,pd_template=self.name,pd_project=pdproject, pd_branch=pdbranch)
2398
+ else:
2399
+ href_val = "%s/%s/%s"% (UI_URL.rstrip("/"), self.flow.name, "argo-{{workflow.name}}")
2390
2400
  links.append(
2391
2401
  {
2392
- "href": "%s/%s/%s"
2393
- % (UI_URL.rstrip("/"), self.flow.name, "argo-{{workflow.name}}"),
2402
+ "href": href_val,
2394
2403
  "text": "Metaflow UI",
2395
2404
  }
2396
2405
  )
@@ -698,7 +698,7 @@ class Kubernetes(object):
698
698
  t = time.time()
699
699
  time.sleep(update_delay(time.time() - start_time))
700
700
 
701
- _make_prefix = lambda: b"[%s] " % util.to_bytes(self._job.id)
701
+ prefix = lambda: b"[%s] " % util.to_bytes(self._job.id)
702
702
 
703
703
  stdout_tail = get_log_tailer(stdout_location, self._datastore.TYPE)
704
704
  stderr_tail = get_log_tailer(stderr_location, self._datastore.TYPE)
@@ -708,7 +708,7 @@ class Kubernetes(object):
708
708
 
709
709
  # 2) Tail logs until the job has finished
710
710
  tail_logs(
711
- prefix=_make_prefix(),
711
+ prefix=prefix(),
712
712
  stdout_tail=stdout_tail,
713
713
  stderr_tail=stderr_tail,
714
714
  echo=echo,
@@ -571,10 +571,8 @@ class JobSetSpec(object):
571
571
  namespace=self._kwargs["namespace"],
572
572
  ),
573
573
  spec=client.V1PodSpec(
574
- ## --- jobset require podspec deets start----
575
574
  subdomain=self._kwargs["subdomain"],
576
575
  set_hostname_as_fqdn=True,
577
- ## --- jobset require podspec deets end ----
578
576
  # Timeout is set on the pod and not the job (important!)
579
577
  active_deadline_seconds=self._kwargs[
580
578
  "timeout_in_seconds"
@@ -50,6 +50,9 @@ class CondaStepDecorator(StepDecorator):
50
50
  # conda channels, users can specify channel::package as the package name.
51
51
 
52
52
  def __init__(self, attributes=None, statically_defined=False):
53
+ self._user_defined_attributes = (
54
+ attributes.copy() if attributes is not None else {}
55
+ )
53
56
  super(CondaStepDecorator, self).__init__(attributes, statically_defined)
54
57
 
55
58
  # Support legacy 'libraries=' attribute for the decorator.
@@ -59,6 +62,9 @@ class CondaStepDecorator(StepDecorator):
59
62
  }
60
63
  del self.attributes["libraries"]
61
64
 
65
+ def is_attribute_user_defined(self, name):
66
+ return name in self._user_defined_attributes
67
+
62
68
  def step_init(self, flow, graph, step, decos, environment, flow_datastore, logger):
63
69
  # The init_environment hook for Environment creates the relevant virtual
64
70
  # environments. The step_init hook sets up the relevant state for that hook to
@@ -71,11 +77,16 @@ class CondaStepDecorator(StepDecorator):
71
77
 
72
78
  # Support flow-level decorator.
73
79
  if "conda_base" in self.flow._flow_decorators:
74
- super_attributes = self.flow._flow_decorators["conda_base"][0].attributes
80
+ conda_base = self.flow._flow_decorators["conda_base"][0]
81
+ super_attributes = conda_base.attributes
75
82
  self.attributes["packages"] = {
76
83
  **super_attributes["packages"],
77
84
  **self.attributes["packages"],
78
85
  }
86
+ self._user_defined_attributes = {
87
+ **self._user_defined_attributes,
88
+ **conda_base._user_defined_attributes,
89
+ }
79
90
  self.attributes["python"] = (
80
91
  self.attributes["python"] or super_attributes["python"]
81
92
  )
@@ -322,6 +333,9 @@ class CondaFlowDecorator(FlowDecorator):
322
333
  }
323
334
 
324
335
  def __init__(self, attributes=None, statically_defined=False):
336
+ self._user_defined_attributes = (
337
+ attributes.copy() if attributes is not None else {}
338
+ )
325
339
  super(CondaFlowDecorator, self).__init__(attributes, statically_defined)
326
340
 
327
341
  # Support legacy 'libraries=' attribute for the decorator.
@@ -333,6 +347,9 @@ class CondaFlowDecorator(FlowDecorator):
333
347
  if self.attributes["python"]:
334
348
  self.attributes["python"] = str(self.attributes["python"])
335
349
 
350
+ def is_attribute_user_defined(self, name):
351
+ return name in self._user_defined_attributes
352
+
336
353
  def flow_init(
337
354
  self, flow, graph, environment, flow_datastore, metadata, logger, echo, options
338
355
  ):
@@ -291,10 +291,13 @@ class CondaEnvironment(MetaflowEnvironment):
291
291
  # PyPI registries, the usage of environment variable `GOOGLE_APPLICATION_CREDENTIALS`
292
292
  # demands that `keyrings.google-artifactregistry-auth` has to be installed
293
293
  # and available in the underlying python environment.
294
- if os.getenv("GOOGLE_APPLICATION_CREDENTIALS"):
295
- environment["conda"]["packages"][
296
- "keyrings.google-artifactregistry-auth"
297
- ] = ">=1.1.1"
294
+
295
+ # commenting this out per https://outerboundsco.slack.com/archives/C040K733FND/p1719262399355449
296
+ # this should be a temporary workaround. Need to find a better fix
297
+ # if os.getenv("GOOGLE_APPLICATION_CREDENTIALS"):
298
+ # environment["conda"]["packages"][
299
+ # "keyrings.google-artifactregistry-auth"
300
+ # ] = ">=1.1.1"
298
301
 
299
302
  # Z combinator for a recursive lambda
300
303
  deep_sort = (lambda f: f(f))(
@@ -40,7 +40,12 @@ class PyPIStepDecorator(StepDecorator):
40
40
 
41
41
  # Support flow-level decorator
42
42
  if "pypi_base" in self.flow._flow_decorators:
43
- super_attributes = self.flow._flow_decorators["pypi_base"][0].attributes
43
+ pypi_base = self.flow._flow_decorators["pypi_base"][0]
44
+ super_attributes = pypi_base.attributes
45
+ self._user_defined_attributes = {
46
+ **self._user_defined_attributes,
47
+ **pypi_base._user_defined_attributes,
48
+ }
44
49
  self.attributes["packages"] = {
45
50
  **super_attributes["packages"],
46
51
  **self.attributes["packages"],
@@ -93,6 +98,12 @@ class PyPIStepDecorator(StepDecorator):
93
98
  ),
94
99
  )
95
100
  )
101
+ # TODO: This code snippet can be done away with by altering the constructor of
102
+ # MetaflowEnvironment. A good first-task exercise.
103
+ # Avoid circular import
104
+ from metaflow.plugins.datastores.local_storage import LocalStorage
105
+
106
+ environment.set_local_root(LocalStorage.get_datastore_root_from_config(logger))
96
107
 
97
108
  def is_attribute_user_defined(self, name):
98
109
  return name in self._user_defined_attributes
@@ -117,6 +128,12 @@ class PyPIFlowDecorator(FlowDecorator):
117
128
  name = "pypi_base"
118
129
  defaults = {"packages": {}, "python": None, "disabled": None}
119
130
 
131
+ def __init__(self, attributes=None, statically_defined=False):
132
+ self._user_defined_attributes = (
133
+ attributes.copy() if attributes is not None else {}
134
+ )
135
+ super().__init__(attributes, statically_defined)
136
+
120
137
  def flow_init(
121
138
  self, flow, graph, environment, flow_datastore, metadata, logger, echo, options
122
139
  ):
metaflow/version.py CHANGED
@@ -1 +1 @@
1
- metaflow_version = "2.12.18.1"
1
+ metaflow_version = "2.12.19.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-metaflow
3
- Version: 2.12.18.1
3
+ Version: 2.12.19.1
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.18.1; extra == "stubs"
15
+ Requires-Dist: metaflow-stubs==2.12.19.1; 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
 
@@ -15,7 +15,7 @@ metaflow/graph.py,sha256=HFJ7V_bPSht_NHIm8BejrSqOX2fyBQpVOczRCliRw08,11975
15
15
  metaflow/includefile.py,sha256=yHczcZ_U0SrasxSNhZb3DIBzx8UZnrJCl3FzvpEQLOA,19753
16
16
  metaflow/integrations.py,sha256=LlsaoePRg03DjENnmLxZDYto3NwWc9z_PtU6nJxLldg,1480
17
17
  metaflow/lint.py,sha256=5rj1MlpluxyPTSINjtMoJ7viotyNzfjtBJSAihlAwMU,10870
18
- metaflow/metaflow_config.py,sha256=MRSTylVQNdPRKJxmbT5sIb-j2b6Rc_BZurWT1XTPotA,22957
18
+ metaflow/metaflow_config.py,sha256=MxVBlIXpLmvudB09WwuWzcYZtNmnIKdxhHuLaNG9IZA,23018
19
19
  metaflow/metaflow_config_funcs.py,sha256=5GlvoafV6SxykwfL8D12WXSfwjBN_NsyuKE_Q3gjGVE,6738
20
20
  metaflow/metaflow_current.py,sha256=5Kri7fzj-rtIJVr5xh5kPKwZ0T73_4egZybzlDR-fgc,7136
21
21
  metaflow/metaflow_environment.py,sha256=D7zHYqe8aLZVwJ20nx19vmsNW29Kf3PVE8hbBjVQin8,8115
@@ -35,7 +35,7 @@ metaflow/tuple_util.py,sha256=_G5YIEhuugwJ_f6rrZoelMFak3DqAR2tt_5CapS1XTY,830
35
35
  metaflow/unbounded_foreach.py,sha256=p184WMbrMJ3xKYHwewj27ZhRUsSj_kw1jlye5gA9xJk,387
36
36
  metaflow/util.py,sha256=olAvJK3y1it_k99MhLulTaAJo7OFVt5rnrD-ulIFLCU,13616
37
37
  metaflow/vendor.py,sha256=FchtA9tH22JM-eEtJ2c9FpUdMn8sSb1VHuQS56EcdZk,5139
38
- metaflow/version.py,sha256=XG93JPt2rdQfGnZMZxKdv_-dwe1D4GNbY8Xs-xeFMLE,31
38
+ metaflow/version.py,sha256=XY6g1qJ5R4LqOmhFOzlgSJpLjqBMlxLI69hn8Pur3ig,31
39
39
  metaflow/_vendor/__init__.py,sha256=y_CiwUD3l4eAKvTVDZeqgVujMy31cAM1qjAB-HfI-9s,353
40
40
  metaflow/_vendor/typing_extensions.py,sha256=0nUs5p1A_UrZigrAVBoOEM6TxU37zzPDUtiij1ZwpNc,110417
41
41
  metaflow/_vendor/zipp.py,sha256=ajztOH-9I7KA_4wqDYygtHa6xUBVZgFpmZ8FE74HHHI,8425
@@ -174,7 +174,7 @@ metaflow/plugins/airflow/sensors/s3_sensor.py,sha256=iDReG-7FKnumrtQg-HY6cCUAAqN
174
174
  metaflow/plugins/argo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
175
175
  metaflow/plugins/argo/argo_client.py,sha256=MKKhMCbWOPzf6z5zQQiyDRHHkAXcO7ipboDZDqAAvOk,15849
176
176
  metaflow/plugins/argo/argo_events.py,sha256=_C1KWztVqgi3zuH57pInaE9OzABc2NnncC-zdwOMZ-w,5909
177
- metaflow/plugins/argo/argo_workflows.py,sha256=6xUkz1LKdCLbl-O-D83Y2G5mCKYcIciKts3x1PNAzCk,170173
177
+ metaflow/plugins/argo/argo_workflows.py,sha256=BzlJ4_3Lz4MZgxrnr2xpkEts0ZB4CBRzG76WK3ony1w,170676
178
178
  metaflow/plugins/argo/argo_workflows_cli.py,sha256=X2j_F0xF8-K30ebM4dSLOTteDKXbr-jMN18oMpl5S6Y,36313
179
179
  metaflow/plugins/argo/argo_workflows_decorator.py,sha256=yprszMdbE3rBTcEA9VR0IEnPjTprUauZBc4SBb-Q7sA,7878
180
180
  metaflow/plugins/argo/argo_workflows_deployer.py,sha256=wSSZtThn_VPvE_Wu6NB1L0Q86LmBJh9g009v_lpvBPM,8125
@@ -279,22 +279,22 @@ metaflow/plugins/gcp/gs_tail.py,sha256=Jl_wvnzU7dub07A-DOAuP5FeccNIrPM-CeL1xKFs1
279
279
  metaflow/plugins/gcp/gs_utils.py,sha256=ZmIGFse1qYyvAVrwga23PQUzF6dXEDLLsZ2F-YRmvow,2030
280
280
  metaflow/plugins/gcp/includefile_support.py,sha256=vIDeR-MiJuUh-2S2pV7Z7FBkhIWwtHXaRrj76MWGRiY,3869
281
281
  metaflow/plugins/kubernetes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
282
- metaflow/plugins/kubernetes/kubernetes.py,sha256=cr3TheUasxIBEwFZ3GEVbctaf8gW57BM5BDk80ikjPI,31063
282
+ metaflow/plugins/kubernetes/kubernetes.py,sha256=sP5BDnjv-5cLm8i7E5YiJygWN4yNRQHt-hhOmysKm1k,31051
283
283
  metaflow/plugins/kubernetes/kubernetes_cli.py,sha256=qBDdr1Lvtt-RO9pB-9_HTOPdzAmDvvJ0aiQ1OoCcrMU,10892
284
284
  metaflow/plugins/kubernetes/kubernetes_client.py,sha256=GKg-gT3qhXMRQV-sG1YyoOf3Z32NXr_wwEN2ytMVSEg,2471
285
285
  metaflow/plugins/kubernetes/kubernetes_decorator.py,sha256=MATnWGxfC62MJnRPR-LqybxoWolZb7CRh1Tkv5GbqLE,26162
286
286
  metaflow/plugins/kubernetes/kubernetes_job.py,sha256=Cfkee8LbXC17jSXWoeNdomQRvF_8YSeXNg1gvxm6E_M,31806
287
- metaflow/plugins/kubernetes/kubernetes_jobsets.py,sha256=OBmLtX-ZUDQdCCfftUmRMernfmTNMwdTxPoCAp_NmwE,40957
287
+ metaflow/plugins/kubernetes/kubernetes_jobsets.py,sha256=sCVuy-PRN60s5HWpnRvFmnljS41k70sBoPO3nOtl2ZE,40800
288
288
  metaflow/plugins/metadata/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
289
289
  metaflow/plugins/metadata/local.py,sha256=YhLJC5zjVJrvQFIyQ92ZBByiUmhCC762RUX7ITX12O8,22428
290
290
  metaflow/plugins/metadata/service.py,sha256=ihq5F7KQZlxvYwzH_-jyP2aWN_I96i2vp92j_d697s8,20204
291
291
  metaflow/plugins/pypi/__init__.py,sha256=0YFZpXvX7HCkyBFglatual7XGifdA1RwC3U4kcizyak,1037
292
292
  metaflow/plugins/pypi/bootstrap.py,sha256=Tvc4_QKIx-A8j5Aq8ccWZrrxNM8csN40rK8HmxDx-Z8,5106
293
- metaflow/plugins/pypi/conda_decorator.py,sha256=fTJVbEfgOUtsDXIfnfsNk46sKeA9uTuTqGey9OFs9Ig,14738
294
- metaflow/plugins/pypi/conda_environment.py,sha256=--q-8lypKupCdGsASpqABNpNqRxtQi6UCDgq8iHDFe4,19476
293
+ metaflow/plugins/pypi/conda_decorator.py,sha256=D5B6xnBc2KUNPhaD0J062CGM1Jzo6D2bxhSU87KrmCM,15372
294
+ metaflow/plugins/pypi/conda_environment.py,sha256=NSBcN4oD_RZONOUrnubLh-ur8EfS0h9PM4r7GNZczyc,19685
295
295
  metaflow/plugins/pypi/micromamba.py,sha256=67FiIZZz0Kig9EcN7bZLObsE6Z1MFyo4Dp93fd3Grcc,12178
296
296
  metaflow/plugins/pypi/pip.py,sha256=7B06mPOs5MvY33xbzPVYZlBr1iKMYaN-n8uulL9zSVg,13649
297
- metaflow/plugins/pypi/pypi_decorator.py,sha256=h5cAnxkWjmj4Ad4q0AkABKwhHQHYfeexy12yMaaLgXQ,6443
297
+ metaflow/plugins/pypi/pypi_decorator.py,sha256=rDMbHl7r81Ye7-TuIlKAVJ_CDnfjl9jV44ZPws-UsTY,7229
298
298
  metaflow/plugins/pypi/pypi_environment.py,sha256=FYMg8kF3lXqcLfRYWD83a9zpVjcoo_TARqMGZ763rRk,230
299
299
  metaflow/plugins/pypi/utils.py,sha256=ds1Mnv_DaxGnLAYp7ozg_K6oyguGyNhvHfE-75Ia1YA,2836
300
300
  metaflow/plugins/secrets/__init__.py,sha256=mhJaN2eMS_ZZVewAMR2E-JdP5i0t3v9e6Dcwd-WpruE,310
@@ -344,9 +344,9 @@ metaflow/tutorials/07-worldview/README.md,sha256=5vQTrFqulJ7rWN6r20dhot9lI2sVj9W
344
344
  metaflow/tutorials/07-worldview/worldview.ipynb,sha256=ztPZPI9BXxvW1QdS2Tfe7LBuVzvFvv0AToDnsDJhLdE,2237
345
345
  metaflow/tutorials/08-autopilot/README.md,sha256=GnePFp_q76jPs991lMUqfIIh5zSorIeWznyiUxzeUVE,1039
346
346
  metaflow/tutorials/08-autopilot/autopilot.ipynb,sha256=DQoJlILV7Mq9vfPBGW-QV_kNhWPjS5n6SJLqePjFYLY,3191
347
- ob_metaflow-2.12.18.1.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
348
- ob_metaflow-2.12.18.1.dist-info/METADATA,sha256=WktoWOeBd5CcsgvUElefUBOhRxJPxWpMoU2wHwsmUNs,5143
349
- ob_metaflow-2.12.18.1.dist-info/WHEEL,sha256=WDDPHYzpiOIm6GP1C2_8y8W6q16ICddAgOHlhTje9Qc,109
350
- ob_metaflow-2.12.18.1.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
351
- ob_metaflow-2.12.18.1.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
352
- ob_metaflow-2.12.18.1.dist-info/RECORD,,
347
+ ob_metaflow-2.12.19.1.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
348
+ ob_metaflow-2.12.19.1.dist-info/METADATA,sha256=dlRjUFXgU42VFrt4kFUosjHtZgpgCwHnItdgQvXtx1w,5143
349
+ ob_metaflow-2.12.19.1.dist-info/WHEEL,sha256=O8iI_RpvXnU2dkdPNf_wSffaC9hi-VsSQKnuYEptk_s,109
350
+ ob_metaflow-2.12.19.1.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
351
+ ob_metaflow-2.12.19.1.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
352
+ ob_metaflow-2.12.19.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.0.0)
2
+ Generator: setuptools (74.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any