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,155 +1,34 @@
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.367380 #
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.900679 #
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.runner.subprocess_manager
12
+ import metaflow.plugins.argo.argo_workflows_deployer
13
+ import metaflow.plugins.argo.argo_workflows_deployer_objects
14
+ import metaflow
12
15
  import metaflow.runner.deployer
13
- import metaflow.exception
16
+ import metaflow.plugins.aws.step_functions.step_functions_deployer
17
+ import metaflow.plugins.aws.step_functions.step_functions_deployer_objects
14
18
 
15
- class MetaflowNotFound(metaflow.exception.MetaflowException, metaclass=type):
16
- ...
19
+ from ..exception import MetaflowNotFound as MetaflowNotFound
17
20
 
18
- class SubprocessManager(object, metaclass=type):
19
- """
20
- A manager for subprocesses. The subprocess manager manages one or more
21
- CommandManager objects, each of which manages an individual subprocess.
22
- """
23
- def __init__(self):
24
- ...
25
- def __aenter__(self) -> metaflow.runner.subprocess_manager.SubprocessManager:
26
- ...
27
- def __aexit__(self, exc_type, exc_value, traceback):
28
- ...
29
- def run_command(self, command: typing.List[str], env: typing.Optional[typing.Dict[str, str]] = None, cwd: typing.Optional[str] = None, show_output: bool = False) -> int:
30
- """
31
- Run a command synchronously and return its process ID.
32
-
33
- Parameters
34
- ----------
35
- command : List[str]
36
- The command to run in List form.
37
- env : Optional[Dict[str, str]], default None
38
- Environment variables to set for the subprocess; if not specified,
39
- the current enviornment variables are used.
40
- cwd : Optional[str], default None
41
- The directory to run the subprocess in; if not specified, the current
42
- directory is used.
43
- show_output : bool, default False
44
- Suppress the 'stdout' and 'stderr' to the console by default.
45
- They can be accessed later by reading the files present in the
46
- CommandManager object:
47
- - command_obj.log_files["stdout"]
48
- - command_obj.log_files["stderr"]
49
- Returns
50
- -------
51
- int
52
- The process ID of the subprocess.
53
- """
54
- ...
55
- def async_run_command(self, command: typing.List[str], env: typing.Optional[typing.Dict[str, str]] = None, cwd: typing.Optional[str] = None) -> int:
56
- """
57
- Run a command asynchronously and return its process ID.
58
-
59
- Parameters
60
- ----------
61
- command : List[str]
62
- The command to run in List form.
63
- env : Optional[Dict[str, str]], default None
64
- Environment variables to set for the subprocess; if not specified,
65
- the current enviornment variables are used.
66
- cwd : Optional[str], default None
67
- The directory to run the subprocess in; if not specified, the current
68
- directory is used.
69
-
70
- Returns
71
- -------
72
- int
73
- The process ID of the subprocess.
74
- """
75
- ...
76
- def get(self, pid: int) -> typing.Optional["CommandManager"]:
77
- """
78
- Get one of the CommandManager managed by this SubprocessManager.
79
-
80
- Parameters
81
- ----------
82
- pid : int
83
- The process ID of the subprocess (returned by run_command or async_run_command).
84
-
85
- Returns
86
- -------
87
- Optional[CommandManager]
88
- The CommandManager object for the given process ID, or None if not found.
89
- """
90
- ...
91
- def cleanup(self):
92
- """
93
- Clean up log files for all running subprocesses.
94
- """
95
- ...
96
- ...
21
+ TYPE_CHECKING: bool
97
22
 
98
- def handle_timeout(tfp_runner_attribute, command_obj: "CommandManager", file_read_timeout: int):
99
- """
100
- Handle the timeout for a running subprocess command that reads a file
101
- and raises an error with appropriate logs if a TimeoutError occurs.
102
-
103
- Parameters
104
- ----------
105
- tfp_runner_attribute : NamedTemporaryFile
106
- Temporary file that stores runner attribute data.
107
- command_obj : CommandManager
108
- Command manager object that encapsulates the running command details.
109
- file_read_timeout : int
110
- Timeout for reading the file.
111
-
112
- Returns
113
- -------
114
- str
115
- Content read from the temporary file.
116
-
117
- Raises
118
- ------
119
- RuntimeError
120
- If a TimeoutError occurs, it raises a RuntimeError with the command's
121
- stdout and stderr logs.
122
- """
123
- ...
23
+ DEFAULT_FROM_DEPLOYMENT_IMPL: str
124
24
 
