ob-metaflow-stubs 6.0.3.117__py2.py3-none-any.whl → 6.0.3.119__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. metaflow-stubs/__init__.pyi +318 -2738
  2. metaflow-stubs/cards.pyi +19 -473
  3. metaflow-stubs/cli.pyi +17 -81
  4. metaflow-stubs/client/__init__.pyi +19 -1113
  5. metaflow-stubs/client/core.pyi +18 -158
  6. metaflow-stubs/client/filecache.pyi +8 -12
  7. metaflow-stubs/clone_util.pyi +6 -26
  8. metaflow-stubs/events.pyi +7 -6
  9. metaflow-stubs/exception.pyi +8 -6
  10. metaflow-stubs/flowspec.pyi +20 -104
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +16 -564
  13. metaflow-stubs/info_file.pyi +6 -5
  14. metaflow-stubs/metadata_provider/__init__.pyi +16 -0
  15. metaflow-stubs/metadata_provider/heartbeat.pyi +34 -0
  16. metaflow-stubs/{metadata → metadata_provider}/metadata.pyi +10 -22
  17. metaflow-stubs/metadata_provider/util.pyi +19 -0
  18. metaflow-stubs/metaflow_config.pyi +8 -13
  19. metaflow-stubs/metaflow_current.pyi +45 -44
  20. metaflow-stubs/mf_extensions/__init__.pyi +6 -0
  21. metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +6 -0
  22. metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +6 -0
  23. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +6 -0
  24. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +6 -0
  25. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +129 -0
  26. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +26 -0
  27. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +156 -0
  28. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +25 -0
  29. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +111 -0
  30. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +6 -0
  31. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +188 -0
  32. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +30 -0
  33. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +28 -0
  34. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +19 -0
  35. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +115 -0
  36. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +40 -0
  37. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +6 -0
  38. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +71 -0
  39. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +56 -0
  40. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +67 -0
  41. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +49 -0
  42. metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +6 -0
  43. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +6 -0
  44. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +130 -0
  45. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +42 -0
  46. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +6 -0
  47. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +17 -0
  48. metaflow-stubs/mflog/__init__.pyi +6 -0
  49. metaflow-stubs/mflog/mflog.pyi +52 -5
  50. metaflow-stubs/multicore_utils.pyi +6 -5
  51. metaflow-stubs/parameters.pyi +13 -23
  52. metaflow-stubs/plugins/__init__.pyi +52 -165
  53. metaflow-stubs/plugins/airflow/__init__.pyi +9 -5
  54. metaflow-stubs/plugins/airflow/airflow_utils.pyi +7 -6
  55. metaflow-stubs/plugins/airflow/exception.pyi +7 -11
  56. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +10 -97
  57. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +9 -30
  58. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +9 -40
  59. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +9 -40
  60. metaflow-stubs/plugins/argo/__init__.pyi +12 -5
  61. metaflow-stubs/plugins/argo/argo_client.pyi +8 -26
  62. metaflow-stubs/plugins/argo/argo_events.pyi +7 -11
  63. metaflow-stubs/plugins/argo/argo_workflows.pyi +17 -129
  64. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
  65. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +11 -403
  66. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +63 -448
  67. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +165 -0
  68. metaflow-stubs/plugins/aws/__init__.pyi +11 -5
  69. metaflow-stubs/plugins/aws/aws_client.pyi +6 -5
  70. metaflow-stubs/plugins/aws/aws_utils.pyi +6 -11
  71. metaflow-stubs/plugins/aws/batch/__init__.pyi +9 -5
  72. metaflow-stubs/plugins/aws/batch/batch.pyi +10 -55
  73. metaflow-stubs/plugins/aws/batch/batch_client.pyi +7 -11
  74. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +15 -140
  75. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +7 -5
  76. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +10 -21
  77. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +9 -5
  78. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +6 -5
  79. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +6 -5
  80. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +7 -5
  81. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +11 -65
  82. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +6 -5
  83. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +52 -292
  84. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +127 -0
  85. metaflow-stubs/plugins/azure/__init__.pyi +12 -7
  86. metaflow-stubs/plugins/azure/azure_credential.pyi +6 -5
  87. metaflow-stubs/plugins/azure/azure_exceptions.pyi +7 -11
  88. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +11 -24
  89. metaflow-stubs/plugins/azure/azure_utils.pyi +11 -29
  90. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +8 -23
  91. metaflow-stubs/plugins/azure/includefile_support.pyi +7 -17
  92. metaflow-stubs/plugins/cards/__init__.pyi +15 -5
  93. metaflow-stubs/plugins/cards/card_cli.pyi +22 -491
  94. metaflow-stubs/plugins/cards/card_client.pyi +14 -76
  95. metaflow-stubs/plugins/cards/card_creator.pyi +7 -10
  96. metaflow-stubs/plugins/cards/card_datastore.pyi +10 -18
  97. metaflow-stubs/plugins/cards/card_decorator.pyi +10 -126
  98. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +13 -81
  99. metaflow-stubs/plugins/cards/card_modules/basic.pyi +13 -96
  100. metaflow-stubs/plugins/cards/card_modules/card.pyi +6 -5
  101. metaflow-stubs/plugins/cards/card_modules/components.pyi +24 -107
  102. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +6 -5
  103. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +6 -12
  104. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +11 -88
  105. metaflow-stubs/plugins/cards/card_resolver.pyi +6 -49
  106. metaflow-stubs/plugins/cards/component_serializer.pyi +13 -63
  107. metaflow-stubs/plugins/cards/exception.pyi +7 -11
  108. metaflow-stubs/plugins/catch_decorator.pyi +10 -30
  109. metaflow-stubs/plugins/datatools/__init__.pyi +13 -392
  110. metaflow-stubs/plugins/datatools/local.pyi +7 -11
  111. metaflow-stubs/plugins/datatools/s3/__init__.pyi +19 -653
  112. metaflow-stubs/plugins/datatools/s3/s3.pyi +15 -263
  113. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +7 -10
  114. metaflow-stubs/plugins/datatools/s3/s3util.pyi +6 -11
  115. metaflow-stubs/plugins/debug_logger.pyi +7 -5
  116. metaflow-stubs/plugins/debug_monitor.pyi +7 -5
  117. metaflow-stubs/plugins/environment_decorator.pyi +7 -5
  118. metaflow-stubs/plugins/events_decorator.pyi +8 -14
  119. metaflow-stubs/plugins/frameworks/__init__.pyi +7 -5
  120. metaflow-stubs/plugins/frameworks/pytorch.pyi +8 -45
  121. metaflow-stubs/plugins/gcp/__init__.pyi +11 -7
  122. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +11 -24
  123. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +7 -11
  124. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +6 -5
  125. metaflow-stubs/plugins/gcp/gs_utils.pyi +8 -20
  126. metaflow-stubs/plugins/gcp/includefile_support.pyi +7 -17
  127. metaflow-stubs/plugins/kubernetes/__init__.pyi +12 -5
  128. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +6 -10
  129. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +10 -38
  130. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +16 -155
  131. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +7 -11
  132. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +19 -142
  133. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +7 -11
  134. metaflow-stubs/plugins/logs_cli.pyi +10 -9
  135. metaflow-stubs/plugins/package_cli.pyi +7 -5
  136. metaflow-stubs/plugins/parallel_decorator.pyi +11 -59
  137. metaflow-stubs/plugins/perimeters.pyi +6 -11
  138. metaflow-stubs/plugins/project_decorator.pyi +8 -14
  139. metaflow-stubs/plugins/pypi/__init__.pyi +12 -11
  140. metaflow-stubs/plugins/pypi/conda_decorator.pyi +8 -27
  141. metaflow-stubs/plugins/pypi/conda_environment.pyi +14 -20
  142. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +7 -5
  143. metaflow-stubs/plugins/pypi/pypi_environment.pyi +7 -39
  144. metaflow-stubs/plugins/pypi/utils.pyi +7 -11
  145. metaflow-stubs/plugins/resources_decorator.pyi +7 -5
  146. metaflow-stubs/plugins/retry_decorator.pyi +7 -11
  147. metaflow-stubs/plugins/secrets/__init__.pyi +9 -5
  148. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +8 -13
  149. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +7 -11
  150. metaflow-stubs/plugins/storage_executor.pyi +6 -11
  151. metaflow-stubs/plugins/tag_cli.pyi +14 -396
  152. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +9 -34
  153. metaflow-stubs/plugins/timeout_decorator.pyi +8 -12
  154. metaflow-stubs/procpoll.pyi +7 -5
  155. metaflow-stubs/profilers/__init__.pyi +7 -11
  156. metaflow-stubs/pylint_wrapper.pyi +7 -11
  157. metaflow-stubs/runner/__init__.pyi +13 -5
  158. metaflow-stubs/runner/deployer.pyi +99 -223
  159. metaflow-stubs/runner/deployer_impl.pyi +87 -0
  160. metaflow-stubs/runner/metaflow_runner.pyi +24 -508
  161. metaflow-stubs/runner/nbdeploy.pyi +16 -60
  162. metaflow-stubs/runner/nbrun.pyi +11 -148
  163. metaflow-stubs/runner/subprocess_manager.pyi +9 -10
  164. metaflow-stubs/runner/utils.pyi +44 -9
  165. metaflow-stubs/system/__init__.pyi +9 -107
  166. metaflow-stubs/system/system_logger.pyi +7 -16
  167. metaflow-stubs/system/system_monitor.pyi +6 -16
  168. metaflow-stubs/tagging_util.pyi +6 -10
  169. metaflow-stubs/tuple_util.pyi +6 -5
  170. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/METADATA +1 -1
  171. ob_metaflow_stubs-6.0.3.119.dist-info/RECORD +174 -0
  172. metaflow-stubs/metadata/util.pyi +0 -18
  173. ob_metaflow_stubs-6.0.3.117.dist-info/RECORD +0 -140
  174. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/WHEEL +0 -0
  175. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/top_level.txt +0 -0
