ob-metaflow 2.12.26.1__py2.py3-none-any.whl → 2.12.30.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 +2 -3
- metaflow/cli.py +31 -4
- metaflow/client/core.py +78 -40
- metaflow/clone_util.py +1 -1
- metaflow/cmd/develop/stub_generator.py +623 -233
- metaflow/datastore/task_datastore.py +1 -1
- metaflow/extension_support/plugins.py +1 -0
- metaflow/flowspec.py +2 -2
- metaflow/includefile.py +8 -14
- metaflow/{metadata → metadata_provider}/metadata.py +6 -0
- metaflow/metaflow_config.py +4 -7
- metaflow/metaflow_current.py +1 -1
- metaflow/parameters.py +3 -0
- metaflow/plugins/__init__.py +12 -8
- metaflow/plugins/airflow/airflow_cli.py +5 -0
- metaflow/plugins/airflow/airflow_decorator.py +1 -1
- metaflow/plugins/argo/argo_workflows_cli.py +3 -3
- metaflow/plugins/argo/argo_workflows_decorator.py +1 -1
- metaflow/plugins/argo/argo_workflows_deployer.py +77 -363
- metaflow/plugins/argo/argo_workflows_deployer_objects.py +381 -0
- metaflow/plugins/aws/batch/batch_cli.py +1 -1
- metaflow/plugins/aws/batch/batch_decorator.py +2 -2
- metaflow/plugins/aws/step_functions/step_functions_cli.py +9 -2
- metaflow/plugins/aws/step_functions/step_functions_decorator.py +1 -1
- metaflow/plugins/aws/step_functions/step_functions_deployer.py +65 -224
- metaflow/plugins/aws/step_functions/step_functions_deployer_objects.py +236 -0
- metaflow/plugins/azure/includefile_support.py +2 -0
- metaflow/plugins/cards/card_cli.py +3 -2
- metaflow/plugins/cards/card_modules/components.py +9 -9
- metaflow/plugins/cards/card_server.py +39 -14
- metaflow/plugins/datatools/local.py +2 -0
- metaflow/plugins/datatools/s3/s3.py +2 -0
- metaflow/plugins/env_escape/__init__.py +3 -3
- metaflow/plugins/gcp/includefile_support.py +3 -0
- metaflow/plugins/kubernetes/kubernetes_cli.py +1 -1
- metaflow/plugins/kubernetes/kubernetes_decorator.py +5 -4
- metaflow/plugins/kubernetes/kubernetes_jobsets.py +1 -4
- metaflow/plugins/{metadata → metadata_providers}/local.py +2 -2
- metaflow/plugins/{metadata → metadata_providers}/service.py +2 -2
- metaflow/plugins/parallel_decorator.py +1 -1
- metaflow/plugins/pypi/conda_decorator.py +1 -1
- metaflow/plugins/resources_decorator.py +2 -2
- metaflow/plugins/tag_cli.py +1 -4
- metaflow/plugins/test_unbounded_foreach_decorator.py +1 -1
- metaflow/runner/click_api.py +4 -0
- metaflow/runner/deployer.py +134 -303
- metaflow/runner/deployer_impl.py +167 -0
- metaflow/runner/metaflow_runner.py +14 -12
- metaflow/runner/nbdeploy.py +12 -13
- metaflow/runner/nbrun.py +3 -3
- metaflow/runner/utils.py +55 -8
- metaflow/runtime.py +1 -1
- metaflow/system/system_logger.py +1 -19
- metaflow/system/system_monitor.py +0 -24
- metaflow/task.py +32 -26
- metaflow/version.py +1 -1
- {ob_metaflow-2.12.26.1.dist-info → ob_metaflow-2.12.30.1.dist-info}/METADATA +2 -2
- {ob_metaflow-2.12.26.1.dist-info → ob_metaflow-2.12.30.1.dist-info}/RECORD +66 -63
- {ob_metaflow-2.12.26.1.dist-info → ob_metaflow-2.12.30.1.dist-info}/WHEEL +1 -1
- /metaflow/{metadata → metadata_provider}/__init__.py +0 -0
- /metaflow/{metadata → metadata_provider}/heartbeat.py +0 -0
- /metaflow/{metadata → metadata_provider}/util.py +0 -0
- /metaflow/plugins/{metadata → metadata_providers}/__init__.py +0 -0
- {ob_metaflow-2.12.26.1.dist-info → ob_metaflow-2.12.30.1.dist-info}/LICENSE +0 -0
- {ob_metaflow-2.12.26.1.dist-info → ob_metaflow-2.12.30.1.dist-info}/entry_points.txt +0 -0
- {ob_metaflow-2.12.26.1.dist-info → ob_metaflow-2.12.30.1.dist-info}/top_level.txt +0 -0
|
@@ -124,9 +124,9 @@ def load():
|
|
|
124
124
|
cur_path = os.path.dirname(__file__)
|
|
125
125
|
sys.path = [p for p in old_paths if p != cur_path]
|
|
126
126
|
# Handle special case where we launch a shell (including with a command)
|
|
127
|
-
# and we are in the CWD (searched if '' is
|
|
128
|
-
if cur_path == os.getcwd() and sys.path
|
|
129
|
-
sys.path
|
|
127
|
+
# and we are in the CWD (searched if '' is present in sys.path)
|
|
128
|
+
if cur_path == os.getcwd() and '' in sys.path:
|
|
129
|
+
sys.path.remove("")
|
|
130
130
|
|
|
131
131
|
# Remove the module (this file) to reload it properly. Do *NOT* update sys.modules but
|
|
132
132
|
# modify directly since it may be referenced elsewhere
|
|
@@ -9,7 +9,7 @@ import metaflow.tracing as tracing
|
|
|
9
9
|
from metaflow import JSONTypeClass, util
|
|
10
10
|
from metaflow._vendor import click
|
|
11
11
|
from metaflow.exception import METAFLOW_EXIT_DISALLOW_RETRY, MetaflowException
|
|
12
|
-
from metaflow.
|
|
12
|
+
from metaflow.metadata_provider.util import sync_local_metadata_from_datastore
|
|
13
13
|
from metaflow.metaflow_config import DATASTORE_LOCAL_DIR, KUBERNETES_LABELS
|
|
14
14
|
from metaflow.mflog import TASK_LOG_SOURCE
|
|
15
15
|
from metaflow.unbounded_foreach import UBF_CONTROL, UBF_TASK
|
|
@@ -7,8 +7,8 @@ import time
|
|
|
7
7
|
from metaflow import current
|
|
8
8
|
from metaflow.decorators import StepDecorator
|
|
9
9
|
from metaflow.exception import MetaflowException
|
|
10
|
-
from metaflow.
|
|
11
|
-
from metaflow.
|
|
10
|
+
from metaflow.metadata_provider import MetaDatum
|
|
11
|
+
from metaflow.metadata_provider.util import sync_local_metadata_to_datastore
|
|
12
12
|
from metaflow.metaflow_config import (
|
|
13
13
|
DATASTORE_LOCAL_DIR,
|
|
14
14
|
KUBERNETES_CONTAINER_IMAGE,
|
|
@@ -75,8 +75,9 @@ class KubernetesDecorator(StepDecorator):
|
|
|
75
75
|
in Metaflow configuration.
|
|
76
76
|
node_selector: Union[Dict[str,str], str], optional, default None
|
|
77
77
|
Kubernetes node selector(s) to apply to the pod running the task.
|
|
78
|
-
Can be passed in as a comma separated string of values e.g.
|
|
79
|
-
|
|
78
|
+
Can be passed in as a comma separated string of values e.g.
|
|
79
|
+
'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
|
|
80
|
+
{'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
|
|
80
81
|
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
|
81
82
|
Kubernetes namespace to use when launching pod in Kubernetes.
|
|
82
83
|
gpu : int, optional, default None
|
|
@@ -332,11 +332,8 @@ class RunningJobSet(object):
|
|
|
332
332
|
name=self._name,
|
|
333
333
|
)
|
|
334
334
|
|
|
335
|
-
# Suspend the jobset
|
|
336
|
-
#
|
|
335
|
+
# Suspend the jobset
|
|
337
336
|
obj["spec"]["suspend"] = True
|
|
338
|
-
for replicated_job in obj["spec"]["replicatedJobs"]:
|
|
339
|
-
replicated_job["replicas"] = 0
|
|
340
337
|
|
|
341
338
|
api_instance.replace_namespaced_custom_object(
|
|
342
339
|
group=self._group,
|
|
@@ -8,9 +8,9 @@ import time
|
|
|
8
8
|
from collections import namedtuple
|
|
9
9
|
|
|
10
10
|
from metaflow.exception import MetaflowInternalError, MetaflowTaggingError
|
|
11
|
-
from metaflow.
|
|
11
|
+
from metaflow.metadata_provider.metadata import ObjectOrder
|
|
12
12
|
from metaflow.metaflow_config import DATASTORE_LOCAL_DIR
|
|
13
|
-
from metaflow.
|
|
13
|
+
from metaflow.metadata_provider import MetadataProvider
|
|
14
14
|
from metaflow.tagging_util import MAX_USER_TAG_SET_SIZE, validate_tags
|
|
15
15
|
|
|
16
16
|
|
|
@@ -14,8 +14,8 @@ from metaflow.metaflow_config import (
|
|
|
14
14
|
SERVICE_HEADERS,
|
|
15
15
|
SERVICE_URL,
|
|
16
16
|
)
|
|
17
|
-
from metaflow.
|
|
18
|
-
from metaflow.
|
|
17
|
+
from metaflow.metadata_provider import MetadataProvider
|
|
18
|
+
from metaflow.metadata_provider.heartbeat import HB_URL_KEY
|
|
19
19
|
from metaflow.sidecar import Message, MessageTypes, Sidecar
|
|
20
20
|
|
|
21
21
|
from metaflow.util import version_parse
|
|
@@ -2,7 +2,7 @@ from collections import namedtuple
|
|
|
2
2
|
from metaflow.decorators import StepDecorator
|
|
3
3
|
from metaflow.unbounded_foreach import UBF_CONTROL, CONTROL_TASK_TAG
|
|
4
4
|
from metaflow.exception import MetaflowException
|
|
5
|
-
from metaflow.
|
|
5
|
+
from metaflow.metadata_provider import MetaDatum
|
|
6
6
|
from metaflow.metaflow_current import current, Parallel
|
|
7
7
|
import os
|
|
8
8
|
import sys
|
|
@@ -8,7 +8,7 @@ import tempfile
|
|
|
8
8
|
|
|
9
9
|
from metaflow.decorators import FlowDecorator, StepDecorator
|
|
10
10
|
from metaflow.extension_support import EXT_PKG
|
|
11
|
-
from metaflow.
|
|
11
|
+
from metaflow.metadata_provider import MetaDatum
|
|
12
12
|
from metaflow.metaflow_environment import InvalidEnvironmentException
|
|
13
13
|
from metaflow.util import get_metaflow_root
|
|
14
14
|
|
|
@@ -23,7 +23,7 @@ class ResourcesDecorator(StepDecorator):
|
|
|
23
23
|
----------
|
|
24
24
|
cpu : int, default 1
|
|
25
25
|
Number of CPUs required for this step.
|
|
26
|
-
gpu : int, default
|
|
26
|
+
gpu : int, optional, default None
|
|
27
27
|
Number of GPUs required for this step.
|
|
28
28
|
disk : int, optional, default None
|
|
29
29
|
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
|
@@ -37,7 +37,7 @@ class ResourcesDecorator(StepDecorator):
|
|
|
37
37
|
name = "resources"
|
|
38
38
|
defaults = {
|
|
39
39
|
"cpu": "1",
|
|
40
|
-
"gpu":
|
|
40
|
+
"gpu": None,
|
|
41
41
|
"disk": None,
|
|
42
42
|
"memory": "4096",
|
|
43
43
|
"shared_memory": None,
|
metaflow/plugins/tag_cli.py
CHANGED
|
@@ -225,10 +225,7 @@ def _get_client_run_obj(obj, run_id, user_namespace):
|
|
|
225
225
|
|
|
226
226
|
|
|
227
227
|
def _set_current(obj):
|
|
228
|
-
current._set_env(
|
|
229
|
-
metadata_str="%s@%s"
|
|
230
|
-
% (obj.metadata.__class__.TYPE, obj.metadata.__class__.INFO)
|
|
231
|
-
)
|
|
228
|
+
current._set_env(metadata_str=obj.metadata.metadata_str())
|
|
232
229
|
|
|
233
230
|
|
|
234
231
|
@click.group()
|
|
@@ -15,7 +15,7 @@ from metaflow.unbounded_foreach import (
|
|
|
15
15
|
CONTROL_TASK_TAG,
|
|
16
16
|
)
|
|
17
17
|
from metaflow.util import to_unicode
|
|
18
|
-
from metaflow.
|
|
18
|
+
from metaflow.metadata_provider import MetaDatum
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class InternalTestUnboundedForeachInput(UnboundedForeachInput):
|
metaflow/runner/click_api.py
CHANGED
|
@@ -193,6 +193,10 @@ class MetaflowAPI(object):
|
|
|
193
193
|
def chain(self):
|
|
194
194
|
return self._chain
|
|
195
195
|
|
|
196
|
+
@property
|
|
197
|
+
def name(self):
|
|
198
|
+
return self._API_NAME
|
|
199
|
+
|
|
196
200
|
@classmethod
|
|
197
201
|
def from_cli(cls, flow_file: str, cli_collection: Callable) -> Callable:
|
|
198
202
|
flow_cls = extract_flow_class_from_file(flow_file)
|