125
- def get_lower_level_group(api, top_level_kwargs: typing.Dict, _type: typing.Optional[str], deployer_kwargs: typing.Dict):
126
- """
127
- Retrieve a lower-level group from the API based on the type and provided arguments.
128
-
129
- Parameters
130
- ----------
131
- api : MetaflowAPI
132
- Metaflow API instance.
133
- top_level_kwargs : Dict
134
- Top-level keyword arguments to pass to the API.
135
- _type : str
136
- Type of the deployer implementation to target.
137
- deployer_kwargs : Dict
138
- Keyword arguments specific to the deployer.
139
-
140
- Returns
141
- -------
142
- Any
143
- The lower-level group object retrieved from the API.
144
-
145
- Raises
146
- ------
147
- ValueError
148
- If the `_type` is None.
149
- """
25
+ class DeployerMeta(type, metaclass=type):
26
+ @staticmethod
27
+ def __new__(mcs, name, bases, dct):
28
+ ...
150
29
  ...
151
30
 
152
- class Deployer(object, metaclass=type):
31
+ class Deployer(object, metaclass=DeployerMeta):
153
32
  """
154
33
  Use the `Deployer` class to configure and access one of the production
155
34
  orchestrators supported by Metaflow.
@@ -176,40 +55,45 @@ class Deployer(object, metaclass=type):
176
55
  """
177
56
  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):
178
57
  ...
179
- def _Deployer__make_function(self, deployer_class):
58
+ def step_functions(self, *, name: typing.Optional[str] = None) -> "metaflow.plugins.aws.step_functions.step_functions_deployer.StepFunctionsDeployer":
180
59
  """
181
- Create a function for the given deployer class.
60
+ Deployer implementation for AWS Step Functions.
182
61
 
183
62
  Parameters
184
63
  ----------
185
- deployer_class : Type[DeployerImpl]
186
- Deployer implementation class.
64
+ name : str, optional, default None
65
+ State Machine name. The flow name is used instead if this option is not specified.
66
+ """
67
+ ...
68
+ def argo_workflows(self, *, name: typing.Optional[str] = None) -> "metaflow.plugins.argo.argo_workflows_deployer.ArgoWorkflowsDeployer":
69
+ """
70
+ Deployer implementation for Argo Workflows.
187
71
 
188
- Returns
189
- -------
190
- Callable
191
- Function that initializes and returns an instance of the deployer class.
72
+ Parameters
73
+ ----------
74
+ name : str, optional, default None
75
+ Argo workflow name. The flow name is used instead if this option is not specified.
192
76
  """
193
77
  ...
194
78
  ...
195
79
 
196
80
  class TriggeredRun(object, metaclass=type):
197
81
  """
198
- TriggeredRun class represents a run that has been triggered on a production orchestrator.
199
-
200
- Only when the `start` task starts running, the `run` object corresponding to the run
201
- becomes available.
82
+ TriggeredRun class represents a run that has been triggered on a
83
+ production orchestrator.
202
84
  """
203
- def __init__(self, deployer: DeployerImpl, content: str):
204
- ...
205
- def wait_for_run(self, timeout = None):
85
+ def wait_for_run(self, timeout: typing.Optional[int] = None):
206
86
  """
207
87
  Wait for the `run` property to become available.
208
88
 
89
+ The `run` property becomes available only after the `start` task of the triggered
90
+ flow starts running.
91
+
209
92
  Parameters
210
93
  ----------
211
- timeout : int, optional
212
- Maximum time to wait for the `run` to become available, in seconds. If None, wait indefinitely.
94
+ timeout : int, optional, default None
95
+ Maximum time to wait for the `run` to become available, in seconds. If
96
+ None, wait indefinitely.
213
97
 
214
98
  Raises
215
99
  ------
@@ -218,7 +102,7 @@ class TriggeredRun(object, metaclass=type):
218
102
  """
219
103
  ...
220
104
  @property