@@ -1,481 +1,96 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.415899 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.2+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-21T22:12:20.853528 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
- import metaflow.graph
12
- import metaflow.runner.deployer
12
+ import metaflow.plugins.argo.argo_workflows_deployer_objects
13
+ import metaflow.runner.deployer_impl
14
+ import typing
13
15
 
14
- def get_metadata() -> str:
15
- """
16
- Returns the current Metadata provider.
17
-
18
- If this is not set explicitly using `metadata`, the default value is
19
- determined through the Metaflow configuration. You can use this call to
20
- check that your configuration is set up properly.
21
-
22
- If multiple configuration profiles are present, this call returns the one
23
- selected through the `METAFLOW_PROFILE` environment variable.
24
-
25
- Returns
26
- -------
27
- str
28
- Information about the Metadata provider currently selected. This information typically
29
- returns provider specific information (like URL for remote providers or local paths for
30
- local providers).
31
- """
32
- ...
33
-
34
- class MetaflowException(Exception, metaclass=type):
35
- def __init__(self, msg = "", lineno = None):
36
- ...
37
- def __str__(self):
38
- ...
39
- ...
40
-
41
- class ArgoClient(object, metaclass=type):
42
- def __init__(self, namespace = None):
43
- ...
44
- def get_workflow(self, name):
45
- ...
46
- def get_workflow_template(self, name):
47
- ...
48
- def get_workflow_templates(self):
49
- ...
50
- def register_workflow_template(self, name, workflow_template):
51
- ...
52
- def delete_cronworkflow(self, name):
53
- """
54
- Issues an API call for deleting a cronworkflow
55
-
56
- Returns either the successful API response, or None in case the resource was not found.
57
- """
58
- ...
59
- def delete_workflow_template(self, name):
60
- """
61
- Issues an API call for deleting a cronworkflow
62
-
63
- Returns either the successful API response, or None in case the resource was not found.
64
- """
65
- ...
66
- def terminate_workflow(self, name):
67
- ...
68
- def suspend_workflow(self, name):
69
- ...
70
- def unsuspend_workflow(self, name):
71
- ...
72
- def trigger_workflow_template(self, name, parameters = {}):
73
- ...
74
- def schedule_workflow_template(self, name, schedule = None, timezone = None):
75
- ...
76
- def register_sensor(self, name, sensor = None):
77
- ...
78
- def delete_sensor(self, name):
79
- """
80
- Issues an API call for deleting a sensor
81
-
82
- Returns either the successful API response, or None in case the resource was not found.
83
- """
84
- ...
85
- ...
86
-
87
- KUBERNETES_NAMESPACE: str
88
-
89
- class ArgoWorkflows(object, metaclass=type):
90
- 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):
91
- ...
92
- def __str__(self):
93
- ...
94
- def deploy(self):
95
- ...
96
- @staticmethod
97
- def list_templates(flow_name, all = False):
98
- ...
99
- @staticmethod
100
- def delete(name):
101
- ...
102
- @classmethod
103
- def terminate(cls, flow_name, name):
104
- ...
105
- @staticmethod
106
- def get_workflow_status(flow_name, name):
107
- ...
108
- @staticmethod
109
- def suspend(name):
110
- ...
111
- @staticmethod
112
- def unsuspend(name):
113
- ...
114
- @classmethod
115
- def trigger(cls, name, parameters = None):
116
- ...
117
- def schedule(self):
118
- ...
119
- def trigger_explanation(self):
120
- ...
121
- @classmethod
122
- def get_existing_deployment(cls, name):
123
- ...
124
- @classmethod
125
- def get_execution(cls, name):
126
- ...
127
- def list_to_prose(self, items, singular):
128
- ...
129
- ...
16
+ from ...runner.deployer_impl import DeployerImpl as DeployerImpl
130
17
 
