metaflow-stubs 2.12.28__py2.py3-none-any.whl → 2.12.29__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 +297 -3001
- metaflow-stubs/cards.pyi +19 -473
- metaflow-stubs/cli.pyi +17 -81
- metaflow-stubs/client/__init__.pyi +19 -1113
- metaflow-stubs/client/core.pyi +18 -158
- metaflow-stubs/client/filecache.pyi +8 -12
- metaflow-stubs/clone_util.pyi +6 -26
- metaflow-stubs/events.pyi +6 -5
- metaflow-stubs/exception.pyi +8 -6
- metaflow-stubs/flowspec.pyi +22 -106
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +16 -564
- metaflow-stubs/info_file.pyi +6 -5
- metaflow-stubs/metadata_provider/__init__.pyi +16 -0
- metaflow-stubs/metadata_provider/heartbeat.pyi +34 -0
- metaflow-stubs/{metadata → metadata_provider}/metadata.pyi +10 -22
- metaflow-stubs/metadata_provider/util.pyi +19 -0
- metaflow-stubs/metaflow_config.pyi +8 -11
- metaflow-stubs/metaflow_current.pyi +10 -9
- metaflow-stubs/mflog/__init__.pyi +6 -0
- metaflow-stubs/mflog/mflog.pyi +52 -5
- metaflow-stubs/multicore_utils.pyi +6 -5
- metaflow-stubs/parameters.pyi +13 -23
- metaflow-stubs/plugins/__init__.pyi +51 -163
- metaflow-stubs/plugins/airflow/__init__.pyi +12 -5
- metaflow-stubs/plugins/airflow/airflow.pyi +19 -130
- metaflow-stubs/plugins/airflow/airflow_cli.pyi +17 -136
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +7 -26
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +7 -6
- metaflow-stubs/plugins/airflow/exception.pyi +7 -11
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +10 -97
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +9 -30
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +9 -40
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +9 -40
- metaflow-stubs/plugins/argo/__init__.pyi +12 -5
- metaflow-stubs/plugins/argo/argo_client.pyi +8 -26
- metaflow-stubs/plugins/argo/argo_events.pyi +7 -11
- metaflow-stubs/plugins/argo/argo_workflows.pyi +16 -120
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +12 -404
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +65 -322
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +165 -0
- metaflow-stubs/plugins/aws/__init__.pyi +11 -5
- metaflow-stubs/plugins/aws/aws_client.pyi +6 -5
- metaflow-stubs/plugins/aws/aws_utils.pyi +6 -11
- metaflow-stubs/plugins/aws/batch/__init__.pyi +10 -5
- metaflow-stubs/plugins/aws/batch/batch.pyi +10 -55
- metaflow-stubs/plugins/aws/batch/batch_cli.pyi +10 -31
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +7 -11
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +15 -140
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +7 -5
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +10 -21
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +15 -5
- metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/production_token.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +7 -5
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +11 -65
- metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +19 -175
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +8 -37
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +53 -290
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +127 -0
- metaflow-stubs/plugins/azure/__init__.pyi +12 -7
- metaflow-stubs/plugins/azure/azure_credential.pyi +6 -5
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +7 -11
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +11 -24
- metaflow-stubs/plugins/azure/azure_utils.pyi +11 -29
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +8 -23
- metaflow-stubs/plugins/azure/includefile_support.pyi +7 -17
- metaflow-stubs/plugins/cards/__init__.pyi +15 -5
- metaflow-stubs/plugins/cards/card_cli.pyi +22 -491
- metaflow-stubs/plugins/cards/card_client.pyi +13 -75
- metaflow-stubs/plugins/cards/card_creator.pyi +7 -10
- metaflow-stubs/plugins/cards/card_datastore.pyi +10 -18
- metaflow-stubs/plugins/cards/card_decorator.pyi +10 -126
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +14 -81
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +14 -97
- metaflow-stubs/plugins/cards/card_modules/card.pyi +6 -5
- metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +12 -73
- metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +6 -61
- metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +6 -5
- metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +8 -45
- metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +7 -6
- metaflow-stubs/plugins/cards/card_modules/components.pyi +25 -108
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +6 -5
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +6 -12
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +11 -88
- metaflow-stubs/plugins/cards/card_resolver.pyi +6 -49
- metaflow-stubs/plugins/cards/component_serializer.pyi +13 -63
- metaflow-stubs/plugins/cards/exception.pyi +7 -11
- metaflow-stubs/plugins/catch_decorator.pyi +10 -30
- metaflow-stubs/plugins/datatools/__init__.pyi +13 -392
- metaflow-stubs/plugins/datatools/local.pyi +7 -11
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +19 -653
- metaflow-stubs/plugins/datatools/s3/s3.pyi +16 -264
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +7 -10
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +6 -11
- metaflow-stubs/plugins/debug_logger.pyi +7 -5
- metaflow-stubs/plugins/debug_monitor.pyi +7 -5
- metaflow-stubs/plugins/environment_decorator.pyi +7 -5
- metaflow-stubs/plugins/events_decorator.pyi +8 -14
- metaflow-stubs/plugins/frameworks/__init__.pyi +7 -5
- metaflow-stubs/plugins/frameworks/pytorch.pyi +8 -45
- metaflow-stubs/plugins/gcp/__init__.pyi +11 -7
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +11 -24
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +7 -11
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +6 -5
- metaflow-stubs/plugins/gcp/gs_utils.pyi +8 -20
- metaflow-stubs/plugins/gcp/includefile_support.pyi +7 -17
- metaflow-stubs/plugins/kubernetes/__init__.pyi +13 -5
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +6 -10
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +9 -29
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +16 -155
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +9 -72
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +19 -142
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +8 -41
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +7 -11
- metaflow-stubs/plugins/logs_cli.pyi +11 -10
- metaflow-stubs/plugins/package_cli.pyi +7 -5
- metaflow-stubs/plugins/parallel_decorator.pyi +11 -59
- metaflow-stubs/plugins/project_decorator.pyi +8 -14
- metaflow-stubs/plugins/pypi/__init__.pyi +12 -11
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +8 -27
- metaflow-stubs/plugins/pypi/conda_environment.pyi +14 -20
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +7 -5
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +7 -39
- metaflow-stubs/plugins/pypi/utils.pyi +7 -11
- metaflow-stubs/plugins/resources_decorator.pyi +7 -5
- metaflow-stubs/plugins/retry_decorator.pyi +7 -11
- metaflow-stubs/plugins/secrets/__init__.pyi +9 -5
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +9 -14
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +7 -11
- metaflow-stubs/plugins/storage_executor.pyi +6 -11
- metaflow-stubs/plugins/tag_cli.pyi +14 -396
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +9 -34
- metaflow-stubs/plugins/timeout_decorator.pyi +8 -12
- metaflow-stubs/procpoll.pyi +7 -5
- metaflow-stubs/pylint_wrapper.pyi +7 -11
- metaflow-stubs/runner/__init__.pyi +13 -5
- metaflow-stubs/runner/deployer.pyi +102 -210
- metaflow-stubs/runner/deployer_impl.pyi +87 -0
- metaflow-stubs/runner/metaflow_runner.pyi +24 -508
- metaflow-stubs/runner/nbdeploy.pyi +16 -60
- metaflow-stubs/runner/nbrun.pyi +11 -148
- metaflow-stubs/runner/subprocess_manager.pyi +9 -10
- metaflow-stubs/runner/utils.pyi +44 -9
- metaflow-stubs/system/__init__.pyi +9 -87
- metaflow-stubs/system/system_logger.pyi +7 -6
- metaflow-stubs/system/system_monitor.pyi +6 -5
- metaflow-stubs/tagging_util.pyi +6 -10
- metaflow-stubs/tuple_util.pyi +6 -5
- metaflow-stubs/version.pyi +6 -5
- {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.29.dist-info}/METADATA +2 -2
- metaflow_stubs-2.12.29.dist-info/RECORD +158 -0
- metaflow-stubs/metadata/util.pyi +0 -18
- metaflow_stubs-2.12.28.dist-info/RECORD +0 -152
- {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.29.dist-info}/WHEEL +0 -0
- {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.29.dist-info}/top_level.txt +0 -0
@@ -1,353 +1,96 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.604878 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
|
+
import metaflow
|
10
11
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.runner.
|
12
|
-
import metaflow.
|
12
|
+
import metaflow.runner.deployer_impl
|
13
|
+
import metaflow.plugins.argo.argo_workflows_deployer_objects
|
14
|
+
import typing
|
13
15
|
|
14
|
-
|
15
|
-
def __init__(self, name, graph: metaflow.graph.FlowGraph, flow, code_package_sha, code_package_url, production_token, metadata, flow_datastore, environment, event_logger, monitor, tags = None, namespace = None, username = None, max_workers = None, workflow_timeout = None, workflow_priority = None, auto_emit_argo_events = False, notify_on_error = False, notify_on_success = False, notify_slack_webhook_url = None, notify_pager_duty_integration_key = None, enable_heartbeat_daemon = True, enable_error_msg_capture = False):
|
16
|
-
...
|
17
|
-
def __str__(self):
|
18
|
-
...
|
19
|
-
def deploy(self):
|
20
|
-
...
|
21
|
-
@staticmethod
|
22
|
-
def list_templates(flow_name, all = False):
|
23
|
-
...
|
24
|
-
@staticmethod
|
25
|
-
def delete(name):
|
26
|
-
...
|
27
|
-
@classmethod
|
28
|
-
def terminate(cls, flow_name, name):
|
29
|
-
...
|
30
|
-
@staticmethod
|
31
|
-
def get_workflow_status(flow_name, name):
|
32
|
-
...
|
33
|
-
@staticmethod
|
34
|
-
def suspend(name):
|
35
|
-
...
|
36
|
-
@staticmethod
|
37
|
-
def unsuspend(name):
|
38
|
-
...
|
39
|
-
@classmethod
|
40
|
-
def trigger(cls, name, parameters = None):
|
41
|
-
...
|
42
|
-
def schedule(self):
|
43
|
-
...
|
44
|
-
def trigger_explanation(self):
|
45
|
-
...
|
46
|
-
@classmethod
|
47
|
-
def get_existing_deployment(cls, name):
|
48
|
-
...
|
49
|
-
@classmethod
|
50
|
-
def get_execution(cls, name):
|
51
|
-
...
|
52
|
-
def list_to_prose(self, items, singular):
|
53
|
-
...
|
54
|
-
...
|
16
|
+
from ...runner.deployer_impl import DeployerImpl as DeployerImpl
|
55
17
|
|
56
|
-
|
18
|
+
TYPE_CHECKING: bool
|
19
|
+
|
20
|
+
class ArgoWorkflowsDeployer(metaflow.runner.deployer_impl.DeployerImpl, metaclass=type):
|
57
21
|
"""
|
58
|
-
|
59
|
-
class variable that matches the name of the CLI group.
|
22
|
+
Deployer implementation for Argo Workflows.
|
60
23
|
|
61
24
|
Parameters
|
62
25
|
----------
|
63
|
-
|
64
|
-
|
65
|
-
show_output : bool, default True
|
66
|
-
Show the 'stdout' and 'stderr' to the console by default.
|
67
|
-
profile : Optional[str], default None
|
68
|
-
Metaflow profile to use for the deployment. If not specified, the default
|
69
|
-
profile is used.
|
70
|
-
env : Optional[Dict], default None
|
71
|
-
Additional environment variables to set for the deployment.
|
72
|
-
cwd : Optional[str], default None
|
73
|
-
The directory to run the subprocess in; if not specified, the current
|
74
|
-
directory is used.
|
75
|
-
file_read_timeout : int, default 3600
|
76
|
-
The timeout until which we try to read the deployer attribute file.
|
77
|
-
**kwargs : Any
|
78
|
-
Additional arguments that you would pass to `python myflow.py` before
|
79
|
-
the deployment command.
|
26
|
+
name : str, optional, default None
|
27
|
+
Argo workflow name. The flow name is used instead if this option is not specified.
|
80
28
|
"""
|
81
|
-
def __init__(self,
|
82
|
-
...
|
83
|
-
def __enter__(self) -> metaflow.runner.deployer.DeployerImpl:
|
84
|
-
...
|
85
|
-
def create(self, **kwargs) -> metaflow.runner.deployer.DeployedFlow:
|
29
|
+
def __init__(self, deployer_kwargs: typing.Dict[str, str], **kwargs):
|
86
30
|
"""
|
87
|
-
|
31
|
+
Initialize the ArgoWorkflowsDeployer.
|
88
32
|
|
89
33
|
Parameters
|
90
34
|
----------
|
35
|
+
deployer_kwargs : Dict[str, str]
|
36
|
+
The deployer-specific keyword arguments.
|
91
37
|
**kwargs : Any
|
92
|
-
Additional arguments to pass to
|
93
|
-
command line arguments of `create`
|
94
|
-
|
95
|
-
Returns
|
96
|
-
-------
|
97
|
-
DeployedFlow
|
98
|
-
DeployedFlow object representing the deployed flow.
|
99
|
-
|
100
|
-
Raises
|
101
|
-
------
|
102
|
-
Exception
|
103
|
-
If there is an error during deployment.
|
104
|
-
"""
|
105
|
-
...
|
106
|
-
def __exit__(self, exc_type, exc_value, traceback):
|
107
|
-
"""
|
108
|
-
Cleanup resources on exit.
|
109
|
-
"""
|
110
|
-
...
|
111
|
-
def cleanup(self):
|
112
|
-
"""
|
113
|
-
Cleanup resources.
|
38
|
+
Additional arguments to pass to the superclass constructor.
|
114
39
|
"""
|
115
40
|
...
|
116
|
-
|
117
|
-
|
118
|
-
class DeployedFlow(object, metaclass=type):
|
119
|
-
"""
|
120
|
-
DeployedFlow class represents a flow that has been deployed.
|
121
|
-
|
122
|
-
Parameters
|
123
|
-
----------
|
124
|
-
deployer : DeployerImpl
|
125
|
-
Instance of the deployer implementation.
|
126
|
-
"""
|
127
|
-
def __init__(self, deployer: metaflow.runner.deployer.DeployerImpl):
|
41
|
+
@property
|
42
|
+
def deployer_kwargs(self) -> typing.Dict[str, typing.Any]:
|
128
43
|
...
|
129
|
-
|
130
|
-
|
131
|
-
class TriggeredRun(object, metaclass=type):
|
132
|
-
"""
|
133
|
-
TriggeredRun class represents a run that has been triggered on a production orchestrator.
|
134
|
-
|
135
|
-
Only when the `start` task starts running, the `run` object corresponding to the run
|
136
|
-
becomes available.
|
137
|
-
"""
|
138
|
-
def __init__(self, deployer: metaflow.runner.deployer.DeployerImpl, content: str):
|
44
|
+
@staticmethod
|
45
|
+
def deployed_flow_type() -> typing.Type["metaflow.plugins.argo.argo_workflows_deployer_objects.ArgoWorkflowsDeployedFlow"]:
|
139
46
|
...
|
140
|
-
def
|
47
|
+
def create(self, **kwargs) -> "metaflow.plugins.argo.argo_workflows_deployer_objects.ArgoWorkflowsDeployedFlow":
|
141
48
|
"""
|
142
|
-
|
49
|
+
Create a new ArgoWorkflow deployment.
|
143
50
|
|
144
51
|
Parameters
|
145
52
|
----------
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
53
|
+
authorize : str, optional, default None
|
54
|
+
Authorize using this production token. Required when re-deploying an existing flow
|
55
|
+
for the first time. The token is cached in METAFLOW_HOME.
|
56
|
+
generate_new_token : bool, optional, default False
|
57
|
+
Generate a new production token for this flow. Moves the production flow to a new namespace.
|
58
|
+
given_token : str, optional, default None
|
59
|
+
Use the given production token for this flow. Moves the production flow to the given namespace.
|
60
|
+
tags : List[str], optional, default None
|
61
|
+
Annotate all objects produced by Argo Workflows runs with these tags.
|
62
|
+
user_namespace : str, optional, default None
|
63
|
+
Change the namespace from the default (production token) to the given tag.
|
64
|
+
only_json : bool, optional, default False
|
65
|
+
Only print out JSON sent to Argo Workflows without deploying anything.
|
66
|
+
max_workers : int, optional, default 100
|
67
|
+
Maximum number of parallel processes.
|
68
|
+
workflow_timeout : int, optional, default None
|
69
|
+
Workflow timeout in seconds.
|
70
|
+
workflow_priority : int, optional, default None
|
71
|
+
Workflow priority as an integer. Higher priority workflows are processed first
|
72
|
+
if Argo Workflows controller is configured to process limited parallel workflows.
|
73
|
+
auto_emit_argo_events : bool, optional, default True
|
74
|
+
Auto emits Argo Events when the run completes successfully.
|
75
|
+
notify_on_error : bool, optional, default False
|
76
|
+
Notify if the workflow fails.
|
77
|
+
notify_on_success : bool, optional, default False
|
78
|
+
Notify if the workflow succeeds.
|
79
|
+
notify_slack_webhook_url : str, optional, default ''
|
80
|
+
Slack incoming webhook url for workflow success/failure notifications.
|
81
|
+
notify_pager_duty_integration_key : str, optional, default ''
|
82
|
+
PagerDuty Events API V2 Integration key for workflow success/failure notifications.
|
83
|
+
enable_heartbeat_daemon : bool, optional, default False
|
84
|
+
Use a daemon container to broadcast heartbeats.
|
85
|
+
deployer_attribute_file : str, optional, default None
|
86
|
+
Write the workflow name to the specified file. Used internally for Metaflow's Deployer API.
|
87
|
+
enable_error_msg_capture : bool, optional, default True
|
88
|
+
Capture stack trace of first failed task in exit hook.
|
162
89
|
|
163
90
|
Returns
|
164
91
|
-------
|
165
|
-
|
166
|
-
|
167
|
-
"""
|
168
|
-
...
|
169
|
-
...
|
170
|
-
|
171
|
-
def get_lower_level_group(api, top_level_kwargs: typing.Dict, _type: typing.Optional[str], deployer_kwargs: typing.Dict):
|
172
|
-
"""
|
173
|
-
Retrieve a lower-level group from the API based on the type and provided arguments.
|
174
|
-
|
175
|
-
Parameters
|
176
|
-
----------
|
177
|
-
api : MetaflowAPI
|
178
|
-
Metaflow API instance.
|
179
|
-
top_level_kwargs : Dict
|
180
|
-
Top-level keyword arguments to pass to the API.
|
181
|
-
_type : str
|
182
|
-
Type of the deployer implementation to target.
|
183
|
-
deployer_kwargs : Dict
|
184
|
-
Keyword arguments specific to the deployer.
|
185
|
-
|
186
|
-
Returns
|
187
|
-
-------
|
188
|
-
Any
|
189
|
-
The lower-level group object retrieved from the API.
|
190
|
-
|
191
|
-
Raises
|
192
|
-
------
|
193
|
-
ValueError
|
194
|
-
If the `_type` is None.
|
195
|
-
"""
|
196
|
-
...
|
197
|
-
|
198
|
-
def handle_timeout(tfp_runner_attribute, command_obj: "CommandManager", file_read_timeout: int):
|
199
|
-
"""
|
200
|
-
Handle the timeout for a running subprocess command that reads a file
|
201
|
-
and raises an error with appropriate logs if a TimeoutError occurs.
|
202
|
-
|
203
|
-
Parameters
|
204
|
-
----------
|
205
|
-
tfp_runner_attribute : NamedTemporaryFile
|
206
|
-
Temporary file that stores runner attribute data.
|
207
|
-
command_obj : CommandManager
|
208
|
-
Command manager object that encapsulates the running command details.
|
209
|
-
file_read_timeout : int
|
210
|
-
Timeout for reading the file.
|
211
|
-
|
212
|
-
Returns
|
213
|
-
-------
|
214
|
-
str
|
215
|
-
Content read from the temporary file.
|
216
|
-
|
217
|
-
Raises
|
218
|
-
------
|
219
|
-
RuntimeError
|
220
|
-
If a TimeoutError occurs, it raises a RuntimeError with the command's
|
221
|
-
stdout and stderr logs.
|
222
|
-
"""
|
223
|
-
...
|
224
|
-
|
225
|
-
def suspend(instance: metaflow.runner.deployer.TriggeredRun, **kwargs):
|
226
|
-
"""
|
227
|
-
Suspend the running workflow.
|
228
|
-
|
229
|
-
Parameters
|
230
|
-
----------
|
231
|
-
**kwargs : Any
|
232
|
-
Additional arguments to pass to the suspend command.
|
233
|
-
|
234
|
-
Returns
|
235
|
-
-------
|
236
|
-
bool
|
237
|
-
True if the command was successful, False otherwise.
|
238
|
-
"""
|
239
|
-
...
|
240
|
-
|
241
|
-
def unsuspend(instance: metaflow.runner.deployer.TriggeredRun, **kwargs):
|
242
|
-
"""
|
243
|
-
Unsuspend the suspended workflow.
|
244
|
-
|
245
|
-
Parameters
|
246
|
-
----------
|
247
|
-
**kwargs : Any
|
248
|
-
Additional arguments to pass to the unsuspend command.
|
249
|
-
|
250
|
-
Returns
|
251
|
-
-------
|
252
|
-
bool
|
253
|
-
True if the command was successful, False otherwise.
|
254
|
-
"""
|
255
|
-
...
|
256
|
-
|
257
|
-
def terminate(instance: metaflow.runner.deployer.TriggeredRun, **kwargs):
|
258
|
-
"""
|
259
|
-
Terminate the running workflow.
|
260
|
-
|
261
|
-
Parameters
|
262
|
-
----------
|
263
|
-
**kwargs : Any
|
264
|
-
Additional arguments to pass to the terminate command.
|
265
|
-
|
266
|
-
Returns
|
267
|
-
-------
|
268
|
-
bool
|
269
|
-
True if the command was successful, False otherwise.
|
270
|
-
"""
|
271
|
-
...
|
272
|
-
|
273
|
-
def status(instance: metaflow.runner.deployer.TriggeredRun):
|
274
|
-
"""
|
275
|
-
Get the status of the triggered run.
|
276
|
-
|
277
|
-
Returns
|
278
|
-
-------
|
279
|
-
str, optional
|
280
|
-
The status of the workflow considering the run object, or None if the status could not be retrieved.
|
281
|
-
"""
|
282
|
-
...
|
283
|
-
|
284
|
-
def production_token(instance: metaflow.runner.deployer.DeployedFlow):
|
285
|
-
"""
|
286
|
-
Get the production token for the deployed flow.
|
287
|
-
|
288
|
-
Returns
|
289
|
-
-------
|
290
|
-
str, optional
|
291
|
-
The production token, None if it cannot be retrieved.
|
292
|
-
"""
|
293
|
-
...
|
294
|
-
|
295
|
-
def delete(instance: metaflow.runner.deployer.DeployedFlow, **kwargs):
|
296
|
-
"""
|
297
|
-
Delete the deployed flow.
|
298
|
-
|
299
|
-
Parameters
|
300
|
-
----------
|
301
|
-
**kwargs : Any
|
302
|
-
Additional arguments to pass to the delete command.
|
303
|
-
|
304
|
-
Returns
|
305
|
-
-------
|
306
|
-
bool
|
307
|
-
True if the command was successful, False otherwise.
|
308
|
-
"""
|
309
|
-
...
|
310
|
-
|
311
|
-
def trigger(instance: metaflow.runner.deployer.DeployedFlow, **kwargs):
|
312
|
-
"""
|
313
|
-
Trigger a new run for the deployed flow.
|
314
|
-
|
315
|
-
Parameters
|
316
|
-
----------
|
317
|
-
**kwargs : Any
|
318
|
-
Additional arguments to pass to the trigger command, `Parameters` in particular
|
319
|
-
|
320
|
-
Returns
|
321
|
-
-------
|
322
|
-
ArgoWorkflowsTriggeredRun
|
323
|
-
The triggered run instance.
|
324
|
-
|
325
|
-
Raises
|
326
|
-
------
|
327
|
-
Exception
|
328
|
-
If there is an error during the trigger process.
|
329
|
-
"""
|
330
|
-
...
|
331
|
-
|
332
|
-
class ArgoWorkflowsDeployer(metaflow.runner.deployer.DeployerImpl, metaclass=type):
|
333
|
-
"""
|
334
|
-
Deployer implementation for Argo Workflows.
|
335
|
-
|
336
|
-
Attributes
|
337
|
-
----------
|
338
|
-
TYPE : ClassVar[Optional[str]]
|
339
|
-
The type of the deployer, which is "argo-workflows".
|
340
|
-
"""
|
341
|
-
def __init__(self, deployer_kwargs, **kwargs):
|
342
|
-
"""
|
343
|
-
Initialize the ArgoWorkflowsDeployer.
|
344
|
-
|
345
|
-
Parameters
|
346
|
-
----------
|
347
|
-
deployer_kwargs : dict
|
348
|
-
The deployer-specific keyword arguments.
|
349
|
-
**kwargs : Any
|
350
|
-
Additional arguments to pass to the superclass constructor.
|
92
|
+
ArgoWorkflowsDeployedFlow
|
93
|
+
The Flow deployed to Argo Workflows.
|
351
94
|
"""
|
352
95
|
...
|
353
96
|
...
|
@@ -0,0 +1,165 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.634691 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import metaflow
|
10
|
+
import typing
|
11
|
+
if typing.TYPE_CHECKING:
|
12
|
+
import metaflow.runner.deployer
|
13
|
+
import metaflow.plugins.argo.argo_workflows_deployer_objects
|
14
|
+
|
15
|
+
from ...client.core import get_metadata as get_metadata
|
16
|
+
from ...exception import MetaflowException as MetaflowException
|
17
|
+
from .argo_client import ArgoClient as ArgoClient
|
18
|
+
from .argo_workflows import ArgoWorkflows as ArgoWorkflows
|
19
|
+
from ...runner.deployer import Deployer as Deployer
|
20
|
+
from ...runner.deployer import DeployedFlow as DeployedFlow
|
21
|
+
from ...runner.deployer import TriggeredRun as TriggeredRun
|
22
|
+
from ...runner.utils import get_lower_level_group as get_lower_level_group
|
23
|
+
from ...runner.utils import handle_timeout as handle_timeout
|
24
|
+
|
25
|
+
KUBERNETES_NAMESPACE: str
|
26
|
+
|
27
|
+
def generate_fake_flow_file_contents(flow_name: str, param_info: dict, project_name: typing.Optional[str] = None):
|
28
|
+
...
|
29
|
+
|
30
|
+
class ArgoWorkflowsTriggeredRun(metaflow.runner.deployer.TriggeredRun, metaclass=type):
|
31
|
+
"""
|
32
|
+
A class representing a triggered Argo Workflow execution.
|
33
|
+
"""
|
34
|
+
def suspend(self, **kwargs) -> bool:
|
35
|
+
"""
|
36
|
+
Suspend the running workflow.
|
37
|
+
|
38
|
+
Parameters
|
39
|
+
----------
|
40
|
+
authorize : str, optional, default None
|
41
|
+
Authorize the suspension with a production token.
|
42
|
+
|
43
|
+
Returns
|
44
|
+
-------
|
45
|
+
bool
|
46
|
+
True if the command was successful, False otherwise.
|
47
|
+
"""
|
48
|
+
...
|
49
|
+
def unsuspend(self, **kwargs) -> bool:
|
50
|
+
"""
|
51
|
+
Unsuspend the suspended workflow.
|
52
|
+
|
53
|
+
Parameters
|
54
|
+
----------
|
55
|
+
authorize : str, optional, default None
|
56
|
+
Authorize the unsuspend with a production token.
|
57
|
+
|
58
|
+
Returns
|
59
|
+
-------
|
60
|
+
bool
|
61
|
+
True if the command was successful, False otherwise.
|
62
|
+
"""
|
63
|
+
...
|
64
|
+
def terminate(self, **kwargs) -> bool:
|
65
|
+
"""
|
66
|
+
Terminate the running workflow.
|
67
|
+
|
68
|
+
Parameters
|
69
|
+
----------
|
70
|
+
authorize : str, optional, default None
|
71
|
+
Authorize the termination with a production token.
|
72
|
+
|
73
|
+
Returns
|
74
|
+
-------
|
75
|
+
bool
|
76
|
+
True if the command was successful, False otherwise.
|
77
|
+
"""
|
78
|
+
...
|
79
|
+
@property
|
80
|
+
def status(self) -> typing.Optional[str]:
|
81
|
+
"""
|
82
|
+
Get the status of the triggered run.
|
83
|
+
|
84
|
+
Returns
|
85
|
+
-------
|
86
|
+
str, optional
|
87
|
+
The status of the workflow considering the run object, or None if
|
88
|
+
the status could not be retrieved.
|
89
|
+
"""
|
90
|
+
...
|
91
|
+
...
|
92
|
+
|
93
|
+
class ArgoWorkflowsDeployedFlow(metaflow.runner.deployer.DeployedFlow, metaclass=metaflow.runner.deployer.DeployedFlowMeta):
|
94
|
+
"""
|
95
|
+
A class representing a deployed Argo Workflow template.
|
96
|
+
"""
|
97
|
+
@classmethod
|
98
|
+
def from_deployment(cls, identifier: str, metadata: typing.Optional[str] = None):
|
99
|
+
"""
|
100
|
+
Retrieves a `ArgoWorkflowsDeployedFlow` object from an identifier and optional
|
101
|
+
metadata.
|
102
|
+
|
103
|
+
Parameters
|
104
|
+
----------
|
105
|
+
identifier : str
|
106
|
+
Deployer specific identifier for the workflow to retrieve
|
107
|
+
metadata : str, optional, default None
|
108
|
+
Optional deployer specific metadata.
|
109
|
+
|
110
|
+
Returns
|
111
|
+
-------
|
112
|
+
ArgoWorkflowsDeployedFlow
|
113
|
+
A `ArgoWorkflowsDeployedFlow` object representing the
|
114
|
+
deployed flow on argo workflows.
|
115
|
+
"""
|
116
|
+
...
|
117
|
+
@property
|
118
|
+
def production_token(self) -> typing.Optional[str]:
|
119
|
+
"""
|
120
|
+
Get the production token for the deployed flow.
|
121
|
+
|
122
|
+
Returns
|
123
|
+
-------
|
124
|
+
str, optional
|
125
|
+
The production token, None if it cannot be retrieved.
|
126
|
+
"""
|
127
|
+
...
|
128
|
+
def delete(self, **kwargs) -> bool:
|
129
|
+
"""
|
130
|
+
Delete the deployed workflow template.
|
131
|
+
|
132
|
+
Parameters
|
133
|
+
----------
|
134
|
+
authorize : str, optional, default None
|
135
|
+
Authorize the deletion with a production token.
|
136
|
+
|
137
|
+
Returns
|
138
|
+
-------
|
139
|
+
bool
|
140
|
+
True if the command was successful, False otherwise.
|
141
|
+
"""
|
142
|
+
...
|
143
|
+
def trigger(self, **kwargs) -> ArgoWorkflowsTriggeredRun:
|
144
|
+
"""
|
145
|
+
Trigger a new run for the deployed flow.
|
146
|
+
|
147
|
+
Parameters
|
148
|
+
----------
|
149
|
+
**kwargs : Any
|
150
|
+
Additional arguments to pass to the trigger command,
|
151
|
+
`Parameters` in particular.
|
152
|
+
|
153
|
+
Returns
|
154
|
+
-------
|
155
|
+
ArgoWorkflowsTriggeredRun
|
156
|
+
The triggered run instance.
|
157
|
+
|
158
|
+
Raises
|
159
|
+
------
|
160
|
+
Exception
|
161
|
+
If there is an error during the trigger process.
|
162
|
+
"""
|
163
|
+
...
|
164
|
+
...
|
165
|
+
|
@@ -1,9 +1,15 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.585130 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
from . import step_functions as step_functions
|
11
|
+
from . import batch as batch
|
12
|
+
from . import aws_utils as aws_utils
|
13
|
+
from . import aws_client as aws_client
|
14
|
+
from . import secrets_manager as secrets_manager
|
15
|
+
|
@@ -1,12 +1,13 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.612718 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
|
10
11
|
cached_aws_sandbox_creds: None
|
11
12
|
|
12
13
|
cached_provider_class: None
|
@@ -1,18 +1,13 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.612430 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
-
|
11
|
-
def __init__(self, msg = "", lineno = None):
|
12
|
-
...
|
13
|
-
def __str__(self):
|
14
|
-
...
|
15
|
-
...
|
10
|
+
from ...exception import MetaflowException as MetaflowException
|
16
11
|
|
17
12
|
def parse_s3_full_path(s3_uri):
|
18
13
|
...
|
@@ -1,9 +1,14 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.612075 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
from . import batch_client as batch_client
|
11
|
+
from . import batch as batch
|
12
|
+
from . import batch_decorator as batch_decorator
|
13
|
+
from . import batch_cli as batch_cli
|
14
|
+
|