221
- def run(self):
105
+ def run(self) -> typing.Optional["metaflow.Run"]:
222
106
  """
223
107
  Retrieve the `Run` object for the triggered run.
224
108
 
@@ -233,93 +117,85 @@ class TriggeredRun(object, metaclass=type):
233
117
  ...
234
118
  ...
235
119
 
236
- class LazyDeploymentMethod(object, metaclass=type):
237
- def __init__(self, module_path, func_name):
238
- ...
239
- def __call__(self, *args, **kwargs):
240
- ...
241
- ...
242
-
243
- class DeploymentMethodsMeta(type, metaclass=type):
120
+ class DeployedFlowMeta(type, metaclass=type):
244
121
  @staticmethod
245
122
  def __new__(mcs, name, bases, dct):
246
123
  ...
247
124
  ...
248
125
 
249
- class DeployedFlow(object, metaclass=DeploymentMethodsMeta):
126
+ class DeployedFlow(object, metaclass=DeployedFlowMeta):
250
127
  """
251
128
  DeployedFlow class represents a flow that has been deployed.
252
129
 
253
- Parameters
254
- ----------
255
- deployer : DeployerImpl
256
- Instance of the deployer implementation.
257
- """
258
- def __init__(self, deployer: DeployerImpl):
259
- ...
260
- @staticmethod
261
- def from_deployment(identifier, metadata = None, impl = None):
262
- ...
263
- ...
264
-
265
- class DeployerImpl(object, metaclass=type):
130
+ This class is not meant to be instantiated directly. Instead, it is returned from
131
+ methods of `Deployer`.
266
132
  """
267
- Base class for deployer implementations. Each implementation should define a TYPE
268
- class variable that matches the name of the CLI group.
269
-
270
- Parameters
271
- ----------
272
- flow_file : str
273
- Path to the flow file to deploy.
274
- show_output : bool, default True
275
- Show the 'stdout' and 'stderr' to the console by default.
276
- profile : Optional[str], default None
277
- Metaflow profile to use for the deployment. If not specified, the default
278
- profile is used.
279
- env : Optional[Dict], default None
280
- Additional environment variables to set for the deployment.
281
- cwd : Optional[str], default None
282
- The directory to run the subprocess in; if not specified, the current
283
- directory is used.
284
- file_read_timeout : int, default 3600
285
- The timeout until which we try to read the deployer attribute file.
286
- **kwargs : Any
287
- Additional arguments that you would pass to `python myflow.py` before
288
- the deployment command.
289
- """
290
- 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):
291
- ...
292
- def __enter__(self) -> DeployerImpl:
293
- ...
294
- def create(self, **kwargs) -> DeployedFlow:
133
+ @classmethod
134
+ def from_deployment(cls, *, identifier: str, metadata: typing.Optional[str] = None, impl: typing.Optional[str] = 'given by METAFLOW_DEFAULT_FROM_DEPLOYMENT_IMPL') -> typing.Union["metaflow.plugins.argo.argo_workflows_deployer_objects.ArgoWorkflowsDeployedFlow", "metaflow.plugins.aws.step_functions.step_functions_deployer_objects.StepFunctionsDeployedFlow"]:
295
135
  """
296
- Create a deployed flow using the deployer implementation.
136
+ Retrieves a `DeployedFlow` object from an identifier and optional
137
+ metadata. The `impl` parameter specifies the deployer implementation
138
+ to use (like `argo-workflows`).
139
+
140
+
297
141
 
298
142
  Parameters
299
143
  ----------
300
- **kwargs : Any
301
- Additional arguments to pass to `create` corresponding to the
302
- command line arguments of `create`
144
+ identifier : str
145
+ Deployer specific identifier for the workflow to retrieve
146
+ metadata : str, optional, default None
147
+ Optional deployer specific metadata.
148
+ impl : str, optional, default given by METAFLOW_DEFAULT_FROM_DEPLOYMENT_IMPL
149
+ The default implementation to use if not specified
150
+
151
+
303
152
 
304
153
  Returns
305
154
  -------
306
- DeployedFlow
307
- DeployedFlow object representing the deployed flow.
308
-
309
- Raises
310
- ------
311
- Exception
312
- If there is an error during deployment.
155
+ typing.Union[ForwardRef('metaflow.plugins.argo.argo_workflows_deployer_objects.ArgoWorkflowsDeployedFlow'), ForwardRef('metaflow.plugins.aws.step_functions.step_functions_deployer_objects.StepFunctionsDeployedFlow')]
156
+ A `DeployedFlow` object
313
157
  """
314
158
  ...
315
- def __exit__(self, exc_type, exc_value, traceback):
159
+ @classmethod
160
+ def from_step_functions(cls) -> "metaflow.plugins.aws.step_functions.step_functions_deployer_objects.StepFunctionsDeployedFlow":
316
161
  """