131
- class Deployer(object, metaclass=type):
132
- """
133
- Use the `Deployer` class to configure and access one of the production
134
- orchestrators supported by Metaflow.
135
-
136
- Parameters
137
- ----------
138
- flow_file : str
139
- Path to the flow file to deploy.
140
- show_output : bool, default True
141
- Show the 'stdout' and 'stderr' to the console by default.
142
- profile : Optional[str], default None
143
- Metaflow profile to use for the deployment. If not specified, the default
144
- profile is used.
145
- env : Optional[Dict[str, str]], default None
146
- Additional environment variables to set for the deployment.
147
- cwd : Optional[str], default None
148
- The directory to run the subprocess in; if not specified, the current
149
- directory is used.
150
- file_read_timeout : int, default 3600
151
- The timeout until which we try to read the deployer attribute file.
152
- **kwargs : Any
153
- Additional arguments that you would pass to `python myflow.py` before
154
- the deployment command.
155
- """
156
- def __init__(self, flow_file: str, show_output: bool = True, profile: typing.Optional[str] = None, env: typing.Optional[typing.Dict] = None, cwd: typing.Optional[str] = None, file_read_timeout: int = 3600, **kwargs):
157
- ...
158
- def _Deployer__make_function(self, deployer_class):
159
- """
160
- Create a function for the given deployer class.
161
-
162
- Parameters
163
- ----------
164
- deployer_class : Type[DeployerImpl]
165
- Deployer implementation class.
166
-
167
- Returns
168
- -------
169
- Callable
170
- Function that initializes and returns an instance of the deployer class.
171
- """
172
- ...
173
- ...
18
+ TYPE_CHECKING: bool
174
19
 
