metaflow-stubs 2.12.7__py2.py3-none-any.whl → 2.12.9__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 +446 -397
- metaflow-stubs/cards.pyi +5 -5
- metaflow-stubs/cli.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +3 -3
- metaflow-stubs/client/core.pyi +7 -7
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/clone_util.pyi +2 -2
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +6 -6
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +4 -4
- metaflow-stubs/metadata/metadata.pyi +2 -2
- metaflow-stubs/metadata/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -2
- metaflow-stubs/metaflow_current.pyi +44 -21
- metaflow-stubs/mflog/mflog.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +4 -4
- metaflow-stubs/plugins/__init__.pyi +6 -2
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow.pyi +5 -5
- metaflow-stubs/plugins/airflow/airflow_cli.pyi +3 -3
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
- metaflow-stubs/plugins/airflow/exception.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +3 -3
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +4 -4
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +4 -4
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +38 -5
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +270 -5
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +230 -5
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +292 -0
- metaflow-stubs/plugins/aws/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_cli.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +3 -3
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +4 -4
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +24 -4
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +260 -0
- metaflow-stubs/plugins/azure/__init__.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +4 -4
- metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
- metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/cards/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_cli.pyi +4 -4
- metaflow-stubs/plugins/cards/card_client.pyi +3 -3
- metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
- metaflow-stubs/plugins/cards/card_decorator.pyi +3 -3
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +4 -4
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +3 -3
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +4 -4
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +3 -3
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +3 -3
- metaflow-stubs/plugins/datatools/s3/s3.pyi +7 -7
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
- metaflow-stubs/plugins/debug_logger.pyi +2 -2
- metaflow-stubs/plugins/debug_monitor.pyi +2 -2
- metaflow-stubs/plugins/environment_decorator.pyi +2 -2
- metaflow-stubs/plugins/events_decorator.pyi +3 -3
- metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
- metaflow-stubs/plugins/frameworks/pytorch.pyi +5 -3
- metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +4 -4
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
- metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +18 -10
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +13 -13
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +26 -3
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +14 -31
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +26 -3
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +82 -28
- metaflow-stubs/plugins/logs_cli.pyi +3 -3
- metaflow-stubs/plugins/package_cli.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +47 -2
- metaflow-stubs/plugins/project_decorator.pyi +3 -3
- metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +3 -3
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/tag_cli.pyi +4 -4
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +26 -3
- metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
- metaflow-stubs/procpoll.pyi +2 -2
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/deployer.pyi +354 -0
- metaflow-stubs/runner/metaflow_runner.pyi +9 -9
- metaflow-stubs/runner/nbdeploy.pyi +54 -0
- metaflow-stubs/runner/nbrun.pyi +7 -7
- metaflow-stubs/runner/subprocess_manager.pyi +2 -2
- metaflow-stubs/runner/utils.pyi +25 -0
- metaflow-stubs/system/__init__.pyi +3 -3
- metaflow-stubs/system/system_logger.pyi +3 -3
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- metaflow-stubs/version.pyi +2 -2
- {metaflow_stubs-2.12.7.dist-info → metaflow_stubs-2.12.9.dist-info}/METADATA +2 -2
- metaflow_stubs-2.12.9.dist-info/RECORD +150 -0
- {metaflow_stubs-2.12.7.dist-info → metaflow_stubs-2.12.9.dist-info}/WHEEL +1 -1
- metaflow_stubs-2.12.7.dist-info/RECORD +0 -145
- {metaflow_stubs-2.12.7.dist-info → metaflow_stubs-2.12.9.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,354 @@
|
|
1
|
+
##################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.257396 #
|
5
|
+
##################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow.runner.subprocess_manager
|
12
|
+
import metaflow.exception
|
13
|
+
import metaflow.runner.deployer
|
14
|
+
|
15
|
+
class MetaflowNotFound(metaflow.exception.MetaflowException, metaclass=type):
|
16
|
+
...
|
17
|
+
|
18
|
+
class CommandManager(object, metaclass=type):
|
19
|
+
def __init__(self, command: typing.List[str], env: typing.Optional[typing.Dict[str, str]] = None, cwd: typing.Optional[str] = None):
|
20
|
+
"""
|
21
|
+
Create a new CommandManager object.
|
22
|
+
This does not run the process itself but sets it up.
|
23
|
+
|
24
|
+
Parameters
|
25
|
+
----------
|
26
|
+
command : List[str]
|
27
|
+
The command to run in List form.
|
28
|
+
env : Optional[Dict[str, str]], default None
|
29
|
+
Environment variables to set for the subprocess; if not specified,
|
30
|
+
the current enviornment variables are used.
|
31
|
+
cwd : Optional[str], default None
|
32
|
+
The directory to run the subprocess in; if not specified, the current
|
33
|
+
directory is used.
|
34
|
+
"""
|
35
|
+
...
|
36
|
+
def __aenter__(self) -> metaflow.runner.subprocess_manager.CommandManager:
|
37
|
+
...
|
38
|
+
def __aexit__(self, exc_type, exc_value, traceback):
|
39
|
+
...
|
40
|
+
def wait(self, timeout: typing.Optional[float] = None, stream: typing.Optional[str] = None):
|
41
|
+
"""
|
42
|
+
Wait for the subprocess to finish, optionally with a timeout
|
43
|
+
and optionally streaming its output.
|
44
|
+
|
45
|
+
You can only call `wait` if `async_run` has already been called.
|
46
|
+
|
47
|
+
Parameters
|
48
|
+
----------
|
49
|
+
timeout : Optional[float], default None
|
50
|
+
The maximum time to wait for the subprocess to finish.
|
51
|
+
If the timeout is reached, the subprocess is killed.
|
52
|
+
stream : Optional[str], default None
|
53
|
+
If specified, the specified stream is printed to stdout. `stream` can
|
54
|
+
be one of `stdout` or `stderr`.
|
55
|
+
"""
|
56
|
+
...
|
57
|
+
def run(self, show_output: bool = False):
|
58
|
+
"""
|
59
|
+
Run the subprocess synchronously. This can only be called once.
|
60
|
+
|
61
|
+
This also waits on the process implicitly.
|
62
|
+
|
63
|
+
Parameters
|
64
|
+
----------
|
65
|
+
show_output : bool, default False
|
66
|
+
Suppress the 'stdout' and 'stderr' to the console by default.
|
67
|
+
They can be accessed later by reading the files present in:
|
68
|
+
- self.log_files["stdout"]
|
69
|
+
- self.log_files["stderr"]
|
70
|
+
"""
|
71
|
+
...
|
72
|
+
def async_run(self):
|
73
|
+
"""
|
74
|
+
Run the subprocess asynchronously. This can only be called once.
|
75
|
+
|
76
|
+
Once this is called, you can then wait on the process (using `wait`), stream
|
77
|
+
logs (using `stream_logs`) or kill it (using `kill`).
|
78
|
+
"""
|
79
|
+
...
|
80
|
+
def stream_log(self, stream: str, position: typing.Optional[int] = None, timeout_per_line: typing.Optional[float] = None, log_write_delay: float = 0.01) -> typing.Iterator[typing.Tuple[int, str]]:
|
81
|
+
"""
|
82
|
+
Stream logs from the subprocess line by line.
|
83
|
+
|
84
|
+
Parameters
|
85
|
+
----------
|
86
|
+
stream : str
|
87
|
+
The stream to stream logs from. Can be one of "stdout" or "stderr".
|
88
|
+
position : Optional[int], default None
|
89
|
+
The position in the log file to start streaming from. If None, it starts
|
90
|
+
from the beginning of the log file. This allows resuming streaming from
|
91
|
+
a previously known position
|
92
|
+
timeout_per_line : Optional[float], default None
|
93
|
+
The time to wait for a line to be read from the log file. If None, it
|
94
|
+
waits indefinitely. If the timeout is reached, a LogReadTimeoutError
|
95
|
+
is raised. Note that this timeout is *per line* and not cumulative so this
|
96
|
+
function may take significantly more time than `timeout_per_line`
|
97
|
+
log_write_delay : float, default 0.01
|
98
|
+
Improves the probability of getting whole lines. This setting is for
|
99
|
+
advanced use cases.
|
100
|
+
|
101
|
+
Yields
|
102
|
+
------
|
103
|
+
Tuple[int, str]
|
104
|
+
A tuple containing the position in the log file and the line read. The
|
105
|
+
position returned can be used to feed into another `stream_logs` call
|
106
|
+
for example.
|
107
|
+
"""
|
108
|
+
...
|
109
|
+
def emit_logs(self, stream: str = "stdout", custom_logger: typing.Callable[..., None] = print):
|
110
|
+
"""
|
111
|
+
Helper function that can easily emit all the logs for a given stream.
|
112
|
+
|
113
|
+
This function will only terminate when all the log has been printed.
|
114
|
+
|
115
|
+
Parameters
|
116
|
+
----------
|
117
|
+
stream : str, default "stdout"
|
118
|
+
The stream to emit logs for. Can be one of "stdout" or "stderr".
|
119
|
+
custom_logger : Callable[..., None], default print
|
120
|
+
A custom logger function that takes in a string and "emits" it. By default,
|
121
|
+
the log is printed to stdout.
|
122
|
+
"""
|
123
|
+
...
|
124
|
+
def cleanup(self):
|
125
|
+
"""
|
126
|
+
Clean up log files for a running subprocesses.
|
127
|
+
"""
|
128
|
+
...
|
129
|
+
def kill(self, termination_timeout: float = 1):
|
130
|
+
"""
|
131
|
+
Kill the subprocess and its descendants.
|
132
|
+
|
133
|
+
Parameters
|
134
|
+
----------
|
135
|
+
termination_timeout : float, default 1
|
136
|
+
The time to wait after sending a SIGTERM to the process and its descendants
|
137
|
+
before sending a SIGKILL.
|
138
|
+
"""
|
139
|
+
...
|
140
|
+
...
|
141
|
+
|
142
|
+
class SubprocessManager(object, metaclass=type):
|
143
|
+
def __init__(self):
|
144
|
+
...
|
145
|
+
def __aenter__(self) -> metaflow.runner.subprocess_manager.SubprocessManager:
|
146
|
+
...
|
147
|
+
def __aexit__(self, exc_type, exc_value, traceback):
|
148
|
+
...
|
149
|
+
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:
|
150
|
+
"""
|
151
|
+
Run a command synchronously and return its process ID.
|
152
|
+
|
153
|
+
Parameters
|
154
|
+
----------
|
155
|
+
command : List[str]
|
156
|
+
The command to run in List form.
|
157
|
+
env : Optional[Dict[str, str]], default None
|
158
|
+
Environment variables to set for the subprocess; if not specified,
|
159
|
+
the current enviornment variables are used.
|
160
|
+
cwd : Optional[str], default None
|
161
|
+
The directory to run the subprocess in; if not specified, the current
|
162
|
+
directory is used.
|
163
|
+
show_output : bool, default False
|
164
|
+
Suppress the 'stdout' and 'stderr' to the console by default.
|
165
|
+
They can be accessed later by reading the files present in the
|
166
|
+
CommandManager object:
|
167
|
+
- command_obj.log_files["stdout"]
|
168
|
+
- command_obj.log_files["stderr"]
|
169
|
+
Returns
|
170
|
+
-------
|
171
|
+
int
|
172
|
+
The process ID of the subprocess.
|
173
|
+
"""
|
174
|
+
...
|
175
|
+
def async_run_command(self, command: typing.List[str], env: typing.Optional[typing.Dict[str, str]] = None, cwd: typing.Optional[str] = None) -> int:
|
176
|
+
"""
|
177
|
+
Run a command asynchronously and return its process ID.
|
178
|
+
|
179
|
+
Parameters
|
180
|
+
----------
|
181
|
+
command : List[str]
|
182
|
+
The command to run in List form.
|
183
|
+
env : Optional[Dict[str, str]], default None
|
184
|
+
Environment variables to set for the subprocess; if not specified,
|
185
|
+
the current enviornment variables are used.
|
186
|
+
cwd : Optional[str], default None
|
187
|
+
The directory to run the subprocess in; if not specified, the current
|
188
|
+
directory is used.
|
189
|
+
|
190
|
+
Returns
|
191
|
+
-------
|
192
|
+
int
|
193
|
+
The process ID of the subprocess.
|
194
|
+
"""
|
195
|
+
...
|
196
|
+
def get(self, pid: int) -> typing.Optional["CommandManager"]:
|
197
|
+
"""
|
198
|
+
Get one of the CommandManager managed by this SubprocessManager.
|
199
|
+
|
200
|
+
Parameters
|
201
|
+
----------
|
202
|
+
pid : int
|
203
|
+
The process ID of the subprocess (returned by run_command or async_run_command).
|
204
|
+
|
205
|
+
Returns
|
206
|
+
-------
|
207
|
+
Optional[CommandManager]
|
208
|
+
The CommandManager object for the given process ID, or None if not found.
|
209
|
+
"""
|
210
|
+
...
|
211
|
+
def cleanup(self):
|
212
|
+
"""
|
213
|
+
Clean up log files for all running subprocesses.
|
214
|
+
"""
|
215
|
+
...
|
216
|
+
...
|
217
|
+
|
218
|
+
def read_from_file_when_ready(file_path: str, timeout: float = 5):
|
219
|
+
...
|
220
|
+
|
221
|
+
def handle_timeout(tfp_runner_attribute, command_obj: metaflow.runner.subprocess_manager.CommandManager):
|
222
|
+
"""
|
223
|
+
Handle the timeout for a running subprocess command that reads a file
|
224
|
+
and raises an error with appropriate logs if a TimeoutError occurs.
|
225
|
+
|
226
|
+
Parameters
|
227
|
+
----------
|
228
|
+
tfp_runner_attribute : NamedTemporaryFile
|
229
|
+
Temporary file that stores runner attribute data.
|
230
|
+
command_obj : CommandManager
|
231
|
+
Command manager object that encapsulates the running command details.
|
232
|
+
|
233
|
+
Returns
|
234
|
+
-------
|
235
|
+
str
|
236
|
+
Content read from the temporary file.
|
237
|
+
|
238
|
+
Raises
|
239
|
+
------
|
240
|
+
RuntimeError
|
241
|
+
If a TimeoutError occurs, it raises a RuntimeError with the command's
|
242
|
+
stdout and stderr logs.
|
243
|
+
"""
|
244
|
+
...
|
245
|
+
|
246
|
+
def get_lower_level_group(api, top_level_kwargs: typing.Dict, _type: typing.Optional[str], deployer_kwargs: typing.Dict):
|
247
|
+
"""
|
248
|
+
Retrieve a lower-level group from the API based on the type and provided arguments.
|
249
|
+
|
250
|
+
Parameters
|
251
|
+
----------
|
252
|
+
api : MetaflowAPI
|
253
|
+
Metaflow API instance.
|
254
|
+
top_level_kwargs : Dict
|
255
|
+
Top-level keyword arguments to pass to the API.
|
256
|
+
_type : str
|
257
|
+
Type of the deployer implementation to target.
|
258
|
+
deployer_kwargs : Dict
|
259
|
+
Keyword arguments specific to the deployer.
|
260
|
+
|
261
|
+
Returns
|
262
|
+
-------
|
263
|
+
Any
|
264
|
+
The lower-level group object retrieved from the API.
|
265
|
+
|
266
|
+
Raises
|
267
|
+
------
|
268
|
+
ValueError
|
269
|
+
If the `_type` is None.
|
270
|
+
"""
|
271
|
+
...
|
272
|
+
|
273
|
+
class Deployer(object, metaclass=type):
|
274
|
+
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, **kwargs):
|
275
|
+
...
|
276
|
+
def _Deployer__make_function(self, deployer_class):
|
277
|
+
"""
|
278
|
+
Create a function for the given deployer class.
|
279
|
+
|
280
|
+
Parameters
|
281
|
+
----------
|
282
|
+
deployer_class : Type[DeployerImpl]
|
283
|
+
Deployer implementation class.
|
284
|
+
|
285
|
+
Returns
|
286
|
+
-------
|
287
|
+
Callable
|
288
|
+
Function that initializes and returns an instance of the deployer class.
|
289
|
+
"""
|
290
|
+
...
|
291
|
+
...
|
292
|
+
|
293
|
+
class TriggeredRun(object, metaclass=type):
|
294
|
+
def __init__(self, deployer: DeployerImpl, content: str):
|
295
|
+
...
|
296
|
+
@property
|
297
|
+
def run(self):
|
298
|
+
"""
|
299
|
+
Retrieve the `Run` object for the triggered run.
|
300
|
+
|
301
|
+
Note that Metaflow `Run` becomes available only when the `start` task
|
302
|
+
has started executing.
|
303
|
+
|
304
|
+
Returns
|
305
|
+
-------
|
306
|
+
Run, optional
|
307
|
+
Metaflow Run object if the `start` step has started executing, otherwise None.
|
308
|
+
"""
|
309
|
+
...
|
310
|
+
...
|
311
|
+
|
312
|
+
class DeployedFlow(object, metaclass=type):
|
313
|
+
def __init__(self, deployer: DeployerImpl):
|
314
|
+
...
|
315
|
+
...
|
316
|
+
|
317
|
+
class DeployerImpl(object, metaclass=type):
|
318
|
+
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, **kwargs):
|
319
|
+
...
|
320
|
+
def __enter__(self) -> DeployerImpl:
|
321
|
+
...
|
322
|
+
def create(self, **kwargs) -> DeployedFlow:
|
323
|
+
"""
|
324
|
+
Create a deployed flow using the deployer implementation.
|
325
|
+
|
326
|
+
Parameters
|
327
|
+
----------
|
328
|
+
**kwargs : Any
|
329
|
+
Additional arguments to pass to `create` corresponding to the
|
330
|
+
command line arguments of `create`
|
331
|
+
|
332
|
+
Returns
|
333
|
+
-------
|
334
|
+
DeployedFlow
|
335
|
+
DeployedFlow object representing the deployed flow.
|
336
|
+
|
337
|
+
Raises
|
338
|
+
------
|
339
|
+
Exception
|
340
|
+
If there is an error during deployment.
|
341
|
+
"""
|
342
|
+
...
|
343
|
+
def __exit__(self, exc_type, exc_value, traceback):
|
344
|
+
"""
|
345
|
+
Cleanup resources on exit.
|
346
|
+
"""
|
347
|
+
...
|
348
|
+
def cleanup(self):
|
349
|
+
"""
|
350
|
+
Cleanup resources.
|
351
|
+
"""
|
352
|
+
...
|
353
|
+
...
|
354
|
+
|
@@ -1,17 +1,17 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.254443 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.client.core
|
12
11
|
import metaflow.runner.metaflow_runner
|
13
12
|
import metaflow.runner.subprocess_manager
|
14
13
|
import datetime
|
14
|
+
import metaflow.client.core
|
15
15
|
import metaflow.events
|
16
16
|
|
17
17
|
class Run(metaflow.client.core.MetaflowObject, metaclass=type):
|
@@ -274,6 +274,12 @@ def metadata(ms: str) -> str:
|
|
274
274
|
"""
|
275
275
|
...
|
276
276
|
|
277
|
+
def clear_and_set_os_environ(env: typing.Dict):
|
278
|
+
...
|
279
|
+
|
280
|
+
def read_from_file_when_ready(file_path: str, timeout: float = 5):
|
281
|
+
...
|
282
|
+
|
277
283
|
class CommandManager(object, metaclass=type):
|
278
284
|
def __init__(self, command: typing.List[str], env: typing.Optional[typing.Dict[str, str]] = None, cwd: typing.Optional[str] = None):
|
279
285
|
"""
|
@@ -474,12 +480,6 @@ class SubprocessManager(object, metaclass=type):
|
|
474
480
|
...
|
475
481
|
...
|
476
482
|
|
477
|
-
def clear_and_set_os_environ(env: typing.Dict):
|
478
|
-
...
|
479
|
-
|
480
|
-
def read_from_file_when_ready(file_path: str, timeout: float = 5):
|
481
|
-
...
|
482
|
-
|
483
483
|
class ExecutingRun(object, metaclass=type):
|
484
484
|
def __init__(self, runner: Runner, command_obj: metaflow.runner.subprocess_manager.CommandManager, run_obj: metaflow.client.core.Run):
|
485
485
|
"""
|
@@ -0,0 +1,54 @@
|
|
1
|
+
##################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.257951 #
|
5
|
+
##################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
|
11
|
+
class Deployer(object, metaclass=type):
|
12
|
+
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, **kwargs):
|
13
|
+
...
|
14
|
+
def _Deployer__make_function(self, deployer_class):
|
15
|
+
"""
|
16
|
+
Create a function for the given deployer class.
|
17
|
+
|
18
|
+
Parameters
|
19
|
+
----------
|
20
|
+
deployer_class : Type[DeployerImpl]
|
21
|
+
Deployer implementation class.
|
22
|
+
|
23
|
+
Returns
|
24
|
+
-------
|
25
|
+
Callable
|
26
|
+
Function that initializes and returns an instance of the deployer class.
|
27
|
+
"""
|
28
|
+
...
|
29
|
+
...
|
30
|
+
|
31
|
+
def get_current_cell(ipython):
|
32
|
+
...
|
33
|
+
|
34
|
+
def format_flowfile(cell):
|
35
|
+
"""
|
36
|
+
Formats the given cell content to create a valid Python script that can be executed as a Metaflow flow.
|
37
|
+
"""
|
38
|
+
...
|
39
|
+
|
40
|
+
DEFAULT_DIR: str
|
41
|
+
|
42
|
+
class NBDeployerInitializationError(Exception, metaclass=type):
|
43
|
+
...
|
44
|
+
|
45
|
+
class NBDeployer(object, metaclass=type):
|
46
|
+
def __init__(self, flow, show_output: bool = True, profile: typing.Optional[str] = None, env: typing.Optional[typing.Dict] = None, base_dir: str = "/tmp", **kwargs):
|
47
|
+
...
|
48
|
+
def cleanup(self):
|
49
|
+
"""
|
50
|
+
Delete any temporary files created during execution.
|
51
|
+
"""
|
52
|
+
...
|
53
|
+
...
|
54
|
+
|
metaflow-stubs/runner/nbrun.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.255527 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -102,11 +102,6 @@ class Runner(object, metaclass=type):
|
|
102
102
|
...
|
103
103
|
...
|
104
104
|
|
105
|
-
DEFAULT_DIR: str
|
106
|
-
|
107
|
-
class NBRunnerInitializationError(Exception, metaclass=type):
|
108
|
-
...
|
109
|
-
|
110
105
|
def get_current_cell(ipython):
|
111
106
|
...
|
112
107
|
|
@@ -116,6 +111,11 @@ def format_flowfile(cell):
|
|
116
111
|
"""
|
117
112
|
...
|
118
113
|
|
114
|
+
DEFAULT_DIR: str
|
115
|
+
|
116
|
+
class NBRunnerInitializationError(Exception, metaclass=type):
|
117
|
+
...
|
118
|
+
|
119
119
|
class NBRunner(object, metaclass=type):
|
120
120
|
def __init__(self, flow, show_output: bool = True, profile: typing.Optional[str] = None, env: typing.Optional[typing.Dict] = None, base_dir: str = "/tmp", **kwargs):
|
121
121
|
...
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.265821 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -0,0 +1,25 @@
|
|
1
|
+
##################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.266175 #
|
5
|
+
##################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
|
11
|
+
def get_current_cell(ipython):
|
12
|
+
...
|
13
|
+
|
14
|
+
def format_flowfile(cell):
|
15
|
+
"""
|
16
|
+
Formats the given cell content to create a valid Python script that can be executed as a Metaflow flow.
|
17
|
+
"""
|
18
|
+
...
|
19
|
+
|
20
|
+
def clear_and_set_os_environ(env: typing.Dict):
|
21
|
+
...
|
22
|
+
|
23
|
+
def read_from_file_when_ready(file_path: str, timeout: float = 5):
|
24
|
+
...
|
25
|
+
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.258839 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -9,8 +9,8 @@ from __future__ import annotations
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
11
|
import metaflow.monitor
|
12
|
-
import metaflow.event_logger
|
13
12
|
import typing
|
13
|
+
import metaflow.event_logger
|
14
14
|
|
15
15
|
class SystemMonitor(object, metaclass=type):
|
16
16
|
def __init__(self):
|
@@ -1,15 +1,15 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.287781 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.event_logger
|
12
11
|
import typing
|
12
|
+
import metaflow.event_logger
|
13
13
|
|
14
14
|
class SystemLogger(object, metaclass=type):
|
15
15
|
def __init__(self):
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.287323 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/tagging_util.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.228233 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/tuple_util.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.235902 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/version.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-07-
|
3
|
+
# MF version: 2.12.9 #
|
4
|
+
# Generated on 2024-07-25T18:20:16.258069 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: metaflow-stubs
|
3
|
-
Version: 2.12.
|
3
|
+
Version: 2.12.9
|
4
4
|
Summary: Metaflow Stubs: Stubs for the metaflow package
|
5
5
|
Author: Metaflow Developers
|
6
6
|
Author-email: help@metaflow.org
|
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
22
22
|
Requires-Python: >=3.7.0
|
23
23
|
Description-Content-Type: text/markdown
|
24
|
-
Requires-Dist: metaflow ==2.12.
|
24
|
+
Requires-Dist: metaflow ==2.12.9
|
25
25
|
|
26
26
|
# Metaflow Stubs
|
27
27
|
|