317
- Cleanup resources on exit.
162
+ This method is not currently implemented for Step Functions.
163
+
164
+ Raises
165
+ ------
166
+ NotImplementedError
167
+ This method is not implemented for Step Functions.
168
+
169
+ Parameters
170
+ ----------
171
+
172
+
173
+ Returns
174
+ -------
318
175
  """
319
176
  ...
320
- def cleanup(self):
177
+ @classmethod
178
+ def from_argo_workflows(cls, *, identifier: str, metadata: typing.Optional[str] = None) -> "metaflow.plugins.argo.argo_workflows_deployer_objects.ArgoWorkflowsDeployedFlow":
321
179
  """
322
- Cleanup resources.
180
+ Retrieves a `ArgoWorkflowsDeployedFlow` object from an identifier and optional
181
+ metadata.
182
+
183
+
184
+
185
+ Parameters
186
+ ----------
187
+ identifier : str
188
+ Deployer specific identifier for the workflow to retrieve
189
+ metadata : str, optional, default None
190
+ Optional deployer specific metadata.
191
+
192
+
193
+
194
+ Returns
195
+ -------
196
+ ArgoWorkflowsDeployedFlow
197
+ A `ArgoWorkflowsDeployedFlow` object representing the
198
+ deployed flow on argo workflows.
323
199
  """
324
200
  ...
325
201
  ...
@@ -0,0 +1,87 @@
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.826173 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing
10
+ if typing.TYPE_CHECKING:
11
+ import typing
12
+ import metaflow.runner.deployer
13
+
14
+ from .subprocess_manager import SubprocessManager as SubprocessManager
15
+ from .utils import get_lower_level_group as get_lower_level_group
16
+ from .utils import handle_timeout as handle_timeout
17
+
18
+ TYPE_CHECKING: bool
19
+
20
+ class DeployerImpl(object, metaclass=type):
21
+ """
22
+ Base class for deployer implementations. Each implementation should define a TYPE
23
+ class variable that matches the name of the CLI group.
24
+
25
+ Parameters
26
+ ----------
27
+ flow_file : str
28
+ Path to the flow file to deploy.
29
+ show_output : bool, default True
30
+ Show the 'stdout' and 'stderr' to the console by default.
31
+ profile : Optional[str], default None
32
+ Metaflow profile to use for the deployment. If not specified, the default
33
+ profile is used.
34
+ env : Optional[Dict], default None
35
+ Additional environment variables to set for the deployment.
36
+ cwd : Optional[str], default None
37
+ The directory to run the subprocess in; if not specified, the current
38
+ directory is used.
39
+ file_read_timeout : int, default 3600
40
+ The timeout until which we try to read the deployer attribute file.
41
+ **kwargs : Any
42
+ Additional arguments that you would pass to `python myflow.py` before
43
+ the deployment command.
44
+ """
45
+ 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):
46
+ ...
47
+ @property
48
+ def deployer_kwargs(self) -> typing.Dict[str, typing.Any]:
49
+ ...
50
+ @staticmethod
51
+ def deployed_flow_type() -> typing.Type["metaflow.runner.deployer.DeployedFlow"]:
52
+ ...
53
+ def __enter__(self) -> "DeployerImpl":
54
+ ...
55
+ def create(self, **kwargs) -> "metaflow.runner.deployer.DeployedFlow":
56
+ """
57
+ Create a sub-class of a `DeployedFlow` depending on the deployer implementation.
58
+
59
+ Parameters
60
+ ----------
61
+ **kwargs : Any
62
+ Additional arguments to pass to `create` corresponding to the
63
+ command line arguments of `create`
64
+
65
+ Returns
66
+ -------
67
+ DeployedFlow
68
+ DeployedFlow object representing the deployed flow.
69
+
70
+ Raises
71
+ ------
72
+ Exception
73
+ If there is an error during deployment.
74
+ """
75
+ ...
76
+ def __exit__(self, exc_type, exc_value, traceback):
77
+ """
78
+ Cleanup resources on exit.
79
+ """
80
+ ...
81
+ def cleanup(self):
82
+ """
83
+ Cleanup resources.
84
+ """
85
+ ...
86
+ ...
87
+