175
- class DeployerImpl(object, metaclass=type):
20
+ class ArgoWorkflowsDeployer(metaflow.runner.deployer_impl.DeployerImpl, metaclass=type):
176
21
  """
177
- Base class for deployer implementations. Each implementation should define a TYPE
178
- class variable that matches the name of the CLI group.
22
+ Deployer implementation for Argo Workflows.
179
23
 
180
24
  Parameters
181
25
  ----------
182
- flow_file : str
183
- Path to the flow file to deploy.
184
- show_output : bool, default True
185
- Show the 'stdout' and 'stderr' to the console by default.
186
- profile : Optional[str], default None
187
- Metaflow profile to use for the deployment. If not specified, the default
188
- profile is used.
189
- env : Optional[Dict], default None
190
- Additional environment variables to set for the deployment.
191
- cwd : Optional[str], default None
192
- The directory to run the subprocess in; if not specified, the current
193
- directory is used.
194
- file_read_timeout : int, default 3600
195
- The timeout until which we try to read the deployer attribute file.
196
- **kwargs : Any
197
- Additional arguments that you would pass to `python myflow.py` before
198
- 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.
199
28
  """
200
- def __init__(self, flow_file: str, show_output: bool = True, profile: typing.Optional[str] = None, env: typing.Optional[typing.Dict] = None, cwd: typing.Optional[str] = None, file_read_timeout: int = 3600, **kwargs):
201
- ...
202
- def __enter__(self) -> metaflow.runner.deployer.DeployerImpl:
203
- ...
204
- def create(self, **kwargs) -> metaflow.runner.deployer.DeployedFlow:
29
+ def __init__(self, deployer_kwargs: typing.Dict[str, str], **kwargs):
205
30
  """
206
- Create a deployed flow using the deployer implementation.
31
+ Initialize the ArgoWorkflowsDeployer.
207
32
 
208
33
  Parameters
209
34
  ----------
35
+ deployer_kwargs : Dict[str, str]
36
+ The deployer-specific keyword arguments.
210
37
  **kwargs : Any
211
- Additional arguments to pass to `create` corresponding to the
212
- command line arguments of `create`
213
-
214
- Returns
215
- -------
216
- DeployedFlow
217
- DeployedFlow object representing the deployed flow.
218
-
219
- Raises
220
- ------
221
- Exception
222
- If there is an error during deployment.
223
- """
224
- ...
225
- def __exit__(self, exc_type, exc_value, traceback):
226
- """
227
- Cleanup resources on exit.
228
- """
229
- ...
230
- def cleanup(self):
231
- """
232
- Cleanup resources.
38
+ Additional arguments to pass to the superclass constructor.
233
39
  """
