ob-metaflow 2.16.6.5rc3__py2.py3-none-any.whl → 2.16.8.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.
- metaflow/_vendor/click/core.py +3 -4
- metaflow/_vendor/imghdr/__init__.py +11 -0
- metaflow/_vendor/yaml/__init__.py +427 -0
- metaflow/_vendor/yaml/composer.py +139 -0
- metaflow/_vendor/yaml/constructor.py +748 -0
- metaflow/_vendor/yaml/cyaml.py +101 -0
- metaflow/_vendor/yaml/dumper.py +62 -0
- metaflow/_vendor/yaml/emitter.py +1137 -0
- metaflow/_vendor/yaml/error.py +75 -0
- metaflow/_vendor/yaml/events.py +86 -0
- metaflow/_vendor/yaml/loader.py +63 -0
- metaflow/_vendor/yaml/nodes.py +49 -0
- metaflow/_vendor/yaml/parser.py +589 -0
- metaflow/_vendor/yaml/reader.py +185 -0
- metaflow/_vendor/yaml/representer.py +389 -0
- metaflow/_vendor/yaml/resolver.py +227 -0
- metaflow/_vendor/yaml/scanner.py +1435 -0
- metaflow/_vendor/yaml/serializer.py +111 -0
- metaflow/_vendor/yaml/tokens.py +104 -0
- metaflow/cli.py +11 -2
- metaflow/client/core.py +6 -1
- metaflow/extension_support/__init__.py +4 -3
- metaflow/metaflow_environment.py +14 -6
- metaflow/package/__init__.py +18 -9
- metaflow/packaging_sys/__init__.py +53 -43
- metaflow/packaging_sys/backend.py +21 -6
- metaflow/packaging_sys/tar_backend.py +16 -3
- metaflow/packaging_sys/v1.py +21 -21
- metaflow/plugins/cards/card_modules/convert_to_native_type.py +7 -1
- metaflow/plugins/kubernetes/kubernetes_job.py +8 -2
- metaflow/plugins/kubernetes/kubernetes_jobsets.py +3 -13
- metaflow/plugins/pypi/conda_decorator.py +4 -2
- metaflow/runner/click_api.py +14 -7
- metaflow/runner/subprocess_manager.py +20 -12
- metaflow/vendor.py +23 -6
- metaflow/version.py +1 -1
- {ob_metaflow-2.16.6.5rc3.data → ob_metaflow-2.16.8.2.data}/data/share/metaflow/devtools/Tiltfile +2 -76
- {ob_metaflow-2.16.6.5rc3.data → ob_metaflow-2.16.8.2.data}/data/share/metaflow/devtools/pick_services.sh +0 -1
- {ob_metaflow-2.16.6.5rc3.dist-info → ob_metaflow-2.16.8.2.dist-info}/METADATA +2 -2
- {ob_metaflow-2.16.6.5rc3.dist-info → ob_metaflow-2.16.8.2.dist-info}/RECORD +45 -28
- {ob_metaflow-2.16.6.5rc3.data → ob_metaflow-2.16.8.2.data}/data/share/metaflow/devtools/Makefile +0 -0
- {ob_metaflow-2.16.6.5rc3.dist-info → ob_metaflow-2.16.8.2.dist-info}/WHEEL +0 -0
- {ob_metaflow-2.16.6.5rc3.dist-info → ob_metaflow-2.16.8.2.dist-info}/entry_points.txt +0 -0
- {ob_metaflow-2.16.6.5rc3.dist-info → ob_metaflow-2.16.8.2.dist-info}/licenses/LICENSE +0 -0
- {ob_metaflow-2.16.6.5rc3.dist-info → ob_metaflow-2.16.8.2.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import tarfile
|
|
2
2
|
|
|
3
3
|
from io import BytesIO
|
|
4
|
-
from typing import IO, List, Optional, Union
|
|
4
|
+
from typing import Any, IO, List, Optional, Union
|
|
5
5
|
|
|
6
6
|
from .backend import PackagingBackend
|
|
7
7
|
|
|
@@ -56,6 +56,13 @@ class TarPackagingBackend(PackagingBackend):
|
|
|
56
56
|
def cls_open(cls, content: IO[bytes]) -> tarfile.TarFile:
|
|
57
57
|
return tarfile.open(fileobj=content, mode="r:gz")
|
|
58
58
|
|
|
59
|
+
@classmethod
|
|
60
|
+
def cls_member_name(cls, member: Union[tarfile.TarInfo, str]) -> str:
|
|
61
|
+
"""
|
|
62
|
+
Returns the name of the member as a string.
|
|
63
|
+
"""
|
|
64
|
+
return member.name if isinstance(member, tarfile.TarInfo) else member
|
|
65
|
+
|
|
59
66
|
@classmethod
|
|
60
67
|
def cls_has_member(cls, archive: tarfile.TarFile, name: str) -> bool:
|
|
61
68
|
try:
|
|
@@ -76,11 +83,17 @@ class TarPackagingBackend(PackagingBackend):
|
|
|
76
83
|
def cls_extract_members(
|
|
77
84
|
cls,
|
|
78
85
|
archive: tarfile.TarFile,
|
|
79
|
-
members: Optional[List[
|
|
86
|
+
members: Optional[List[Any]] = None,
|
|
80
87
|
dest_dir: str = ".",
|
|
81
88
|
) -> None:
|
|
82
89
|
archive.extractall(path=dest_dir, members=members)
|
|
83
90
|
|
|
84
91
|
@classmethod
|
|
85
|
-
def cls_list_members(
|
|
92
|
+
def cls_list_members(
|
|
93
|
+
cls, archive: tarfile.TarFile
|
|
94
|
+
) -> Optional[List[tarfile.TarInfo]]:
|
|
95
|
+
return archive.getmembers() or None
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def cls_list_names(cls, archive: tarfile.TarFile) -> Optional[List[str]]:
|
|
86
99
|
return archive.getnames() or None
|
metaflow/packaging_sys/v1.py
CHANGED
|
@@ -61,23 +61,25 @@ class MetaflowCodeContentV1(MetaflowCodeContentV1Base):
|
|
|
61
61
|
else:
|
|
62
62
|
new_modules = []
|
|
63
63
|
|
|
64
|
-
self._modules = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
64
|
+
self._modules = {} # type: Dict[str, _ModuleInfo]
|
|
65
|
+
# We do this explicitly module by module to harden it against misbehaving
|
|
66
|
+
# modules like the one in:
|
|
67
|
+
# https://github.com/Netflix/metaflow/issues/2512
|
|
68
|
+
# We will silently ignore modules that are not well built.
|
|
69
|
+
for name, mod in new_modules:
|
|
70
|
+
try:
|
|
71
|
+
minfo = _ModuleInfo(
|
|
72
|
+
name,
|
|
73
|
+
set(
|
|
74
|
+
Path(p).resolve().as_posix()
|
|
75
|
+
for p in getattr(mod, "__path__", [mod.__file__])
|
|
76
|
+
),
|
|
77
|
+
mod,
|
|
78
|
+
True, # This is a Metaflow module (see filter below)
|
|
79
|
+
)
|
|
80
|
+
except:
|
|
81
|
+
continue
|
|
82
|
+
self._modules[name] = minfo
|
|
81
83
|
|
|
82
84
|
# Contain metadata information regarding the distributions packaged.
|
|
83
85
|
# This allows Metaflow to "fake" distribution information when packaged
|
|
@@ -355,16 +357,14 @@ class MetaflowCodeContentV1(MetaflowCodeContentV1Base):
|
|
|
355
357
|
)
|
|
356
358
|
yield json.dumps(self.create_mfcontent_info()).encode(
|
|
357
359
|
"utf-8"
|
|
358
|
-
),
|
|
360
|
+
), MFCONTENT_MARKER
|
|
359
361
|
else:
|
|
360
362
|
for k in self._other_content.keys():
|
|
361
363
|
yield "<generated %s content>" % (os.path.basename(k)), k
|
|
362
364
|
yield "<generated %s content>" % (
|
|
363
365
|
os.path.basename(self._dist_info_file)
|
|
364
366
|
), os.path.join(self._other_dir, self._dist_info_file)
|
|
365
|
-
yield "<generated %s content>" % MFCONTENT_MARKER,
|
|
366
|
-
self._code_dir, MFCONTENT_MARKER
|
|
367
|
-
)
|
|
367
|
+
yield "<generated %s content>" % MFCONTENT_MARKER, MFCONTENT_MARKER
|
|
368
368
|
|
|
369
369
|
def _metaflow_distribution_files(self) -> Generator[Tuple[str, str], None, None]:
|
|
370
370
|
debug.package_exec("Including Metaflow from '%s'" % self._metaflow_root)
|
|
@@ -146,7 +146,13 @@ class TaskToDict:
|
|
|
146
146
|
# Python 3.13 removes the standard ``imghdr`` module. Metaflow
|
|
147
147
|
# vendors a copy so we can keep using ``what`` to detect image
|
|
148
148
|
# formats irrespective of the Python version.
|
|
149
|
-
|
|
149
|
+
import warnings
|
|
150
|
+
|
|
151
|
+
with warnings.catch_warnings():
|
|
152
|
+
warnings.filterwarnings(
|
|
153
|
+
"ignore", category=DeprecationWarning, module="imghdr"
|
|
154
|
+
)
|
|
155
|
+
from metaflow._vendor import imghdr
|
|
150
156
|
|
|
151
157
|
resp = imghdr.what(None, h=data_object)
|
|
152
158
|
# Only accept types supported on the web
|
|
@@ -522,12 +522,10 @@ class RunningJob(object):
|
|
|
522
522
|
# 3. If the pod object hasn't shown up yet, we set the parallelism to 0
|
|
523
523
|
# to preempt it.
|
|
524
524
|
client = self._client.get()
|
|
525
|
-
|
|
526
525
|
if not self.is_done:
|
|
527
526
|
if self.is_running:
|
|
528
527
|
# Case 1.
|
|
529
528
|
from kubernetes.stream import stream
|
|
530
|
-
|
|
531
529
|
api_instance = client.CoreV1Api
|
|
532
530
|
try:
|
|
533
531
|
# TODO: stream opens a web-socket connection. It may
|
|
@@ -593,6 +591,10 @@ class RunningJob(object):
|
|
|
593
591
|
return self.id
|
|
594
592
|
return "job %s" % self._name
|
|
595
593
|
|
|
594
|
+
@property
|
|
595
|
+
def is_unschedulable(self):
|
|
596
|
+
return self._job["metadata"]["annotations"].get("metaflow/job_status", "") == "Unsatisfiable_Resource_Request"
|
|
597
|
+
|
|
596
598
|
@property
|
|
597
599
|
def is_done(self):
|
|
598
600
|
# Check if the container is done. As a side effect, also refreshes self._job and
|
|
@@ -606,6 +608,7 @@ class RunningJob(object):
|
|
|
606
608
|
or bool(self._job["status"].get("failed"))
|
|
607
609
|
or self._are_pod_containers_done
|
|
608
610
|
or (self._job["spec"]["parallelism"] == 0)
|
|
611
|
+
or self.is_unschedulable
|
|
609
612
|
)
|
|
610
613
|
|
|
611
614
|
if not done():
|
|
@@ -663,6 +666,7 @@ class RunningJob(object):
|
|
|
663
666
|
bool(self._job["status"].get("failed"))
|
|
664
667
|
or self._has_any_container_failed
|
|
665
668
|
or (self._job["spec"]["parallelism"] == 0)
|
|
669
|
+
or self.is_unschedulable
|
|
666
670
|
)
|
|
667
671
|
return retval
|
|
668
672
|
|
|
@@ -760,6 +764,8 @@ class RunningJob(object):
|
|
|
760
764
|
return 0, None
|
|
761
765
|
# Best effort since Pod object can disappear on us at anytime
|
|
762
766
|
else:
|
|
767
|
+
if self.is_unschedulable:
|
|
768
|
+
return 1, self._job["metadata"]["annotations"].get("metaflow/job_status_reason", "")
|
|
763
769
|
if self._pod.get("status", {}).get("phase") not in (
|
|
764
770
|
"Succeeded",
|
|
765
771
|
"Failed",
|
|
@@ -6,6 +6,7 @@ from collections import namedtuple
|
|
|
6
6
|
from metaflow.exception import MetaflowException
|
|
7
7
|
from metaflow.metaflow_config import KUBERNETES_JOBSET_GROUP, KUBERNETES_JOBSET_VERSION
|
|
8
8
|
from metaflow.tracing import inject_tracing_vars
|
|
9
|
+
from metaflow._vendor import yaml
|
|
9
10
|
|
|
10
11
|
from .kube_utils import qos_requests_and_limits
|
|
11
12
|
|
|
@@ -1025,14 +1026,6 @@ class KubernetesArgoJobSet(object):
|
|
|
1025
1026
|
|
|
1026
1027
|
def dump(self):
|
|
1027
1028
|
client = self._kubernetes_sdk
|
|
1028
|
-
|
|
1029
|
-
def _best_effort_yaml_dump(_data):
|
|
1030
|
-
try:
|
|
1031
|
-
import yaml
|
|
1032
|
-
except ImportError:
|
|
1033
|
-
return False, json.dumps(_data)
|
|
1034
|
-
return True, yaml.dump(_data, default_flow_style=False, indent=2)
|
|
1035
|
-
|
|
1036
1029
|
js_dict = client.ApiClient().sanitize_for_serialization(
|
|
1037
1030
|
dict(
|
|
1038
1031
|
apiVersion=self._group + "/" + self._version,
|
|
@@ -1058,7 +1051,7 @@ class KubernetesArgoJobSet(object):
|
|
|
1058
1051
|
status=None,
|
|
1059
1052
|
)
|
|
1060
1053
|
)
|
|
1061
|
-
|
|
1054
|
+
data = yaml.dump(js_dict, default_flow_style=False, indent=2)
|
|
1062
1055
|
# The values we populate in the Jobset manifest (for Argo Workflows) piggybacks on the Argo Workflow's templating engine.
|
|
1063
1056
|
# Even though Argo Workflows's templating helps us constructing all the necessary IDs and populating the fields
|
|
1064
1057
|
# required by Metaflow, we run into one glitch. When we construct JSON/YAML serializable objects,
|
|
@@ -1073,9 +1066,6 @@ class KubernetesArgoJobSet(object):
|
|
|
1073
1066
|
# Since the value of `num_parallel` can be dynamic and can change from run to run, we need to ensure that the
|
|
1074
1067
|
# value can be passed-down dynamically and is **explicitly set as a integer** in the Jobset Manifest submitted as a
|
|
1075
1068
|
# part of the Argo Workflow
|
|
1076
|
-
quoted_substring = '
|
|
1077
|
-
if yaml_coverted:
|
|
1078
|
-
quoted_substring = "'{{=asInt(inputs.parameters.workerCount)}}'"
|
|
1079
|
-
|
|
1069
|
+
quoted_substring = "'{{=asInt(inputs.parameters.workerCount)}}'"
|
|
1080
1070
|
unquoted_substring = "{{=asInt(inputs.parameters.workerCount)}}"
|
|
1081
1071
|
return data.replace(quoted_substring, unquoted_substring)
|
|
@@ -243,9 +243,11 @@ class CondaStepDecorator(StepDecorator):
|
|
|
243
243
|
# Ensure local installation of Metaflow is visible to user code
|
|
244
244
|
python_path = self.__class__._metaflow_home.name
|
|
245
245
|
addl_env_vars = {}
|
|
246
|
-
if self.__class__._addl_env_vars
|
|
246
|
+
if self.__class__._addl_env_vars:
|
|
247
247
|
for key, value in self.__class__._addl_env_vars.items():
|
|
248
|
-
if key
|
|
248
|
+
if key.endswith(":"):
|
|
249
|
+
addl_env_vars[key[:-1]] = value
|
|
250
|
+
elif key == "PYTHONPATH":
|
|
249
251
|
addl_env_vars[key] = os.pathsep.join([value, python_path])
|
|
250
252
|
else:
|
|
251
253
|
addl_env_vars[key] = value
|
metaflow/runner/click_api.py
CHANGED
|
@@ -43,6 +43,7 @@ from metaflow._vendor.click.types import (
|
|
|
43
43
|
)
|
|
44
44
|
from metaflow.decorators import add_decorator_options
|
|
45
45
|
from metaflow.exception import MetaflowException
|
|
46
|
+
from metaflow.flowspec import _FlowState
|
|
46
47
|
from metaflow.includefile import FilePathClass
|
|
47
48
|
from metaflow.metaflow_config import CLICK_API_PROCESS_CONFIG
|
|
48
49
|
from metaflow.parameters import JSONTypeClass, flow_context
|
|
@@ -171,7 +172,6 @@ def _lazy_load_command(
|
|
|
171
172
|
_self,
|
|
172
173
|
name: str,
|
|
173
174
|
):
|
|
174
|
-
|
|
175
175
|
# Context is not used in get_command so we can pass None. Since we pin click,
|
|
176
176
|
# this won't change from under us.
|
|
177
177
|
|
|
@@ -516,6 +516,11 @@ class MetaflowAPI(object):
|
|
|
516
516
|
# Note that if CLICK_API_PROCESS_CONFIG is False, we still do this because
|
|
517
517
|
# it will init all parameters (config_options will be None)
|
|
518
518
|
# We ignore any errors if we don't check the configs in the click API.
|
|
519
|
+
|
|
520
|
+
# Init all values in the flow mutators and then process them
|
|
521
|
+
for decorator in self._flow_cls._flow_state.get(_FlowState.FLOW_MUTATORS, []):
|
|
522
|
+
decorator.external_init()
|
|
523
|
+
|
|
519
524
|
new_cls = self._flow_cls._process_config_decorators(
|
|
520
525
|
config_options, process_configs=CLICK_API_PROCESS_CONFIG
|
|
521
526
|
)
|
|
@@ -541,14 +546,16 @@ def extract_all_params(cmd_obj: Union[click.Command, click.Group]):
|
|
|
541
546
|
|
|
542
547
|
for each_param in cmd_obj.params:
|
|
543
548
|
if isinstance(each_param, click.Argument):
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
549
|
+
(
|
|
550
|
+
arg_params_sigs[each_param.name],
|
|
551
|
+
annotations[each_param.name],
|
|
552
|
+
) = get_inspect_param_obj(each_param, inspect.Parameter.POSITIONAL_ONLY)
|
|
547
553
|
arg_parameters[each_param.name] = each_param
|
|
548
554
|
elif isinstance(each_param, click.Option):
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
555
|
+
(
|
|
556
|
+
opt_params_sigs[each_param.name],
|
|
557
|
+
annotations[each_param.name],
|
|
558
|
+
) = get_inspect_param_obj(each_param, inspect.Parameter.KEYWORD_ONLY)
|
|
552
559
|
opt_parameters[each_param.name] = each_param
|
|
553
560
|
|
|
554
561
|
defaults[each_param.name] = each_param.default
|
|
@@ -152,12 +152,20 @@ class SubprocessManager(object):
|
|
|
152
152
|
int
|
|
153
153
|
The process ID of the subprocess.
|
|
154
154
|
"""
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
env = env or {}
|
|
156
|
+
installed_root = os.environ.get("METAFLOW_EXTRACTED_ROOT", get_metaflow_root())
|
|
157
|
+
|
|
158
|
+
for k, v in MetaflowCodeContent.get_env_vars_for_packaged_metaflow(
|
|
159
|
+
installed_root
|
|
160
|
+
).items():
|
|
161
|
+
if k.endswith(":"):
|
|
162
|
+
# Override
|
|
163
|
+
env[k[:-1]] = v
|
|
164
|
+
elif k in env:
|
|
165
|
+
env[k] = "%s:%s" % (v, env[k])
|
|
166
|
+
else:
|
|
167
|
+
env[k] = v
|
|
168
|
+
|
|
161
169
|
command_obj = CommandManager(command, env, cwd)
|
|
162
170
|
pid = command_obj.run(show_output=show_output)
|
|
163
171
|
self.commands[pid] = command_obj
|
|
@@ -188,12 +196,12 @@ class SubprocessManager(object):
|
|
|
188
196
|
int
|
|
189
197
|
The process ID of the subprocess.
|
|
190
198
|
"""
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
env =
|
|
196
|
-
|
|
199
|
+
env = env or {}
|
|
200
|
+
if "PYTHONPATH" in env:
|
|
201
|
+
env["PYTHONPATH"] = "%s:%s" % (get_metaflow_root(), env["PYTHONPATH"])
|
|
202
|
+
else:
|
|
203
|
+
env["PYTHONPATH"] = get_metaflow_root()
|
|
204
|
+
|
|
197
205
|
command_obj = CommandManager(command, env, cwd)
|
|
198
206
|
pid = await command_obj.async_run()
|
|
199
207
|
self.commands[pid] = command_obj
|
metaflow/vendor.py
CHANGED
|
@@ -63,14 +63,29 @@ def find_vendored_libs(vendor_dir, whitelist, whitelist_dirs):
|
|
|
63
63
|
return vendored_libs, paths
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
def fetch_licenses(*
|
|
67
|
-
for
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
def fetch_licenses(*info_dirs, vendor_dir):
|
|
67
|
+
for dist_info in info_dirs:
|
|
68
|
+
metadata_file = dist_info / "METADATA"
|
|
69
|
+
if not metadata_file.exists():
|
|
70
|
+
continue
|
|
71
|
+
|
|
72
|
+
project_name = None
|
|
73
|
+
for line in metadata_file.read_text("utf-8").splitlines():
|
|
74
|
+
if line.startswith("Name: "):
|
|
75
|
+
project_name = line.split("Name: ", 1)[1].strip()
|
|
76
|
+
break
|
|
77
|
+
if not project_name:
|
|
72
78
|
continue
|
|
73
79
|
|
|
80
|
+
for item in dist_info.iterdir():
|
|
81
|
+
if item.is_file() and re.search(r"(LICENSE|COPYING)", item.name, re.I):
|
|
82
|
+
shutil.copy(item, vendor_dir / f"{project_name}.LICENSE")
|
|
83
|
+
elif item.is_dir() and item.name.lower() == "licenses":
|
|
84
|
+
for license_file in item.iterdir():
|
|
85
|
+
if license_file.is_file():
|
|
86
|
+
dest_name = f"{project_name}.{license_file.name}"
|
|
87
|
+
shutil.copy(license_file, vendor_dir / dest_name)
|
|
88
|
+
|
|
74
89
|
|
|
75
90
|
def vendor(vendor_dir):
|
|
76
91
|
# remove everything
|
|
@@ -108,6 +123,8 @@ def vendor(vendor_dir):
|
|
|
108
123
|
"-r",
|
|
109
124
|
"_vendor/vendor_%s.txt" % subdir,
|
|
110
125
|
"--no-compile",
|
|
126
|
+
"--no-binary",
|
|
127
|
+
":all:",
|
|
111
128
|
]
|
|
112
129
|
)
|
|
113
130
|
|
metaflow/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
metaflow_version = "2.16.
|
|
1
|
+
metaflow_version = "2.16.8.2"
|
{ob_metaflow-2.16.6.5rc3.data → ob_metaflow-2.16.8.2.data}/data/share/metaflow/devtools/Tiltfile
RENAMED
|
@@ -14,17 +14,6 @@
|
|
|
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.6.0")
|
|
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
|
-
|
|
28
17
|
components = {
|
|
29
18
|
"metadata-service": ["postgresql"],
|
|
30
19
|
"ui": ["postgresql", "minio"],
|
|
@@ -32,10 +21,9 @@ components = {
|
|
|
32
21
|
"postgresql": [],
|
|
33
22
|
"argo-workflows": [],
|
|
34
23
|
"argo-events": ["argo-workflows"],
|
|
35
|
-
"jobset": [],
|
|
36
24
|
}
|
|
37
25
|
|
|
38
|
-
services_env = os.getenv("SERVICES", "
|
|
26
|
+
services_env = os.getenv("SERVICES", "").strip().lower()
|
|
39
27
|
|
|
40
28
|
if services_env:
|
|
41
29
|
if services_env == "all":
|
|
@@ -217,7 +205,6 @@ if "postgresql" in enabled_components:
|
|
|
217
205
|
if "argo-workflows" in enabled_components:
|
|
218
206
|
helm_remote(
|
|
219
207
|
'argo-workflows',
|
|
220
|
-
version=ARGO_WORKFLOWS_HELM_CHART_VERSION,
|
|
221
208
|
repo_name='argo',
|
|
222
209
|
repo_url='https://argoproj.github.io/argo-helm',
|
|
223
210
|
set=[
|
|
@@ -233,9 +220,7 @@ if "argo-workflows" in enabled_components:
|
|
|
233
220
|
'controller.resources.requests.memory=128Mi',
|
|
234
221
|
'controller.resources.requests.cpu=50m',
|
|
235
222
|
'controller.resources.limits.memory=256Mi',
|
|
236
|
-
'controller.resources.limits.cpu=100m'
|
|
237
|
-
# Image version overrides
|
|
238
|
-
'images.tag=%s' % ARGO_WORKFLOWS_IMAGE_TAG,
|
|
223
|
+
'controller.resources.limits.cpu=100m'
|
|
239
224
|
]
|
|
240
225
|
)
|
|
241
226
|
|
|
@@ -322,7 +307,6 @@ if "argo-workflows" in enabled_components:
|
|
|
322
307
|
if "argo-events" in enabled_components:
|
|
323
308
|
helm_remote(
|
|
324
309
|
'argo-events',
|
|
325
|
-
version=ARGO_EVENTS_HELM_CHART_VERSION,
|
|
326
310
|
repo_name='argo',
|
|
327
311
|
repo_url='https://argoproj.github.io/argo-helm',
|
|
328
312
|
set=[
|
|
@@ -350,8 +334,6 @@ if "argo-events" in enabled_components:
|
|
|
350
334
|
'configs.jetstream.versions[1].natsImage=nats:2.9.15',
|
|
351
335
|
'configs.jetstream.versions[1].startCommand=/nats-server',
|
|
352
336
|
'configs.jetstream.versions[1].version=2.9.15',
|
|
353
|
-
# Image version overrides
|
|
354
|
-
'global.image.tag=%s' % ARGO_EVENTS_IMAGE_TAG,
|
|
355
337
|
]
|
|
356
338
|
)
|
|
357
339
|
|
|
@@ -559,62 +541,6 @@ if "argo-events" in enabled_components:
|
|
|
559
541
|
config_resources.append('argo-events-controller-manager')
|
|
560
542
|
config_resources.append('argo-events-webhook-eventsource-svc')
|
|
561
543
|
|
|
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
|
-
|
|
618
544
|
#################################################
|
|
619
545
|
# METADATA SERVICE
|
|
620
546
|
#################################################
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ob-metaflow
|
|
3
|
-
Version: 2.16.
|
|
3
|
+
Version: 2.16.8.2
|
|
4
4
|
Summary: Metaflow: More AI and ML, 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.16.
|
|
15
|
+
Requires-Dist: metaflow-stubs==2.16.8.2; extra == "stubs"
|
|
16
16
|
Dynamic: author
|
|
17
17
|
Dynamic: author-email
|
|
18
18
|
Dynamic: description
|