ob-metaflow 2.12.30.2__py2.py3-none-any.whl → 2.13.6.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.
- metaflow/__init__.py +3 -0
- metaflow/cards.py +1 -0
- metaflow/cli.py +185 -717
- metaflow/cli_args.py +17 -0
- metaflow/cli_components/__init__.py +0 -0
- metaflow/cli_components/dump_cmd.py +96 -0
- metaflow/cli_components/init_cmd.py +51 -0
- metaflow/cli_components/run_cmds.py +362 -0
- metaflow/cli_components/step_cmd.py +176 -0
- metaflow/cli_components/utils.py +140 -0
- metaflow/cmd/develop/stub_generator.py +9 -2
- metaflow/datastore/flow_datastore.py +2 -2
- metaflow/decorators.py +63 -2
- metaflow/exception.py +8 -2
- metaflow/extension_support/plugins.py +42 -27
- metaflow/flowspec.py +176 -23
- metaflow/graph.py +28 -27
- metaflow/includefile.py +50 -22
- metaflow/lint.py +35 -20
- metaflow/metadata_provider/heartbeat.py +23 -8
- metaflow/metaflow_config.py +10 -1
- metaflow/multicore_utils.py +31 -14
- metaflow/package.py +17 -3
- metaflow/parameters.py +97 -25
- metaflow/plugins/__init__.py +22 -0
- metaflow/plugins/airflow/airflow.py +18 -17
- metaflow/plugins/airflow/airflow_cli.py +1 -0
- metaflow/plugins/argo/argo_client.py +0 -2
- metaflow/plugins/argo/argo_workflows.py +195 -132
- metaflow/plugins/argo/argo_workflows_cli.py +1 -1
- metaflow/plugins/argo/argo_workflows_decorator.py +2 -4
- metaflow/plugins/argo/argo_workflows_deployer_objects.py +51 -9
- metaflow/plugins/argo/jobset_input_paths.py +0 -1
- metaflow/plugins/aws/aws_utils.py +6 -1
- metaflow/plugins/aws/batch/batch_client.py +1 -3
- metaflow/plugins/aws/batch/batch_decorator.py +13 -13
- metaflow/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.py +13 -10
- metaflow/plugins/aws/step_functions/dynamo_db_client.py +0 -3
- metaflow/plugins/aws/step_functions/production_token.py +1 -1
- metaflow/plugins/aws/step_functions/step_functions.py +33 -1
- metaflow/plugins/aws/step_functions/step_functions_cli.py +1 -1
- metaflow/plugins/aws/step_functions/step_functions_decorator.py +0 -1
- metaflow/plugins/aws/step_functions/step_functions_deployer_objects.py +7 -9
- metaflow/plugins/cards/card_cli.py +7 -2
- metaflow/plugins/cards/card_creator.py +1 -0
- metaflow/plugins/cards/card_decorator.py +79 -8
- metaflow/plugins/cards/card_modules/basic.py +56 -5
- metaflow/plugins/cards/card_modules/card.py +16 -1
- metaflow/plugins/cards/card_modules/components.py +64 -16
- metaflow/plugins/cards/card_modules/main.js +27 -25
- metaflow/plugins/cards/card_modules/test_cards.py +4 -4
- metaflow/plugins/cards/component_serializer.py +1 -1
- metaflow/plugins/datatools/s3/s3.py +12 -4
- metaflow/plugins/datatools/s3/s3op.py +3 -3
- metaflow/plugins/events_decorator.py +338 -186
- metaflow/plugins/kubernetes/kube_utils.py +84 -1
- metaflow/plugins/kubernetes/kubernetes.py +40 -92
- metaflow/plugins/kubernetes/kubernetes_cli.py +32 -7
- metaflow/plugins/kubernetes/kubernetes_decorator.py +76 -4
- metaflow/plugins/kubernetes/kubernetes_job.py +23 -20
- metaflow/plugins/kubernetes/kubernetes_jobsets.py +41 -20
- metaflow/plugins/kubernetes/spot_metadata_cli.py +69 -0
- metaflow/plugins/kubernetes/spot_monitor_sidecar.py +109 -0
- metaflow/plugins/parallel_decorator.py +4 -1
- metaflow/plugins/project_decorator.py +33 -5
- metaflow/plugins/pypi/bootstrap.py +249 -81
- metaflow/plugins/pypi/conda_decorator.py +20 -10
- metaflow/plugins/pypi/conda_environment.py +83 -27
- metaflow/plugins/pypi/micromamba.py +82 -37
- metaflow/plugins/pypi/pip.py +9 -6
- metaflow/plugins/pypi/pypi_decorator.py +11 -9
- metaflow/plugins/pypi/utils.py +4 -2
- metaflow/plugins/timeout_decorator.py +2 -2
- metaflow/runner/click_api.py +240 -50
- metaflow/runner/deployer.py +1 -1
- metaflow/runner/deployer_impl.py +12 -11
- metaflow/runner/metaflow_runner.py +68 -34
- metaflow/runner/nbdeploy.py +2 -0
- metaflow/runner/nbrun.py +1 -1
- metaflow/runner/subprocess_manager.py +61 -10
- metaflow/runner/utils.py +208 -44
- metaflow/runtime.py +216 -112
- metaflow/sidecar/sidecar_worker.py +1 -1
- metaflow/tracing/tracing_modules.py +4 -1
- metaflow/user_configs/__init__.py +0 -0
- metaflow/user_configs/config_decorators.py +563 -0
- metaflow/user_configs/config_options.py +548 -0
- metaflow/user_configs/config_parameters.py +436 -0
- metaflow/util.py +22 -0
- metaflow/version.py +1 -1
- {ob_metaflow-2.12.30.2.dist-info → ob_metaflow-2.13.6.1.dist-info}/METADATA +12 -3
- {ob_metaflow-2.12.30.2.dist-info → ob_metaflow-2.13.6.1.dist-info}/RECORD +96 -84
- {ob_metaflow-2.12.30.2.dist-info → ob_metaflow-2.13.6.1.dist-info}/WHEEL +1 -1
- {ob_metaflow-2.12.30.2.dist-info → ob_metaflow-2.13.6.1.dist-info}/LICENSE +0 -0
- {ob_metaflow-2.12.30.2.dist-info → ob_metaflow-2.13.6.1.dist-info}/entry_points.txt +0 -0
- {ob_metaflow-2.12.30.2.dist-info → ob_metaflow-2.13.6.1.dist-info}/top_level.txt +0 -0
metaflow/plugins/__init__.py
CHANGED
|
@@ -16,9 +16,15 @@ CLIS_DESC = [
|
|
|
16
16
|
("argo-workflows", ".argo.argo_workflows_cli.cli"),
|
|
17
17
|
("card", ".cards.card_cli.cli"),
|
|
18
18
|
("tag", ".tag_cli.cli"),
|
|
19
|
+
("spot-metadata", ".kubernetes.spot_metadata_cli.cli"),
|
|
19
20
|
("logs", ".logs_cli.cli"),
|
|
20
21
|
]
|
|
21
22
|
|
|
23
|
+
# Add additional commands to the runner here
|
|
24
|
+
# These will be accessed using Runner().<command>()
|
|
25
|
+
RUNNER_CLIS_DESC = []
|
|
26
|
+
|
|
27
|
+
|
|
22
28
|
from .test_unbounded_foreach_decorator import InternalTestUnboundedForeachInput
|
|
23
29
|
|
|
24
30
|
# Add new step decorators here
|
|
@@ -99,6 +105,10 @@ SIDECARS_DESC = [
|
|
|
99
105
|
"save_logs_periodically",
|
|
100
106
|
"..mflog.save_logs_periodically.SaveLogsPeriodicallySidecar",
|
|
101
107
|
),
|
|
108
|
+
(
|
|
109
|
+
"spot_termination_monitor",
|
|
110
|
+
".kubernetes.spot_monitor_sidecar.SpotTerminationMonitorSidecar",
|
|
111
|
+
),
|
|
102
112
|
("heartbeat", "metaflow.metadata_provider.heartbeat.MetadataHeartBeat"),
|
|
103
113
|
]
|
|
104
114
|
|
|
@@ -164,6 +174,18 @@ def get_plugin_cli():
|
|
|
164
174
|
return resolve_plugins("cli")
|
|
165
175
|
|
|
166
176
|
|
|
177
|
+
def get_plugin_cli_path():
|
|
178
|
+
return resolve_plugins("cli", path_only=True)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def get_runner_cli():
|
|
182
|
+
return resolve_plugins("runner_cli")
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def get_runner_cli_path():
|
|
186
|
+
return resolve_plugins("runner_cli", path_only=True)
|
|
187
|
+
|
|
188
|
+
|
|
167
189
|
STEP_DECORATORS = resolve_plugins("step_decorator")
|
|
168
190
|
FLOW_DECORATORS = resolve_plugins("flow_decorator")
|
|
169
191
|
ENVIRONMENTS = resolve_plugins("environment")
|
|
@@ -46,6 +46,7 @@ from metaflow.parameters import (
|
|
|
46
46
|
# TODO: Move chevron to _vendor
|
|
47
47
|
from metaflow.plugins.cards.card_modules import chevron
|
|
48
48
|
from metaflow.plugins.kubernetes.kubernetes import Kubernetes
|
|
49
|
+
from metaflow.plugins.kubernetes.kube_utils import qos_requests_and_limits
|
|
49
50
|
from metaflow.plugins.timeout_decorator import get_run_time_limit_for_task
|
|
50
51
|
from metaflow.util import compress_list, dict_to_cli_options, get_username
|
|
51
52
|
|
|
@@ -428,25 +429,25 @@ class Airflow(object):
|
|
|
428
429
|
if k8s_deco.attributes["namespace"] is not None
|
|
429
430
|
else "default"
|
|
430
431
|
)
|
|
431
|
-
|
|
432
|
+
qos_requests, qos_limits = qos_requests_and_limits(
|
|
433
|
+
k8s_deco.attributes["qos"],
|
|
434
|
+
k8s_deco.attributes["cpu"],
|
|
435
|
+
k8s_deco.attributes["memory"],
|
|
436
|
+
k8s_deco.attributes["disk"],
|
|
437
|
+
)
|
|
432
438
|
resources = dict(
|
|
433
|
-
requests=
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
439
|
+
requests=qos_requests,
|
|
440
|
+
limits={
|
|
441
|
+
**qos_limits,
|
|
442
|
+
**{
|
|
443
|
+
"%s.com/gpu".lower()
|
|
444
|
+
% k8s_deco.attributes["gpu_vendor"]: str(k8s_deco.attributes["gpu"])
|
|
445
|
+
for k in [0]
|
|
446
|
+
# Don't set GPU limits if gpu isn't specified.
|
|
447
|
+
if k8s_deco.attributes["gpu"] is not None
|
|
448
|
+
},
|
|
449
|
+
},
|
|
438
450
|
)
|
|
439
|
-
if k8s_deco.attributes["gpu"] is not None:
|
|
440
|
-
resources.update(
|
|
441
|
-
dict(
|
|
442
|
-
limits={
|
|
443
|
-
"%s.com/gpu".lower()
|
|
444
|
-
% k8s_deco.attributes["gpu_vendor"]: str(
|
|
445
|
-
k8s_deco.attributes["gpu"]
|
|
446
|
-
)
|
|
447
|
-
}
|
|
448
|
-
)
|
|
449
|
-
)
|
|
450
451
|
|
|
451
452
|
annotations = {
|
|
452
453
|
"metaflow/production_token": self.production_token,
|
|
@@ -283,6 +283,7 @@ def make_flow(
|
|
|
283
283
|
):
|
|
284
284
|
# Attach @kubernetes.
|
|
285
285
|
decorators._attach_decorators(obj.flow, [KubernetesDecorator.name])
|
|
286
|
+
decorators._init(obj.flow)
|
|
286
287
|
|
|
287
288
|
decorators._init_step_decorators(
|
|
288
289
|
obj.flow, obj.graph, obj.environment, obj.flow_datastore, obj.logger
|