234
40
  ...
235
- ...
236
-
237
- class DeployedFlow(object, metaclass=metaflow.runner.deployer.DeploymentMethodsMeta):
238
- """
239
- DeployedFlow class represents a flow that has been deployed.
240
-
241
- Parameters
242
- ----------
243
- deployer : DeployerImpl
244
- Instance of the deployer implementation.
245
- """
246
- def __init__(self, deployer: metaflow.runner.deployer.DeployerImpl):
41
+ @property
42
+ def deployer_kwargs(self) -> typing.Dict[str, typing.Any]:
247
43
  ...
248
44
  @staticmethod
249
- def from_deployment(identifier, metadata = None, impl = None):
250
- ...
251
- ...
252
-
253
- class TriggeredRun(object, metaclass=type):
254
- """
255
- TriggeredRun class represents a run that has been triggered on a production orchestrator.
256
-
257
- Only when the `start` task starts running, the `run` object corresponding to the run
258
- becomes available.
259
- """
260
- def __init__(self, deployer: metaflow.runner.deployer.DeployerImpl, content: str):
45
+ def deployed_flow_type() -> typing.Type["metaflow.plugins.argo.argo_workflows_deployer_objects.ArgoWorkflowsDeployedFlow"]:
261
46
  ...
262
- def wait_for_run(self, timeout = None):
47
+ def create(self, **kwargs) -> "metaflow.plugins.argo.argo_workflows_deployer_objects.ArgoWorkflowsDeployedFlow":
263
48
  """
264
- Wait for the `run` property to become available.
49
+ Create a new ArgoWorkflow deployment.
265
50
 
266
51
  Parameters
267
52
  ----------
268
- timeout : int, optional
269
- Maximum time to wait for the `run` to become available, in seconds. If None, wait indefinitely.
270
-
271
- Raises
272
- ------
273
- TimeoutError
274
- If the `run` is not available within the specified timeout.
275
- """
276
- ...
277
- @property
278
- def run(self):
279
- """
280
- Retrieve the `Run` object for the triggered run.
281
-
282
- Note that Metaflow `Run` becomes available only when the `start` task
283
- has started executing.
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.
284
89
 
285
90
  Returns
286
91
  -------
287
- Run, optional
288
- Metaflow Run object if the `start` step has started executing, otherwise None.
289
- """
290
- ...
291
- ...
292
-
293
- def get_lower_level_group(api, top_level_kwargs: typing.Dict, _type: typing.Optional[str], deployer_kwargs: typing.Dict):
294
- """
295
- Retrieve a lower-level group from the API based on the type and provided arguments.
296
-
297
- Parameters
298
- ----------
299
- api : MetaflowAPI
300
- Metaflow API instance.
301
- top_level_kwargs : Dict
302
- Top-level keyword arguments to pass to the API.
303
- _type : str
304
- Type of the deployer implementation to target.
305
- deployer_kwargs : Dict
306
- Keyword arguments specific to the deployer.
307
-
308
- Returns
309
- -------
310
- Any
311
- The lower-level group object retrieved from the API.
312
-
313
- Raises
314
- ------
315
- ValueError
316
- If the `_type` is None.
317
- """
318
- ...
319
-
320
- def handle_timeout(tfp_runner_attribute, command_obj: "CommandManager", file_read_timeout: int):
321
- """
322
- Handle the timeout for a running subprocess command that reads a file
323
- and raises an error with appropriate logs if a TimeoutError occurs.
324
-
325
- Parameters
326
- ----------
327
- tfp_runner_attribute : NamedTemporaryFile
328
- Temporary file that stores runner attribute data.
329
- command_obj : CommandManager
330
- Command manager object that encapsulates the running command details.
331
- file_read_timeout : int
332
- Timeout for reading the file.
333
-
334
- Returns
335
- -------
336
- str
337
- Content read from the temporary file.
338
-
339
- Raises
340
- ------
341
- RuntimeError
342
- If a TimeoutError occurs, it raises a RuntimeError with the command's
343
- stdout and stderr logs.
344
- """
345
- ...
346
-
347
- def generate_fake_flow_file_contents(flow_name: str, param_info: dict, project_name: typing.Optional[str] = None):
348
- ...
349
-
350
- def from_deployment(identifier: str, metadata: typing.Optional[str] = None):
351
- ...
352
-
353
- def suspend(instance: metaflow.runner.deployer.TriggeredRun, **kwargs):
354
- """
355
- Suspend the running workflow.
356
-
357
- Parameters
358
- ----------
359
- **kwargs : Any
360
- Additional arguments to pass to the suspend command.
361
-
362
- Returns
363
- -------
364
- bool
365
- True if the command was successful, False otherwise.
366
- """
367
- ...
368
-
369
- def unsuspend(instance: metaflow.runner.deployer.TriggeredRun, **kwargs):
370
- """
371
- Unsuspend the suspended workflow.
372
-
373
- Parameters
374
- ----------
375
- **kwargs : Any
376
- Additional arguments to pass to the unsuspend command.
377
-
378
- Returns
379
- -------
380
- bool
381
- True if the command was successful, False otherwise.
382
- """
383
- ...
384
-
385
- def terminate(instance: metaflow.runner.deployer.TriggeredRun, **kwargs):
386
- """
387
- Terminate the running workflow.
388
-
389
- Parameters
390
- ----------
391
- **kwargs : Any
392
- Additional arguments to pass to the terminate command.
393
-
394
- Returns
395
- -------
396
- bool
397
- True if the command was successful, False otherwise.
398
- """
399
- ...
400
-
401
- def status(instance: metaflow.runner.deployer.TriggeredRun):
402
- """
403
- Get the status of the triggered run.
404
-
405
- Returns
406
- -------
407
- str, optional
408
- The status of the workflow considering the run object, or None if the status could not be retrieved.
409
- """
410
- ...
411
-
412
- def production_token(instance: metaflow.runner.deployer.DeployedFlow):
413
- """
414
- Get the production token for the deployed flow.
415
-
416
- Returns
417
- -------
418
- str, optional
419
- The production token, None if it cannot be retrieved.
420
- """
421
- ...
422
-
423
- def delete(instance: metaflow.runner.deployer.DeployedFlow, **kwargs):
424
- """
425
- Delete the deployed flow.
426
-
427
- Parameters
428
- ----------
429
- **kwargs : Any
430
- Additional arguments to pass to the delete command.
431
-
432
- Returns
433
- -------
434
- bool
435
- True if the command was successful, False otherwise.
436
- """
437
- ...
438
-
439
- def trigger(instance: metaflow.runner.deployer.DeployedFlow, **kwargs):
440
- """
441
- Trigger a new run for the deployed flow.
442
-
443
- Parameters
444
- ----------
445
- **kwargs : Any
446
- Additional arguments to pass to the trigger command, `Parameters` in particular
447
-
448
- Returns
449
- -------
450
- ArgoWorkflowsTriggeredRun
451
- The triggered run instance.
452
-
453
- Raises
454
- ------
455
- Exception
456
- If there is an error during the trigger process.
457
- """
458
- ...
459
-
460
- class ArgoWorkflowsDeployer(metaflow.runner.deployer.DeployerImpl, metaclass=type):
461
- """
462
- Deployer implementation for Argo Workflows.
463
-
464
- Attributes
465
- ----------
466
- TYPE : ClassVar[Optional[str]]
467
- The type of the deployer, which is "argo-workflows".
468
- """
469
- def __init__(self, deployer_kwargs, **kwargs):
470
- """
471
- Initialize the ArgoWorkflowsDeployer.
472
-
473
- Parameters
474
- ----------
475
- deployer_kwargs : dict
476
- The deployer-specific keyword arguments.
477
- **kwargs : Any
478
- Additional arguments to pass to the superclass constructor.
92
+ ArgoWorkflowsDeployedFlow
93
+ The Flow deployed to Argo Workflows.
479
94
  """
480
95
  ...
481
96
  ...