ob-metaflow-stubs 2.11.4.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.
- metaflow-stubs/__init__.pyi +2753 -0
- metaflow-stubs/cards.pyi +266 -0
- metaflow-stubs/cli.pyi +137 -0
- metaflow-stubs/client/__init__.pyi +993 -0
- metaflow-stubs/client/core.pyi +1425 -0
- metaflow-stubs/client/filecache.pyi +87 -0
- metaflow-stubs/events.pyi +107 -0
- metaflow-stubs/exception.pyi +98 -0
- metaflow-stubs/flowspec.pyi +297 -0
- metaflow-stubs/generated_for.txt +1 -0
- metaflow-stubs/includefile.pyi +524 -0
- metaflow-stubs/metadata/metadata.pyi +377 -0
- metaflow-stubs/metadata/util.pyi +18 -0
- metaflow-stubs/metaflow_config.pyi +263 -0
- metaflow-stubs/metaflow_current.pyi +327 -0
- metaflow-stubs/mflog/mflog.pyi +22 -0
- metaflow-stubs/multicore_utils.pyi +62 -0
- metaflow-stubs/parameters.pyi +114 -0
- metaflow-stubs/plugins/__init__.pyi +209 -0
- metaflow-stubs/plugins/airflow/__init__.pyi +9 -0
- metaflow-stubs/plugins/airflow/airflow.pyi +179 -0
- metaflow-stubs/plugins/airflow/airflow_cli.pyi +90 -0
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +50 -0
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +137 -0
- metaflow-stubs/plugins/airflow/exception.pyi +27 -0
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +26 -0
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +60 -0
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +54 -0
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +50 -0
- metaflow-stubs/plugins/argo/__init__.pyi +9 -0
- metaflow-stubs/plugins/argo/argo_client.pyi +77 -0
- metaflow-stubs/plugins/argo/argo_events.pyi +79 -0
- metaflow-stubs/plugins/argo/argo_workflows.pyi +604 -0
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +180 -0
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +169 -0
- metaflow-stubs/plugins/aws/__init__.pyi +9 -0
- metaflow-stubs/plugins/aws/aws_client.pyi +22 -0
- metaflow-stubs/plugins/aws/aws_utils.pyi +93 -0
- metaflow-stubs/plugins/aws/batch/__init__.pyi +9 -0
- metaflow-stubs/plugins/aws/batch/batch.pyi +120 -0
- metaflow-stubs/plugins/aws/batch/batch_cli.pyi +42 -0
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +159 -0
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +145 -0
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +9 -0
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +73 -0
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +9 -0
- metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +22 -0
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +27 -0
- metaflow-stubs/plugins/aws/step_functions/production_token.pyi +18 -0
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +17 -0
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +220 -0
- metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +139 -0
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +36 -0
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +49 -0
- metaflow-stubs/plugins/azure/__init__.pyi +9 -0
- metaflow-stubs/plugins/azure/azure_credential.pyi +28 -0
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +28 -0
- metaflow-stubs/plugins/azure/azure_utils.pyi +76 -0
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +52 -0
- metaflow-stubs/plugins/azure/includefile_support.pyi +63 -0
- metaflow-stubs/plugins/cards/__init__.pyi +9 -0
- metaflow-stubs/plugins/cards/card_cli.pyi +557 -0
- metaflow-stubs/plugins/cards/card_client.pyi +178 -0
- metaflow-stubs/plugins/cards/card_creator.pyi +26 -0
- metaflow-stubs/plugins/cards/card_datastore.pyi +111 -0
- metaflow-stubs/plugins/cards/card_decorator.pyi +133 -0
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +67 -0
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +263 -0
- metaflow-stubs/plugins/cards/card_modules/card.pyi +62 -0
- metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +78 -0
- metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +77 -0
- metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +11 -0
- metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +114 -0
- metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +75 -0
- metaflow-stubs/plugins/cards/card_modules/components.pyi +251 -0
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +45 -0
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +24 -0
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +155 -0
- metaflow-stubs/plugins/cards/card_resolver.pyi +60 -0
- metaflow-stubs/plugins/cards/component_serializer.pyi +227 -0
- metaflow-stubs/plugins/cards/exception.pyi +71 -0
- metaflow-stubs/plugins/catch_decorator.pyi +58 -0
- metaflow-stubs/plugins/datatools/__init__.pyi +339 -0
- metaflow-stubs/plugins/datatools/local.pyi +82 -0
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +589 -0
- metaflow-stubs/plugins/datatools/s3/s3.pyi +875 -0
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +34 -0
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +45 -0
- metaflow-stubs/plugins/debug_logger.pyi +25 -0
- metaflow-stubs/plugins/debug_monitor.pyi +25 -0
- metaflow-stubs/plugins/environment_decorator.pyi +17 -0
- metaflow-stubs/plugins/events_decorator.pyi +34 -0
- metaflow-stubs/plugins/frameworks/__init__.pyi +9 -0
- metaflow-stubs/plugins/frameworks/pytorch.pyi +42 -0
- metaflow-stubs/plugins/gcp/__init__.pyi +9 -0
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +22 -0
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +26 -0
- metaflow-stubs/plugins/gcp/gs_utils.pyi +38 -0
- metaflow-stubs/plugins/gcp/includefile_support.pyi +63 -0
- metaflow-stubs/plugins/kubernetes/__init__.pyi +9 -0
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +127 -0
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +73 -0
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +62 -0
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +165 -0
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +100 -0
- metaflow-stubs/plugins/package_cli.pyi +9 -0
- metaflow-stubs/plugins/parallel_decorator.pyi +34 -0
- metaflow-stubs/plugins/project_decorator.pyi +36 -0
- metaflow-stubs/plugins/pypi/__init__.pyi +18 -0
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +59 -0
- metaflow-stubs/plugins/pypi/conda_environment.pyi +86 -0
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +22 -0
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +50 -0
- metaflow-stubs/plugins/pypi/utils.pyi +28 -0
- metaflow-stubs/plugins/resources_decorator.pyi +15 -0
- metaflow-stubs/plugins/retry_decorator.pyi +28 -0
- metaflow-stubs/plugins/secrets/__init__.pyi +21 -0
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +30 -0
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +75 -0
- metaflow-stubs/plugins/storage_executor.pyi +33 -0
- metaflow-stubs/plugins/tag_cli.pyi +370 -0
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +54 -0
- metaflow-stubs/plugins/timeout_decorator.pyi +39 -0
- metaflow-stubs/procpoll.pyi +51 -0
- metaflow-stubs/py.typed +0 -0
- metaflow-stubs/pylint_wrapper.pyi +31 -0
- metaflow-stubs/tagging_util.pyi +52 -0
- ob_metaflow_stubs-2.11.4.1.dist-info/METADATA +22 -0
- ob_metaflow_stubs-2.11.4.1.dist-info/RECORD +131 -0
- ob_metaflow_stubs-2.11.4.1.dist-info/WHEEL +6 -0
- ob_metaflow_stubs-2.11.4.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
##################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.11.4.1 #
|
4
|
+
# Generated on 2024-02-28T05:30:43.926645 #
|
5
|
+
##################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow.datastore.content_addressed_store
|
12
|
+
import metaflow.exception
|
13
|
+
|
14
|
+
class MetaflowException(Exception, metaclass=type):
|
15
|
+
def __init__(self, msg = "", lineno = None):
|
16
|
+
...
|
17
|
+
def __str__(self):
|
18
|
+
...
|
19
|
+
...
|
20
|
+
|
21
|
+
CLIENT_CACHE_PATH: str
|
22
|
+
|
23
|
+
CLIENT_CACHE_MAX_SIZE: int
|
24
|
+
|
25
|
+
CLIENT_CACHE_MAX_FLOWDATASTORE_COUNT: int
|
26
|
+
|
27
|
+
CLIENT_CACHE_MAX_TASKDATASTORE_COUNT: int
|
28
|
+
|
29
|
+
DATASTORES: list
|
30
|
+
|
31
|
+
NEW_FILE_QUARANTINE: int
|
32
|
+
|
33
|
+
def od_move_to_end(od, key):
|
34
|
+
...
|
35
|
+
|
36
|
+
class FileCacheException(metaflow.exception.MetaflowException, metaclass=type):
|
37
|
+
...
|
38
|
+
|
39
|
+
class FileCache(object, metaclass=type):
|
40
|
+
def __init__(self, cache_dir = None, max_size = None):
|
41
|
+
...
|
42
|
+
@property
|
43
|
+
def cache_dir(self):
|
44
|
+
...
|
45
|
+
def get_logs_stream(self, ds_type, ds_root, stream, attempt, flow_name, run_id, step_name, task_id):
|
46
|
+
...
|
47
|
+
def get_log_legacy(self, ds_type, location, logtype, attempt, flow_name, run_id, step_name, task_id):
|
48
|
+
...
|
49
|
+
def get_legacy_log_size(self, ds_type, location, logtype, attempt, flow_name, run_id, step_name, task_id):
|
50
|
+
...
|
51
|
+
def get_log_size(self, ds_type, ds_root, logtype, attempt, flow_name, run_id, step_name, task_id):
|
52
|
+
...
|
53
|
+
def get_data(self, ds_type, flow_name, location, key):
|
54
|
+
...
|
55
|
+
def get_artifact_size_by_location(self, ds_type, location, attempt, flow_name, run_id, step_name, task_id, name):
|
56
|
+
"""
|
57
|
+
Gets the size of the artifact content (in bytes) for the name at the location
|
58
|
+
"""
|
59
|
+
...
|
60
|
+
def get_artifact_size(self, ds_type, ds_root, attempt, flow_name, run_id, step_name, task_id, name):
|
61
|
+
"""
|
62
|
+
Gets the size of the artifact content (in bytes) for the name
|
63
|
+
"""
|
64
|
+
...
|
65
|
+
def get_artifact_by_location(self, ds_type, location, data_metadata, flow_name, run_id, step_name, task_id, name):
|
66
|
+
...
|
67
|
+
def get_artifact(self, ds_type, ds_root, data_metadata, flow_name, run_id, step_name, task_id, name):
|
68
|
+
...
|
69
|
+
def get_all_artifacts(self, ds_type, ds_root, data_metadata, flow_name, run_id, step_name, task_id):
|
70
|
+
...
|
71
|
+
def get_artifacts(self, ds_type, ds_root, data_metadata, flow_name, run_id, step_name, task_id, names):
|
72
|
+
...
|
73
|
+
def create_file(self, path, value):
|
74
|
+
...
|
75
|
+
def read_file(self, path):
|
76
|
+
...
|
77
|
+
...
|
78
|
+
|
79
|
+
class FileBlobCache(metaflow.datastore.content_addressed_store.BlobCache, metaclass=type):
|
80
|
+
def __init__(self, filecache, cache_id):
|
81
|
+
...
|
82
|
+
def load_key(self, key):
|
83
|
+
...
|
84
|
+
def store_key(self, key, blob):
|
85
|
+
...
|
86
|
+
...
|
87
|
+
|
@@ -0,0 +1,107 @@
|
|
1
|
+
##################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.11.4.1 #
|
4
|
+
# Generated on 2024-02-28T05:30:43.903524 #
|
5
|
+
##################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow
|
12
|
+
import metaflow.events
|
13
|
+
|
14
|
+
TYPE_CHECKING: bool
|
15
|
+
|
16
|
+
class MetaflowEvent(tuple, metaclass=type):
|
17
|
+
@staticmethod
|
18
|
+
def __new__(_cls, name, id, timestamp, type):
|
19
|
+
"""
|
20
|
+
Create new instance of MetaflowEvent(name, id, timestamp, type)
|
21
|
+
"""
|
22
|
+
...
|
23
|
+
def __repr__(self):
|
24
|
+
"""
|
25
|
+
Return a nicely formatted representation string
|
26
|
+
"""
|
27
|
+
...
|
28
|
+
def __getnewargs__(self):
|
29
|
+
"""
|
30
|
+
Return self as a plain tuple. Used by copy and pickle.
|
31
|
+
"""
|
32
|
+
...
|
33
|
+
...
|
34
|
+
|
35
|
+
class Trigger(object, metaclass=type):
|
36
|
+
def __init__(self, _meta = None):
|
37
|
+
...
|
38
|
+
@classmethod
|
39
|
+
def from_runs(cls, run_objs: typing.List["metaflow.Run"]):
|
40
|
+
...
|
41
|
+
@property
|
42
|
+
def event(self) -> typing.Optional[MetaflowEvent]:
|
43
|
+
"""
|
44
|
+
The `MetaflowEvent` object corresponding to the triggering event.
|
45
|
+
|
46
|
+
If multiple events triggered the run, this property is the latest event.
|
47
|
+
|
48
|
+
Returns
|
49
|
+
-------
|
50
|
+
MetaflowEvent, optional
|
51
|
+
The latest event that triggered the run, if applicable.
|
52
|
+
"""
|
53
|
+
...
|
54
|
+
@property
|
55
|
+
def events(self) -> typing.Optional[typing.List[MetaflowEvent]]:
|
56
|
+
"""
|
57
|
+
The list of `MetaflowEvent` objects correspondings to all the triggering events.
|
58
|
+
|
59
|
+
Returns
|
60
|
+
-------
|
61
|
+
List[MetaflowEvent], optional
|
62
|
+
List of all events that triggered the run
|
63
|
+
"""
|
64
|
+
...
|
65
|
+
@property
|
66
|
+
def run(self) -> typing.Optional["metaflow.Run"]:
|
67
|
+
"""
|
68
|
+
The corresponding `Run` object if the triggering event is a Metaflow run.
|
69
|
+
|
70
|
+
In case multiple runs triggered the run, this property is the latest run.
|
71
|
+
Returns `None` if none of the triggering events are a `Run`.
|
72
|
+
|
73
|
+
Returns
|
74
|
+
-------
|
75
|
+
Run, optional
|
76
|
+
Latest Run that triggered this run, if applicable.
|
77
|
+
"""
|
78
|
+
...
|
79
|
+
@property
|
80
|
+
def runs(self) -> typing.Optional[typing.List["metaflow.Run"]]:
|
81
|
+
"""
|
82
|
+
The list of `Run` objects in the triggering events.
|
83
|
+
Returns `None` if none of the triggering events are `Run` objects.
|
84
|
+
|
85
|
+
Returns
|
86
|
+
-------
|
87
|
+
List[Run], optional
|
88
|
+
List of runs that triggered this run, if applicable.
|
89
|
+
"""
|
90
|
+
...
|
91
|
+
def __getitem__(self, key: str) -> typing.Union["metaflow.Run", MetaflowEvent]:
|
92
|
+
"""
|
93
|
+
If triggering events are runs, `key` corresponds to the flow name of the triggering run.
|
94
|
+
Otherwise, `key` corresponds to the event name and a `MetaflowEvent` object is returned.
|
95
|
+
|
96
|
+
Returns
|
97
|
+
-------
|
98
|
+
Union[Run, MetaflowEvent]
|
99
|
+
`Run` object if triggered by a run. Otherwise returns a `MetaflowEvent`.
|
100
|
+
"""
|
101
|
+
...
|
102
|
+
def __iter__(self):
|
103
|
+
...
|
104
|
+
def __contains__(self, ident: str) -> bool:
|
105
|
+
...
|
106
|
+
...
|
107
|
+
|
@@ -0,0 +1,98 @@
|
|
1
|
+
##################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.11.4.1 #
|
4
|
+
# Generated on 2024-02-28T05:30:43.889094 #
|
5
|
+
##################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow.exception
|
12
|
+
|
13
|
+
METAFLOW_EXIT_DISALLOW_RETRY: int
|
14
|
+
|
15
|
+
METAFLOW_EXIT_ALLOW_RETRY: int
|
16
|
+
|
17
|
+
class MetaflowExceptionWrapper(Exception, metaclass=type):
|
18
|
+
def __init__(self, exc = None):
|
19
|
+
...
|
20
|
+
def __reduce__(self):
|
21
|
+
...
|
22
|
+
def __getstate__(self):
|
23
|
+
...
|
24
|
+
def __setstate__(self, state):
|
25
|
+
...
|
26
|
+
def __repr__(self):
|
27
|
+
...
|
28
|
+
def __str__(self):
|
29
|
+
...
|
30
|
+
...
|
31
|
+
|
32
|
+
class MetaflowException(Exception, metaclass=type):
|
33
|
+
def __init__(self, msg = "", lineno = None):
|
34
|
+
...
|
35
|
+
def __str__(self):
|
36
|
+
...
|
37
|
+
...
|
38
|
+
|
39
|
+
class ParameterFieldFailed(MetaflowException, metaclass=type):
|
40
|
+
def __init__(self, name, field):
|
41
|
+
...
|
42
|
+
...
|
43
|
+
|
44
|
+
class ParameterFieldTypeMismatch(MetaflowException, metaclass=type):
|
45
|
+
def __init__(self, msg):
|
46
|
+
...
|
47
|
+
...
|
48
|
+
|
49
|
+
class ExternalCommandFailed(MetaflowException, metaclass=type):
|
50
|
+
def __init__(self, msg):
|
51
|
+
...
|
52
|
+
...
|
53
|
+
|
54
|
+
class MetaflowNotFound(MetaflowException, metaclass=type):
|
55
|
+
...
|
56
|
+
|
57
|
+
class MetaflowNamespaceMismatch(MetaflowException, metaclass=type):
|
58
|
+
def __init__(self, namespace):
|
59
|
+
...
|
60
|
+
...
|
61
|
+
|
62
|
+
class MetaflowInvalidPathspec(MetaflowException, metaclass=type):
|
63
|
+
def __init__(self, msg):
|
64
|
+
...
|
65
|
+
...
|
66
|
+
|
67
|
+
class MetaflowInternalError(MetaflowException, metaclass=type):
|
68
|
+
...
|
69
|
+
|
70
|
+
class MetaflowTaggingError(MetaflowException, metaclass=type):
|
71
|
+
...
|
72
|
+
|
73
|
+
class MetaflowUnknownUser(MetaflowException, metaclass=type):
|
74
|
+
def __init__(self):
|
75
|
+
...
|
76
|
+
...
|
77
|
+
|
78
|
+
class InvalidDecoratorAttribute(MetaflowException, metaclass=type):
|
79
|
+
def __init__(self, deconame, attr, defaults):
|
80
|
+
...
|
81
|
+
...
|
82
|
+
|
83
|
+
class CommandException(MetaflowException, metaclass=type):
|
84
|
+
...
|
85
|
+
|
86
|
+
class MetaflowDataMissing(MetaflowException, metaclass=type):
|
87
|
+
...
|
88
|
+
|
89
|
+
class UnhandledInMergeArtifactsException(MetaflowException, metaclass=type):
|
90
|
+
def __init__(self, msg, unhandled):
|
91
|
+
...
|
92
|
+
...
|
93
|
+
|
94
|
+
class MissingInMergeArtifactsException(MetaflowException, metaclass=type):
|
95
|
+
def __init__(self, msg, unhandled):
|
96
|
+
...
|
97
|
+
...
|
98
|
+
|
@@ -0,0 +1,297 @@
|
|
1
|
+
##################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.11.4.1 #
|
4
|
+
# Generated on 2024-02-28T05:30:43.902675 #
|
5
|
+
##################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow.exception
|
12
|
+
import metaflow.parameters
|
13
|
+
import metaflow.unbounded_foreach
|
14
|
+
import metaflow.datastore.inputs
|
15
|
+
import typing
|
16
|
+
|
17
|
+
class DelayedEvaluationParameter(object, metaclass=type):
|
18
|
+
def __init__(self, name, field, fun):
|
19
|
+
...
|
20
|
+
def __call__(self, return_str = False):
|
21
|
+
...
|
22
|
+
...
|
23
|
+
|
24
|
+
class Parameter(object, metaclass=type):
|
25
|
+
def __init__(self, name: str, default: typing.Union[str, float, int, bool, typing.Dict[str, typing.Any], typing.Callable[[], typing.Union[str, float, int, bool, typing.Dict[str, typing.Any]]], None] = None, type: typing.Union[typing.Type[str], typing.Type[float], typing.Type[int], typing.Type[bool], metaflow.parameters.JSONTypeClass, None] = None, help: typing.Optional[str] = None, required: bool = False, show_default: bool = True, **kwargs: typing.Dict[str, typing.Any]):
|
26
|
+
...
|
27
|
+
def __repr__(self):
|
28
|
+
...
|
29
|
+
def __str__(self):
|
30
|
+
...
|
31
|
+
def option_kwargs(self, deploy_mode):
|
32
|
+
...
|
33
|
+
def load_parameter(self, v):
|
34
|
+
...
|
35
|
+
@property
|
36
|
+
def is_string_type(self):
|
37
|
+
...
|
38
|
+
def __getitem__(self, x):
|
39
|
+
...
|
40
|
+
...
|
41
|
+
|
42
|
+
class MetaflowException(Exception, metaclass=type):
|
43
|
+
def __init__(self, msg = "", lineno = None):
|
44
|
+
...
|
45
|
+
def __str__(self):
|
46
|
+
...
|
47
|
+
...
|
48
|
+
|
49
|
+
class MissingInMergeArtifactsException(metaflow.exception.MetaflowException, metaclass=type):
|
50
|
+
def __init__(self, msg, unhandled):
|
51
|
+
...
|
52
|
+
...
|
53
|
+
|
54
|
+
class UnhandledInMergeArtifactsException(metaflow.exception.MetaflowException, metaclass=type):
|
55
|
+
def __init__(self, msg, unhandled):
|
56
|
+
...
|
57
|
+
...
|
58
|
+
|
59
|
+
INCLUDE_FOREACH_STACK: bool
|
60
|
+
|
61
|
+
MAXIMUM_FOREACH_VALUE_CHARS: int
|
62
|
+
|
63
|
+
INTERNAL_ARTIFACTS_SET: set
|
64
|
+
|
65
|
+
class InvalidNextException(metaflow.exception.MetaflowException, metaclass=type):
|
66
|
+
def __init__(self, msg):
|
67
|
+
...
|
68
|
+
...
|
69
|
+
|
70
|
+
class ParallelUBF(metaflow.unbounded_foreach.UnboundedForeachInput, metaclass=type):
|
71
|
+
def __init__(self, num_parallel):
|
72
|
+
...
|
73
|
+
def __getitem__(self, item):
|
74
|
+
...
|
75
|
+
...
|
76
|
+
|
77
|
+
class FlowSpec(object, metaclass=type):
|
78
|
+
def __init__(self, use_cli = True):
|
79
|
+
"""
|
80
|
+
Construct a FlowSpec
|
81
|
+
|
82
|
+
Parameters
|
83
|
+
----------
|
84
|
+
use_cli : bool, default True
|
85
|
+
Set to True if the flow is invoked from __main__ or the command line
|
86
|
+
"""
|
87
|
+
...
|
88
|
+
@property
|
89
|
+
def script_name(self) -> str:
|
90
|
+
"""
|
91
|
+
[Legacy function - do not use. Use `current` instead]
|
92
|
+
|
93
|
+
Returns the name of the script containing the flow
|
94
|
+
|
95
|
+
Returns
|
96
|
+
-------
|
97
|
+
str
|
98
|
+
A string containing the name of the script
|
99
|
+
"""
|
100
|
+
...
|
101
|
+
def __iter__(self):
|
102
|
+
"""
|
103
|
+
[Legacy function - do not use]
|
104
|
+
|
105
|
+
Iterate over all steps in the Flow
|
106
|
+
|
107
|
+
Returns
|
108
|
+
-------
|
109
|
+
Iterator[graph.DAGNode]
|
110
|
+
Iterator over the steps in the flow
|
111
|
+
"""
|
112
|
+
...
|
113
|
+
def __getattr__(self, name: str):
|
114
|
+
...
|
115
|
+
def cmd(self, cmdline, input = {}, output = []):
|
116
|
+
"""
|
117
|
+
[Legacy function - do not use]
|
118
|
+
"""
|
119
|
+
...
|
120
|
+
@property
|
121
|
+
def index(self) -> typing.Optional[int]:
|
122
|
+
"""
|
123
|
+
The index of this foreach branch.
|
124
|
+
|
125
|
+
In a foreach step, multiple instances of this step (tasks) will be executed,
|
126
|
+
one for each element in the foreach. This property returns the zero based index
|
127
|
+
of the current task. If this is not a foreach step, this returns None.
|
128
|
+
|
129
|
+
If you need to know the indices of the parent tasks in a nested foreach, use
|
130
|
+
`FlowSpec.foreach_stack`.
|
131
|
+
|
132
|
+
Returns
|
133
|
+
-------
|
134
|
+
int, optional
|
135
|
+
Index of the task in a foreach step.
|
136
|
+
"""
|
137
|
+
...
|
138
|
+
@property
|
139
|
+
def input(self) -> typing.Optional[typing.Any]:
|
140
|
+
"""
|
141
|
+
The value of the foreach artifact in this foreach branch.
|
142
|
+
|
143
|
+
In a foreach step, multiple instances of this step (tasks) will be executed,
|
144
|
+
one for each element in the foreach. This property returns the element passed
|
145
|
+
to the current task. If this is not a foreach step, this returns None.
|
146
|
+
|
147
|
+
If you need to know the values of the parent tasks in a nested foreach, use
|
148
|
+
`FlowSpec.foreach_stack`.
|
149
|
+
|
150
|
+
Returns
|
151
|
+
-------
|
152
|
+
object, optional
|
153
|
+
Input passed to the foreach task.
|
154
|
+
"""
|
155
|
+
...
|
156
|
+
def foreach_stack(self) -> typing.Optional[typing.List[typing.Tuple[int, int, typing.Any]]]:
|
157
|
+
"""
|
158
|
+
Returns the current stack of foreach indexes and values for the current step.
|
159
|
+
|
160
|
+
Use this information to understand what data is being processed in the current
|
161
|
+
foreach branch. For example, considering the following code:
|
162
|
+
```
|
163
|
+
@step
|
164
|
+
def root(self):
|
165
|
+
self.split_1 = ['a', 'b', 'c']
|
166
|
+
self.next(self.nest_1, foreach='split_1')
|
167
|
+
|
168
|
+
@step
|
169
|
+
def nest_1(self):
|
170
|
+
self.split_2 = ['d', 'e', 'f', 'g']
|
171
|
+
self.next(self.nest_2, foreach='split_2'):
|
172
|
+
|
173
|
+
@step
|
174
|
+
def nest_2(self):
|
175
|
+
foo = self.foreach_stack()
|
176
|
+
```
|
177
|
+
|
178
|
+
`foo` will take the following values in the various tasks for nest_2:
|
179
|
+
```
|
180
|
+
[(0, 3, 'a'), (0, 4, 'd')]
|
181
|
+
[(0, 3, 'a'), (1, 4, 'e')]
|
182
|
+
...
|
183
|
+
[(0, 3, 'a'), (3, 4, 'g')]
|
184
|
+
[(1, 3, 'b'), (0, 4, 'd')]
|
185
|
+
...
|
186
|
+
```
|
187
|
+
where each tuple corresponds to:
|
188
|
+
|
189
|
+
- The index of the task for that level of the loop.
|
190
|
+
- The number of splits for that level of the loop.
|
191
|
+
- The value for that level of the loop.
|
192
|
+
|
193
|
+
Note that the last tuple returned in a task corresponds to:
|
194
|
+
|
195
|
+
- 1st element: value returned by `self.index`.
|
196
|
+
- 3rd element: value returned by `self.input`.
|
197
|
+
|
198
|
+
Returns
|
199
|
+
-------
|
200
|
+
List[Tuple[int, int, Any]]
|
201
|
+
An array describing the current stack of foreach steps.
|
202
|
+
"""
|
203
|
+
...
|
204
|
+
def merge_artifacts(self, inputs: metaflow.datastore.inputs.Inputs, exclude: typing.Optional[typing.List[str]] = None, include: typing.Optional[typing.List[str]] = None):
|
205
|
+
"""
|
206
|
+
Helper function for merging artifacts in a join step.
|
207
|
+
|
208
|
+
This function takes all the artifacts coming from the branches of a
|
209
|
+
join point and assigns them to self in the calling step. Only artifacts
|
210
|
+
not set in the current step are considered. If, for a given artifact, different
|
211
|
+
values are present on the incoming edges, an error will be thrown and the artifacts
|
212
|
+
that conflict will be reported.
|
213
|
+
|
214
|
+
As a few examples, in the simple graph: A splitting into B and C and joining in D:
|
215
|
+
```
|
216
|
+
A:
|
217
|
+
self.x = 5
|
218
|
+
self.y = 6
|
219
|
+
B:
|
220
|
+
self.b_var = 1
|
221
|
+
self.x = from_b
|
222
|
+
C:
|
223
|
+
self.x = from_c
|
224
|
+
|
225
|
+
D:
|
226
|
+
merge_artifacts(inputs)
|
227
|
+
```
|
228
|
+
In D, the following artifacts are set:
|
229
|
+
- `y` (value: 6), `b_var` (value: 1)
|
230
|
+
- if `from_b` and `from_c` are the same, `x` will be accessible and have value `from_b`
|
231
|
+
- if `from_b` and `from_c` are different, an error will be thrown. To prevent this error,
|
232
|
+
you need to manually set `self.x` in D to a merged value (for example the max) prior to
|
233
|
+
calling `merge_artifacts`.
|
234
|
+
|
235
|
+
Parameters
|
236
|
+
----------
|
237
|
+
inputs : Inputs
|
238
|
+
Incoming steps to the join point.
|
239
|
+
exclude : List[str], optional, default None
|
240
|
+
If specified, do not consider merging artifacts with a name in `exclude`.
|
241
|
+
Cannot specify if `include` is also specified.
|
242
|
+
include : List[str], optional, default None
|
243
|
+
If specified, only merge artifacts specified. Cannot specify if `exclude` is
|
244
|
+
also specified.
|
245
|
+
|
246
|
+
Raises
|
247
|
+
------
|
248
|
+
MetaflowException
|
249
|
+
This exception is thrown if this is not called in a join step.
|
250
|
+
UnhandledInMergeArtifactsException
|
251
|
+
This exception is thrown in case of unresolved conflicts.
|
252
|
+
MissingInMergeArtifactsException
|
253
|
+
This exception is thrown in case an artifact specified in `include` cannot
|
254
|
+
be found.
|
255
|
+
"""
|
256
|
+
...
|
257
|
+
def next(self, *dsts: typing.Callable[..., None], **kwargs):
|
258
|
+
"""
|
259
|
+
Indicates the next step to execute after this step has completed.
|
260
|
+
|
261
|
+
This statement should appear as the last statement of each step, except
|
262
|
+
the end step.
|
263
|
+
|
264
|
+
There are several valid formats to specify the next step:
|
265
|
+
|
266
|
+
- Straight-line connection: `self.next(self.next_step)` where `next_step` is a method in
|
267
|
+
the current class decorated with the `@step` decorator.
|
268
|
+
|
269
|
+
- Static fan-out connection: `self.next(self.step1, self.step2, ...)` where `stepX` are
|
270
|
+
methods in the current class decorated with the `@step` decorator.
|
271
|
+
|
272
|
+
- Foreach branch:
|
273
|
+
```
|
274
|
+
self.next(self.foreach_step, foreach='foreach_iterator')
|
275
|
+
```
|
276
|
+
In this situation, `foreach_step` is a method in the current class decorated with the
|
277
|
+
`@step` decorator and `foreach_iterator` is a variable name in the current class that
|
278
|
+
evaluates to an iterator. A task will be launched for each value in the iterator and
|
279
|
+
each task will execute the code specified by the step `foreach_step`.
|
280
|
+
|
281
|
+
Parameters
|
282
|
+
----------
|
283
|
+
dsts : Callable[..., None]
|
284
|
+
One or more methods annotated with `@step`.
|
285
|
+
|
286
|
+
Raises
|
287
|
+
------
|
288
|
+
InvalidNextException
|
289
|
+
Raised if the format of the arguments does not match one of the ones given above.
|
290
|
+
"""
|
291
|
+
...
|
292
|
+
def __str__(self):
|
293
|
+
...
|
294
|
+
def __getstate__(self):
|
295
|
+
...
|
296
|
+
...
|
297
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
2.11.4.1 2024-02-28T05:30:43.869462
|