metaflow 2.18.8__py2.py3-none-any.whl → 2.18.9__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/includefile.py +25 -3
- metaflow/plugins/__init__.py +1 -0
- metaflow/plugins/parsers.py +16 -0
- metaflow/version.py +1 -1
- {metaflow-2.18.8.data → metaflow-2.18.9.data}/data/share/metaflow/devtools/Tiltfile +76 -2
- {metaflow-2.18.8.data → metaflow-2.18.9.data}/data/share/metaflow/devtools/pick_services.sh +1 -0
- {metaflow-2.18.8.dist-info → metaflow-2.18.9.dist-info}/METADATA +2 -2
- {metaflow-2.18.8.dist-info → metaflow-2.18.9.dist-info}/RECORD +13 -12
- {metaflow-2.18.8.data → metaflow-2.18.9.data}/data/share/metaflow/devtools/Makefile +0 -0
- {metaflow-2.18.8.dist-info → metaflow-2.18.9.dist-info}/WHEEL +0 -0
- {metaflow-2.18.8.dist-info → metaflow-2.18.9.dist-info}/entry_points.txt +0 -0
- {metaflow-2.18.8.dist-info → metaflow-2.18.9.dist-info}/licenses/LICENSE +0 -0
- {metaflow-2.18.8.dist-info → metaflow-2.18.9.dist-info}/top_level.txt +0 -0
metaflow/includefile.py
CHANGED
@@ -7,9 +7,10 @@ import json
|
|
7
7
|
import os
|
8
8
|
|
9
9
|
from hashlib import sha1
|
10
|
-
from typing import Any, Callable, Dict, Optional
|
10
|
+
from typing import Any, Callable, Dict, Optional, Union
|
11
11
|
|
12
12
|
from metaflow._vendor import click
|
13
|
+
from metaflow._vendor import yaml
|
13
14
|
|
14
15
|
from .exception import MetaflowException
|
15
16
|
from .parameters import (
|
@@ -20,7 +21,7 @@ from .parameters import (
|
|
20
21
|
)
|
21
22
|
|
22
23
|
from .plugins import DATACLIENTS
|
23
|
-
from .user_configs.
|
24
|
+
from .user_configs.config_options import ConfigInput
|
24
25
|
from .util import get_username
|
25
26
|
|
26
27
|
import functools
|
@@ -261,6 +262,12 @@ class IncludeFile(Parameter):
|
|
261
262
|
show_default : bool, default True
|
262
263
|
If True, show the default value in the help text. A value of None is equivalent
|
263
264
|
to True.
|
265
|
+
parser : Union[str, Callable[[str], Any]], optional, default None
|
266
|
+
If a callable, it is a function that can parse the file contents
|
267
|
+
into any desired format. If a string, the string should refer to
|
268
|
+
a function (like "my_parser_package.my_parser.my_parser_function") which should
|
269
|
+
be able to parse the file contents. If the name starts with a ".", it is assumed
|
270
|
+
to be relative to "metaflow".
|
264
271
|
"""
|
265
272
|
|
266
273
|
def __init__(
|
@@ -270,6 +277,7 @@ class IncludeFile(Parameter):
|
|
270
277
|
is_text: Optional[bool] = None,
|
271
278
|
encoding: Optional[str] = None,
|
272
279
|
help: Optional[str] = None,
|
280
|
+
parser: Optional[Union[str, Callable[[str], Any]]] = None,
|
273
281
|
**kwargs: Dict[str, str]
|
274
282
|
):
|
275
283
|
self._includefile_overrides = {}
|
@@ -277,6 +285,7 @@ class IncludeFile(Parameter):
|
|
277
285
|
self._includefile_overrides["is_text"] = is_text
|
278
286
|
if encoding is not None:
|
279
287
|
self._includefile_overrides["encoding"] = encoding
|
288
|
+
self._parser = parser
|
280
289
|
# NOTA: Right now, there is an issue where these can't be overridden by config
|
281
290
|
# in all circumstances. Ignoring for now.
|
282
291
|
super(IncludeFile, self).__init__(
|
@@ -336,7 +345,20 @@ class IncludeFile(Parameter):
|
|
336
345
|
def load_parameter(self, v):
|
337
346
|
if v is None:
|
338
347
|
return v
|
339
|
-
|
348
|
+
|
349
|
+
# Get the raw content from the file
|
350
|
+
content = v.decode(self.name, var_type="Parameter")
|
351
|
+
# If a parser is specified, use it to parse the content
|
352
|
+
if self._parser is not None:
|
353
|
+
try:
|
354
|
+
return ConfigInput._call_parser(self._parser, content)
|
355
|
+
except Exception as e:
|
356
|
+
raise MetaflowException(
|
357
|
+
"Failed to parse content in parameter '%s' using parser: %s"
|
358
|
+
% (self.name, str(e))
|
359
|
+
) from e
|
360
|
+
|
361
|
+
return content
|
340
362
|
|
341
363
|
@staticmethod
|
342
364
|
def _eval_default(is_text, encoding, default_path):
|
metaflow/plugins/__init__.py
CHANGED
@@ -170,6 +170,7 @@ DEPLOYER_IMPL_PROVIDERS_DESC = [
|
|
170
170
|
]
|
171
171
|
|
172
172
|
TL_PLUGINS_DESC = [
|
173
|
+
("yaml_parser", ".parsers.yaml_parser"),
|
173
174
|
("requirements_txt_parser", ".pypi.parsers.requirements_txt_parser"),
|
174
175
|
("pyproject_toml_parser", ".pypi.parsers.pyproject_toml_parser"),
|
175
176
|
("conda_environment_yml_parser", ".pypi.parsers.conda_environment_yml_parser"),
|
metaflow/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
metaflow_version = "2.18.
|
1
|
+
metaflow_version = "2.18.9"
|
@@ -14,6 +14,17 @@
|
|
14
14
|
version_settings(constraint='>=0.22.2')
|
15
15
|
allow_k8s_contexts('minikube')
|
16
16
|
|
17
|
+
# Version configuration for components
|
18
|
+
JOBSET_VERSION = os.getenv("JOBSET_VERSION", "v0.8.2")
|
19
|
+
|
20
|
+
# Argo Workflows versions
|
21
|
+
ARGO_WORKFLOWS_HELM_CHART_VERSION = os.getenv("ARGO_WORKFLOWS_HELM_CHART_VERSION", "0.45.2") # Helm chart version
|
22
|
+
ARGO_WORKFLOWS_IMAGE_TAG = os.getenv("ARGO_WORKFLOWS_IMAGE_TAG", "v3.6.0") # Argo Workflows application version
|
23
|
+
|
24
|
+
# Argo Events versions
|
25
|
+
ARGO_EVENTS_HELM_CHART_VERSION = os.getenv("ARGO_EVENTS_HELM_CHART_VERSION", "2.4.8") # Helm chart version
|
26
|
+
ARGO_EVENTS_IMAGE_TAG = os.getenv("ARGO_EVENTS_IMAGE_TAG", "v1.9.2") # Argo Events application version
|
27
|
+
|
17
28
|
components = {
|
18
29
|
"metadata-service": ["postgresql"],
|
19
30
|
"ui": ["postgresql", "minio"],
|
@@ -21,9 +32,10 @@ components = {
|
|
21
32
|
"postgresql": [],
|
22
33
|
"argo-workflows": [],
|
23
34
|
"argo-events": ["argo-workflows"],
|
35
|
+
"jobset": [],
|
24
36
|
}
|
25
37
|
|
26
|
-
services_env = os.getenv("SERVICES", "").strip().lower()
|
38
|
+
services_env = os.getenv("SERVICES", "all").strip().lower()
|
27
39
|
|
28
40
|
if services_env:
|
29
41
|
if services_env == "all":
|
@@ -205,6 +217,7 @@ if "postgresql" in enabled_components:
|
|
205
217
|
if "argo-workflows" in enabled_components:
|
206
218
|
helm_remote(
|
207
219
|
'argo-workflows',
|
220
|
+
version=ARGO_WORKFLOWS_HELM_CHART_VERSION,
|
208
221
|
repo_name='argo',
|
209
222
|
repo_url='https://argoproj.github.io/argo-helm',
|
210
223
|
set=[
|
@@ -220,7 +233,9 @@ if "argo-workflows" in enabled_components:
|
|
220
233
|
'controller.resources.requests.memory=128Mi',
|
221
234
|
'controller.resources.requests.cpu=50m',
|
222
235
|
'controller.resources.limits.memory=256Mi',
|
223
|
-
'controller.resources.limits.cpu=100m'
|
236
|
+
'controller.resources.limits.cpu=100m',
|
237
|
+
# Image version overrides
|
238
|
+
'images.tag=%s' % ARGO_WORKFLOWS_IMAGE_TAG,
|
224
239
|
]
|
225
240
|
)
|
226
241
|
|
@@ -307,6 +322,7 @@ if "argo-workflows" in enabled_components:
|
|
307
322
|
if "argo-events" in enabled_components:
|
308
323
|
helm_remote(
|
309
324
|
'argo-events',
|
325
|
+
version=ARGO_EVENTS_HELM_CHART_VERSION,
|
310
326
|
repo_name='argo',
|
311
327
|
repo_url='https://argoproj.github.io/argo-helm',
|
312
328
|
set=[
|
@@ -334,6 +350,8 @@ if "argo-events" in enabled_components:
|
|
334
350
|
'configs.jetstream.versions[1].natsImage=nats:2.9.15',
|
335
351
|
'configs.jetstream.versions[1].startCommand=/nats-server',
|
336
352
|
'configs.jetstream.versions[1].version=2.9.15',
|
353
|
+
# Image version overrides
|
354
|
+
'global.image.tag=%s' % ARGO_EVENTS_IMAGE_TAG,
|
337
355
|
]
|
338
356
|
)
|
339
357
|
|
@@ -541,6 +559,62 @@ if "argo-events" in enabled_components:
|
|
541
559
|
config_resources.append('argo-events-controller-manager')
|
542
560
|
config_resources.append('argo-events-webhook-eventsource-svc')
|
543
561
|
|
562
|
+
#################################################
|
563
|
+
# JOBSET
|
564
|
+
#################################################
|
565
|
+
if "jobset" in enabled_components:
|
566
|
+
# Apply JobSet manifests directly from GitHub releases
|
567
|
+
jobset_manifest_url = "https://github.com/kubernetes-sigs/jobset/releases/download/%s/manifests.yaml" % JOBSET_VERSION
|
568
|
+
|
569
|
+
cmd = "curl -sSL %s" % (jobset_manifest_url)
|
570
|
+
k8s_yaml(
|
571
|
+
local(
|
572
|
+
cmd,
|
573
|
+
)
|
574
|
+
)
|
575
|
+
|
576
|
+
k8s_resource(
|
577
|
+
'jobset-controller-manager',
|
578
|
+
labels=['jobset'],
|
579
|
+
)
|
580
|
+
|
581
|
+
metaflow_config["METAFLOW_KUBERNETES_JOBSET_ENABLED"] = "true"
|
582
|
+
|
583
|
+
config_resources.append('jobset-controller-manager')
|
584
|
+
|
585
|
+
# ClusterRole for jobset operations
|
586
|
+
k8s_yaml(encode_yaml({
|
587
|
+
'apiVersion': 'rbac.authorization.k8s.io/v1',
|
588
|
+
'kind': 'ClusterRole',
|
589
|
+
'metadata': {
|
590
|
+
'name': 'jobset-full-access'
|
591
|
+
},
|
592
|
+
'rules': [{
|
593
|
+
'apiGroups': ['jobset.x-k8s.io'],
|
594
|
+
'resources': ['jobsets'],
|
595
|
+
'verbs': ['*']
|
596
|
+
}]
|
597
|
+
}))
|
598
|
+
|
599
|
+
# ClusterRoleBinding for default service account to access jobsets
|
600
|
+
k8s_yaml(encode_yaml({
|
601
|
+
'apiVersion': 'rbac.authorization.k8s.io/v1',
|
602
|
+
'kind': 'ClusterRoleBinding',
|
603
|
+
'metadata': {
|
604
|
+
'name': 'default-jobset-binding'
|
605
|
+
},
|
606
|
+
'subjects': [{
|
607
|
+
'kind': 'ServiceAccount',
|
608
|
+
'name': 'default',
|
609
|
+
'namespace': 'default'
|
610
|
+
}],
|
611
|
+
'roleRef': {
|
612
|
+
'kind': 'ClusterRole',
|
613
|
+
'name': 'jobset-full-access',
|
614
|
+
'apiGroup': 'rbac.authorization.k8s.io'
|
615
|
+
}
|
616
|
+
}))
|
617
|
+
|
544
618
|
#################################################
|
545
619
|
# METADATA SERVICE
|
546
620
|
#################################################
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: metaflow
|
3
|
-
Version: 2.18.
|
3
|
+
Version: 2.18.9
|
4
4
|
Summary: Metaflow: More AI and ML, 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.18.
|
29
|
+
Requires-Dist: metaflow-stubs==2.18.9; extra == "stubs"
|
30
30
|
Dynamic: author
|
31
31
|
Dynamic: author-email
|
32
32
|
Dynamic: classifier
|
@@ -12,7 +12,7 @@ metaflow/events.py,sha256=ahjzkSbSnRCK9RZ-9vTfUviz_6gMvSO9DGkJ86X80-k,5300
|
|
12
12
|
metaflow/exception.py,sha256=_m9ZBJM0cooHRslDqfxCPQmkChqaTh6fGxp7HvISnYI,5161
|
13
13
|
metaflow/flowspec.py,sha256=9wsO2_QoO_VHKusKdpslfbwQREOwf0fAzF-DSEA0iZ8,41968
|
14
14
|
metaflow/graph.py,sha256=UOeClj-JeORRlZWOQMI1CirkrCpTvVWvRcSwODCajMg,19263
|
15
|
-
metaflow/includefile.py,sha256=
|
15
|
+
metaflow/includefile.py,sha256=NXERo_halboBCjvnS5iCjnBMyCMlQMnT2mRe6kxl2xU,21978
|
16
16
|
metaflow/integrations.py,sha256=LlsaoePRg03DjENnmLxZDYto3NwWc9z_PtU6nJxLldg,1480
|
17
17
|
metaflow/lint.py,sha256=A2NdUq_MnQal_RUCMC8ZOSR0VYZGyi2mSgwPQB0UzQo,15343
|
18
18
|
metaflow/meta_files.py,sha256=vlgJHI8GJUKzXoxdrVoH8yyCF5bhFgwYemUgnyd1wgM,342
|
@@ -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=g2SOU_CRzJLgDM_UGF9QDMANMAIHAsDRXE6S76_YzsY,14594
|
38
38
|
metaflow/vendor.py,sha256=A82CGHfStZGDP5pQ5XzRjFkbN1ZC-vFmghXIrzMDDNg,5868
|
39
|
-
metaflow/version.py,sha256=
|
39
|
+
metaflow/version.py,sha256=83PjJ6ffe9rudko46G6WTfOamI1GmwF8G6bTICAEZ4M,28
|
40
40
|
metaflow/_vendor/__init__.py,sha256=y_CiwUD3l4eAKvTVDZeqgVujMy31cAM1qjAB-HfI-9s,353
|
41
41
|
metaflow/_vendor/typing_extensions.py,sha256=q9zxWa6p6CzF1zZvSkygSlklduHf_b3K7MCxGz7MJRc,134519
|
42
42
|
metaflow/_vendor/zipp.py,sha256=ajztOH-9I7KA_4wqDYygtHa6xUBVZgFpmZ8FE74HHHI,8425
|
@@ -198,7 +198,7 @@ metaflow/packaging_sys/distribution_support.py,sha256=VvikZBCH8N1TBZZ2Twk8jH1brm
|
|
198
198
|
metaflow/packaging_sys/tar_backend.py,sha256=nFWuXiwYjWQkFdV2KaZ6gazNVvtY84Eqsh9txhU3pNY,3010
|
199
199
|
metaflow/packaging_sys/utils.py,sha256=x8SVglJvY5mIAilS7MqZi2PpMr6IEyi6RCg3l8hN3G0,2972
|
200
200
|
metaflow/packaging_sys/v1.py,sha256=kbNK0-pDAv3QJPZ789TE0UirGXcHbXkVQiyNT815H7A,20631
|
201
|
-
metaflow/plugins/__init__.py,sha256=
|
201
|
+
metaflow/plugins/__init__.py,sha256=XBocLBSWEPAeeakhTb6HGuocykkVukmnUuQgg-gGWEk,8662
|
202
202
|
metaflow/plugins/catch_decorator.py,sha256=vorlDA6MLB2yHSsEuBoNzAZbrJ6Vknj1qJO9vey2_AI,4523
|
203
203
|
metaflow/plugins/debug_logger.py,sha256=mcF5HYzJ0NQmqCMjyVUk3iAP-heroHRIiVWQC6Ha2-I,879
|
204
204
|
metaflow/plugins/debug_monitor.py,sha256=Md5X_sDOSssN9pt2D8YcaIjTK5JaQD55UAYTcF6xYF0,1099
|
@@ -207,6 +207,7 @@ metaflow/plugins/events_decorator.py,sha256=FULT_Iuue9KsLyNhHOL46uw8cdT-Viq8rmcg
|
|
207
207
|
metaflow/plugins/logs_cli.py,sha256=77W5UNagU2mOKSMMvrQxQmBLRzvmjK-c8dWxd-Ygbqs,11410
|
208
208
|
metaflow/plugins/package_cli.py,sha256=GOxKJs9Wt0x9VtcTJ2EG_wj6pWnlS0XBFAyHpCzzuvs,2000
|
209
209
|
metaflow/plugins/parallel_decorator.py,sha256=wtR_3eRIP3eV7fBIm15oouRjmHBFZ9OklxdaNvttLEQ,9702
|
210
|
+
metaflow/plugins/parsers.py,sha256=y92kMEFmbBvzU7EjZSFgml3S6EOLwY5Qmb4Jwk7leUw,249
|
210
211
|
metaflow/plugins/project_decorator.py,sha256=uhwsguEj7OM_E2OnY1ap3MoGocQHeywuJSa-qPuWn-U,7592
|
211
212
|
metaflow/plugins/resources_decorator.py,sha256=AtoOwg4mHYHYthg-CAfbfam-QiT0ViuDLDoukoDvF6Q,1347
|
212
213
|
metaflow/plugins/retry_decorator.py,sha256=tz_2Tq6GLg3vjDBZp0KKVTk3ADlCvqaWTSf7blmFdUw,1548
|
@@ -428,12 +429,12 @@ metaflow/user_decorators/mutable_flow.py,sha256=EywKTN3cnXPQF_s62wQaC4a4aH14j8oe
|
|
428
429
|
metaflow/user_decorators/mutable_step.py,sha256=-BY0UDXf_RCAEnC5JlLzEXGdiw1KD9oSrSxS_SWaB9Y,16791
|
429
430
|
metaflow/user_decorators/user_flow_decorator.py,sha256=2yDwZq9QGv9W-7kEuKwa8o4ZkTvuHJ5ESz7VVrGViAI,9890
|
430
431
|
metaflow/user_decorators/user_step_decorator.py,sha256=4558NR8RJtN22OyTwCXO80bAMhMTaRGMoX12b1GMcPc,27232
|
431
|
-
metaflow-2.18.
|
432
|
-
metaflow-2.18.
|
433
|
-
metaflow-2.18.
|
434
|
-
metaflow-2.18.
|
435
|
-
metaflow-2.18.
|
436
|
-
metaflow-2.18.
|
437
|
-
metaflow-2.18.
|
438
|
-
metaflow-2.18.
|
439
|
-
metaflow-2.18.
|
432
|
+
metaflow-2.18.9.data/data/share/metaflow/devtools/Makefile,sha256=TT4TCq8ALSfqYyGqDPocN5oPcZe2FqoCZxmGO1LmyCc,13760
|
433
|
+
metaflow-2.18.9.data/data/share/metaflow/devtools/Tiltfile,sha256=8-VMYGdEBFp73Ur5BzQn7TxxkMBMhwJszsVhR_ftgBU,23892
|
434
|
+
metaflow-2.18.9.data/data/share/metaflow/devtools/pick_services.sh,sha256=PGjQeDIigFHeoQ0asmYNdYDPIOdeYy1UYvkw2wdN4zg,2209
|
435
|
+
metaflow-2.18.9.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
|
436
|
+
metaflow-2.18.9.dist-info/METADATA,sha256=1Pi-qij91rOgLt3Vv1N3G_7pcVufYz3iH4qNWcsDViw,6741
|
437
|
+
metaflow-2.18.9.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
438
|
+
metaflow-2.18.9.dist-info/entry_points.txt,sha256=RvEq8VFlgGe_FfqGOZi0D7ze1hLD0pAtXeNyGfzc_Yc,103
|
439
|
+
metaflow-2.18.9.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
|
440
|
+
metaflow-2.18.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|