metaflow-stubs 2.12.28__py2.py3-none-any.whl → 2.12.29__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- metaflow-stubs/__init__.pyi +297 -3001
- metaflow-stubs/cards.pyi +19 -473
- metaflow-stubs/cli.pyi +17 -81
- metaflow-stubs/client/__init__.pyi +19 -1113
- metaflow-stubs/client/core.pyi +18 -158
- metaflow-stubs/client/filecache.pyi +8 -12
- metaflow-stubs/clone_util.pyi +6 -26
- metaflow-stubs/events.pyi +6 -5
- metaflow-stubs/exception.pyi +8 -6
- metaflow-stubs/flowspec.pyi +22 -106
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +16 -564
- metaflow-stubs/info_file.pyi +6 -5
- metaflow-stubs/metadata_provider/__init__.pyi +16 -0
- metaflow-stubs/metadata_provider/heartbeat.pyi +34 -0
- metaflow-stubs/{metadata → metadata_provider}/metadata.pyi +10 -22
- metaflow-stubs/metadata_provider/util.pyi +19 -0
- metaflow-stubs/metaflow_config.pyi +8 -11
- metaflow-stubs/metaflow_current.pyi +10 -9
- metaflow-stubs/mflog/__init__.pyi +6 -0
- metaflow-stubs/mflog/mflog.pyi +52 -5
- metaflow-stubs/multicore_utils.pyi +6 -5
- metaflow-stubs/parameters.pyi +13 -23
- metaflow-stubs/plugins/__init__.pyi +51 -163
- metaflow-stubs/plugins/airflow/__init__.pyi +12 -5
- metaflow-stubs/plugins/airflow/airflow.pyi +19 -130
- metaflow-stubs/plugins/airflow/airflow_cli.pyi +17 -136
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +7 -26
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +7 -6
- metaflow-stubs/plugins/airflow/exception.pyi +7 -11
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +10 -97
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +9 -30
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +9 -40
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +9 -40
- metaflow-stubs/plugins/argo/__init__.pyi +12 -5
- metaflow-stubs/plugins/argo/argo_client.pyi +8 -26
- metaflow-stubs/plugins/argo/argo_events.pyi +7 -11
- metaflow-stubs/plugins/argo/argo_workflows.pyi +16 -120
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +12 -404
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +65 -322
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +165 -0
- metaflow-stubs/plugins/aws/__init__.pyi +11 -5
- metaflow-stubs/plugins/aws/aws_client.pyi +6 -5
- metaflow-stubs/plugins/aws/aws_utils.pyi +6 -11
- metaflow-stubs/plugins/aws/batch/__init__.pyi +10 -5
- metaflow-stubs/plugins/aws/batch/batch.pyi +10 -55
- metaflow-stubs/plugins/aws/batch/batch_cli.pyi +10 -31
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +7 -11
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +15 -140
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +7 -5
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +10 -21
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +15 -5
- metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/production_token.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +7 -5
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +11 -65
- metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +19 -175
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +8 -37
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +53 -290
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +127 -0
- metaflow-stubs/plugins/azure/__init__.pyi +12 -7
- metaflow-stubs/plugins/azure/azure_credential.pyi +6 -5
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +7 -11
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +11 -24
- metaflow-stubs/plugins/azure/azure_utils.pyi +11 -29
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +8 -23
- metaflow-stubs/plugins/azure/includefile_support.pyi +7 -17
- metaflow-stubs/plugins/cards/__init__.pyi +15 -5
- metaflow-stubs/plugins/cards/card_cli.pyi +22 -491
- metaflow-stubs/plugins/cards/card_client.pyi +13 -75
- metaflow-stubs/plugins/cards/card_creator.pyi +7 -10
- metaflow-stubs/plugins/cards/card_datastore.pyi +10 -18
- metaflow-stubs/plugins/cards/card_decorator.pyi +10 -126
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +14 -81
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +14 -97
- metaflow-stubs/plugins/cards/card_modules/card.pyi +6 -5
- metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +12 -73
- metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +6 -61
- metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +6 -5
- metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +8 -45
- metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +7 -6
- metaflow-stubs/plugins/cards/card_modules/components.pyi +25 -108
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +6 -5
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +6 -12
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +11 -88
- metaflow-stubs/plugins/cards/card_resolver.pyi +6 -49
- metaflow-stubs/plugins/cards/component_serializer.pyi +13 -63
- metaflow-stubs/plugins/cards/exception.pyi +7 -11
- metaflow-stubs/plugins/catch_decorator.pyi +10 -30
- metaflow-stubs/plugins/datatools/__init__.pyi +13 -392
- metaflow-stubs/plugins/datatools/local.pyi +7 -11
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +19 -653
- metaflow-stubs/plugins/datatools/s3/s3.pyi +16 -264
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +7 -10
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +6 -11
- metaflow-stubs/plugins/debug_logger.pyi +7 -5
- metaflow-stubs/plugins/debug_monitor.pyi +7 -5
- metaflow-stubs/plugins/environment_decorator.pyi +7 -5
- metaflow-stubs/plugins/events_decorator.pyi +8 -14
- metaflow-stubs/plugins/frameworks/__init__.pyi +7 -5
- metaflow-stubs/plugins/frameworks/pytorch.pyi +8 -45
- metaflow-stubs/plugins/gcp/__init__.pyi +11 -7
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +11 -24
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +7 -11
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +6 -5
- metaflow-stubs/plugins/gcp/gs_utils.pyi +8 -20
- metaflow-stubs/plugins/gcp/includefile_support.pyi +7 -17
- metaflow-stubs/plugins/kubernetes/__init__.pyi +13 -5
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +6 -10
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +9 -29
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +16 -155
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +9 -72
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +19 -142
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +8 -41
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +7 -11
- metaflow-stubs/plugins/logs_cli.pyi +11 -10
- metaflow-stubs/plugins/package_cli.pyi +7 -5
- metaflow-stubs/plugins/parallel_decorator.pyi +11 -59
- metaflow-stubs/plugins/project_decorator.pyi +8 -14
- metaflow-stubs/plugins/pypi/__init__.pyi +12 -11
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +8 -27
- metaflow-stubs/plugins/pypi/conda_environment.pyi +14 -20
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +7 -5
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +7 -39
- metaflow-stubs/plugins/pypi/utils.pyi +7 -11
- metaflow-stubs/plugins/resources_decorator.pyi +7 -5
- metaflow-stubs/plugins/retry_decorator.pyi +7 -11
- metaflow-stubs/plugins/secrets/__init__.pyi +9 -5
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +9 -14
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +7 -11
- metaflow-stubs/plugins/storage_executor.pyi +6 -11
- metaflow-stubs/plugins/tag_cli.pyi +14 -396
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +9 -34
- metaflow-stubs/plugins/timeout_decorator.pyi +8 -12
- metaflow-stubs/procpoll.pyi +7 -5
- metaflow-stubs/pylint_wrapper.pyi +7 -11
- metaflow-stubs/runner/__init__.pyi +13 -5
- metaflow-stubs/runner/deployer.pyi +102 -210
- metaflow-stubs/runner/deployer_impl.pyi +87 -0
- metaflow-stubs/runner/metaflow_runner.pyi +24 -508
- metaflow-stubs/runner/nbdeploy.pyi +16 -60
- metaflow-stubs/runner/nbrun.pyi +11 -148
- metaflow-stubs/runner/subprocess_manager.pyi +9 -10
- metaflow-stubs/runner/utils.pyi +44 -9
- metaflow-stubs/system/__init__.pyi +9 -87
- metaflow-stubs/system/system_logger.pyi +7 -6
- metaflow-stubs/system/system_monitor.pyi +6 -5
- metaflow-stubs/tagging_util.pyi +6 -10
- metaflow-stubs/tuple_util.pyi +6 -5
- metaflow-stubs/version.pyi +6 -5
- {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.29.dist-info}/METADATA +2 -2
- metaflow_stubs-2.12.29.dist-info/RECORD +158 -0
- metaflow-stubs/metadata/util.pyi +0 -18
- metaflow_stubs-2.12.28.dist-info/RECORD +0 -152
- {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.29.dist-info}/WHEEL +0 -0
- {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.29.dist-info}/top_level.txt +0 -0
metaflow-stubs/runner/nbrun.pyi
CHANGED
@@ -1,153 +1,16 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.574733 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
|
-
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.runner.metaflow_runner
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
to run flows and perform other operations either synchronously or asynchronously.
|
17
|
-
The class expects a path to the flow file along with optional arguments
|
18
|
-
that match top-level options on the command-line.
|
19
|
-
|
20
|
-
This class works as a context manager, calling `cleanup()` to remove
|
21
|
-
temporary files at exit.
|
22
|
-
|
23
|
-
Example:
|
24
|
-
```python
|
25
|
-
with Runner('slowflow.py', pylint=False) as runner:
|
26
|
-
result = runner.run(alpha=5, tags=["abc", "def"], max_workers=5)
|
27
|
-
print(result.run.finished)
|
28
|
-
```
|
29
|
-
|
30
|
-
Parameters
|
31
|
-
----------
|
32
|
-
flow_file : str
|
33
|
-
Path to the flow file to run
|
34
|
-
show_output : bool, default True
|
35
|
-
Show the 'stdout' and 'stderr' to the console by default,
|
36
|
-
Only applicable for synchronous 'run' and 'resume' functions.
|
37
|
-
profile : Optional[str], default None
|
38
|
-
Metaflow profile to use to run this run. If not specified, the default
|
39
|
-
profile is used (or the one already set using `METAFLOW_PROFILE`)
|
40
|
-
env : Optional[Dict], default None
|
41
|
-
Additional environment variables to set for the Run. This overrides the
|
42
|
-
environment set for this process.
|
43
|
-
cwd : Optional[str], default None
|
44
|
-
The directory to run the subprocess in; if not specified, the current
|
45
|
-
directory is used.
|
46
|
-
file_read_timeout : int, default 3600
|
47
|
-
The timeout until which we try to read the runner attribute file.
|
48
|
-
**kwargs : Any
|
49
|
-
Additional arguments that you would pass to `python myflow.py` before
|
50
|
-
the `run` command.
|
51
|
-
"""
|
52
|
-
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):
|
53
|
-
...
|
54
|
-
def __enter__(self) -> metaflow.runner.metaflow_runner.Runner:
|
55
|
-
...
|
56
|
-
def __aenter__(self) -> metaflow.runner.metaflow_runner.Runner:
|
57
|
-
...
|
58
|
-
def _Runner__get_executing_run(self, tfp_runner_attribute, command_obj):
|
59
|
-
...
|
60
|
-
def run(self, **kwargs) -> metaflow.runner.metaflow_runner.ExecutingRun:
|
61
|
-
"""
|
62
|
-
Blocking execution of the run. This method will wait until
|
63
|
-
the run has completed execution.
|
64
|
-
|
65
|
-
Parameters
|
66
|
-
----------
|
67
|
-
**kwargs : Any
|
68
|
-
Additional arguments that you would pass to `python myflow.py` after
|
69
|
-
the `run` command, in particular, any parameters accepted by the flow.
|
70
|
-
|
71
|
-
Returns
|
72
|
-
-------
|
73
|
-
ExecutingRun
|
74
|
-
ExecutingRun containing the results of the run.
|
75
|
-
"""
|
76
|
-
...
|
77
|
-
def resume(self, **kwargs):
|
78
|
-
"""
|
79
|
-
Blocking resume execution of the run.
|
80
|
-
This method will wait until the resumed run has completed execution.
|
81
|
-
|
82
|
-
Parameters
|
83
|
-
----------
|
84
|
-
**kwargs : Any
|
85
|
-
Additional arguments that you would pass to `python ./myflow.py` after
|
86
|
-
the `resume` command.
|
87
|
-
|
88
|
-
Returns
|
89
|
-
-------
|
90
|
-
ExecutingRun
|
91
|
-
ExecutingRun containing the results of the resumed run.
|
92
|
-
"""
|
93
|
-
...
|
94
|
-
def async_run(self, **kwargs) -> metaflow.runner.metaflow_runner.ExecutingRun:
|
95
|
-
"""
|
96
|
-
Non-blocking execution of the run. This method will return as soon as the
|
97
|
-
run has launched.
|
98
|
-
|
99
|
-
Note that this method is asynchronous and needs to be `await`ed.
|
100
|
-
|
101
|
-
Parameters
|
102
|
-
----------
|
103
|
-
**kwargs : Any
|
104
|
-
Additional arguments that you would pass to `python myflow.py` after
|
105
|
-
the `run` command, in particular, any parameters accepted by the flow.
|
106
|
-
|
107
|
-
Returns
|
108
|
-
-------
|
109
|
-
ExecutingRun
|
110
|
-
ExecutingRun representing the run that was started.
|
111
|
-
"""
|
112
|
-
...
|
113
|
-
def async_resume(self, **kwargs):
|
114
|
-
"""
|
115
|
-
Non-blocking resume execution of the run.
|
116
|
-
This method will return as soon as the resume has launched.
|
117
|
-
|
118
|
-
Note that this method is asynchronous and needs to be `await`ed.
|
119
|
-
|
120
|
-
Parameters
|
121
|
-
----------
|
122
|
-
**kwargs : Any
|
123
|
-
Additional arguments that you would pass to `python myflow.py` after
|
124
|
-
the `resume` command.
|
125
|
-
|
126
|
-
Returns
|
127
|
-
-------
|
128
|
-
ExecutingRun
|
129
|
-
ExecutingRun representing the resumed run that was started.
|
130
|
-
"""
|
131
|
-
...
|
132
|
-
def __exit__(self, exc_type, exc_value, traceback):
|
133
|
-
...
|
134
|
-
def __aexit__(self, exc_type, exc_value, traceback):
|
135
|
-
...
|
136
|
-
def cleanup(self):
|
137
|
-
"""
|
138
|
-
Delete any temporary files created during execution.
|
139
|
-
"""
|
140
|
-
...
|
141
|
-
...
|
142
|
-
|
143
|
-
def get_current_cell(ipython):
|
144
|
-
...
|
145
|
-
|
146
|
-
def format_flowfile(cell):
|
147
|
-
"""
|
148
|
-
Formats the given cell content to create a valid Python script that can be executed as a Metaflow flow.
|
149
|
-
"""
|
150
|
-
...
|
11
|
+
from .metaflow_runner import Runner as Runner
|
12
|
+
from .utils import get_current_cell as get_current_cell
|
13
|
+
from .utils import format_flowfile as format_flowfile
|
151
14
|
|
152
15
|
class NBRunnerInitializationError(Exception, metaclass=type):
|
153
16
|
"""
|
@@ -177,13 +40,13 @@ class NBRunner(object, metaclass=type):
|
|
177
40
|
show_output : bool, default True
|
178
41
|
Show the 'stdout' and 'stderr' to the console by default,
|
179
42
|
Only applicable for synchronous 'run' and 'resume' functions.
|
180
|
-
profile :
|
43
|
+
profile : str, optional, default None
|
181
44
|
Metaflow profile to use to run this run. If not specified, the default
|
182
45
|
profile is used (or the one already set using `METAFLOW_PROFILE`)
|
183
|
-
env :
|
46
|
+
env : Dict[str, str], optional, default None
|
184
47
|
Additional environment variables to set for the Run. This overrides the
|
185
48
|
environment set for this process.
|
186
|
-
base_dir :
|
49
|
+
base_dir : str, optional, default None
|
187
50
|
The directory to run the subprocess in; if not specified, the current
|
188
51
|
working directory is used.
|
189
52
|
file_read_timeout : int, default 3600
|
@@ -1,14 +1,13 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.581545 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
|
-
|
11
|
-
import metaflow.runner.subprocess_manager
|
10
|
+
|
12
11
|
|
13
12
|
def kill_process_and_descendants(pid, termination_timeout):
|
14
13
|
...
|
@@ -26,7 +25,7 @@ class SubprocessManager(object, metaclass=type):
|
|
26
25
|
"""
|
27
26
|
def __init__(self):
|
28
27
|
...
|
29
|
-
def __aenter__(self) -> SubprocessManager:
|
28
|
+
def __aenter__(self) -> "SubprocessManager":
|
30
29
|
...
|
31
30
|
def __aexit__(self, exc_type, exc_value, traceback):
|
32
31
|
...
|
@@ -120,7 +119,7 @@ class CommandManager(object, metaclass=type):
|
|
120
119
|
directory is used.
|
121
120
|
"""
|
122
121
|
...
|
123
|
-
def __aenter__(self) -> CommandManager:
|
122
|
+
def __aenter__(self) -> "CommandManager":
|
124
123
|
...
|
125
124
|
def __aexit__(self, exc_type, exc_value, traceback):
|
126
125
|
...
|
@@ -195,7 +194,7 @@ class CommandManager(object, metaclass=type):
|
|
195
194
|
for example.
|
196
195
|
"""
|
197
196
|
...
|
198
|
-
def emit_logs(self, stream: str =
|
197
|
+
def emit_logs(self, stream: str = 'stdout', custom_logger: typing.Callable[..., None] = print):
|
199
198
|
"""
|
200
199
|
Helper function that can easily emit all the logs for a given stream.
|
201
200
|
|
metaflow-stubs/runner/utils.pyi
CHANGED
@@ -1,11 +1,18 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.582314 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow.runner.click_api
|
12
|
+
import metaflow.runner.subprocess_manager
|
13
|
+
import tempfile
|
14
|
+
import typing
|
15
|
+
|
9
16
|
|
10
17
|
TYPE_CHECKING: bool
|
11
18
|
|
@@ -14,17 +21,18 @@ def get_current_cell(ipython):
|
|
14
21
|
|
15
22
|
def format_flowfile(cell):
|
16
23
|
"""
|
17
|
-
Formats the given cell content to create a valid Python script that can be
|
24
|
+
Formats the given cell content to create a valid Python script that can be
|
25
|
+
executed as a Metaflow flow.
|
18
26
|
"""
|
19
27
|
...
|
20
28
|
|
21
|
-
def check_process_status(command_obj: "CommandManager"):
|
29
|
+
def check_process_status(command_obj: "metaflow.runner.subprocess_manager.CommandManager"):
|
22
30
|
...
|
23
31
|
|
24
|
-
def read_from_file_when_ready(file_path: str, command_obj: "CommandManager", timeout: float = 5):
|
32
|
+
def read_from_file_when_ready(file_path: str, command_obj: "metaflow.runner.subprocess_manager.CommandManager", timeout: float = 5):
|
25
33
|
...
|
26
34
|
|
27
|
-
def handle_timeout(tfp_runner_attribute, command_obj: "CommandManager", file_read_timeout: int):
|
35
|
+
def handle_timeout(tfp_runner_attribute: "tempfile._TemporaryFileWrapper[str]", command_obj: "metaflow.runner.subprocess_manager.CommandManager", file_read_timeout: int):
|
28
36
|
"""
|
29
37
|
Handle the timeout for a running subprocess command that reads a file
|
30
38
|
and raises an error with appropriate logs if a TimeoutError occurs.
|
@@ -51,3 +59,30 @@ def handle_timeout(tfp_runner_attribute, command_obj: "CommandManager", file_rea
|
|
51
59
|
"""
|
52
60
|
...
|
53
61
|
|
62
|
+
def get_lower_level_group(api: "metaflow.runner.click_api.MetaflowAPI", top_level_kwargs: typing.Dict[str, typing.Any], sub_command: str, sub_command_kwargs: typing.Dict[str, typing.Any]) -> "metaflow.runner.click_api.MetaflowAPI":
|
63
|
+
"""
|
64
|
+
Retrieve a lower-level group from the API based on the type and provided arguments.
|
65
|
+
|
66
|
+
Parameters
|
67
|
+
----------
|
68
|
+
api : MetaflowAPI
|
69
|
+
Metaflow API instance.
|
70
|
+
top_level_kwargs : Dict[str, Any]
|
71
|
+
Top-level keyword arguments to pass to the API.
|
72
|
+
sub_command : str
|
73
|
+
Sub-command of API to get the API for
|
74
|
+
sub_command_kwargs : Dict[str, Any]
|
75
|
+
Sub-command arguments
|
76
|
+
|
77
|
+
Returns
|
78
|
+
-------
|
79
|
+
MetaflowAPI
|
80
|
+
The lower-level group object retrieved from the API.
|
81
|
+
|
82
|
+
Raises
|
83
|
+
------
|
84
|
+
ValueError
|
85
|
+
If the `_type` is None.
|
86
|
+
"""
|
87
|
+
...
|
88
|
+
|
@@ -1,92 +1,14 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.575565 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
-
import typing
|
10
|
-
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.monitor
|
12
|
-
import typing
|
13
|
-
import metaflow.event_logger
|
14
9
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
...
|
20
|
-
def init_system_monitor(self, flow_name: str, monitor: "metaflow.monitor.NullMonitor"):
|
21
|
-
...
|
22
|
-
@property
|
23
|
-
def monitor(self) -> typing.Optional["metaflow.monitor.NullMonitor"]:
|
24
|
-
...
|
25
|
-
def measure(self, name: str):
|
26
|
-
"""
|
27
|
-
Context manager to measure the execution duration and counter of a block of code.
|
28
|
-
|
29
|
-
Parameters
|
30
|
-
----------
|
31
|
-
name : str
|
32
|
-
The name to associate with the timer and counter.
|
33
|
-
|
34
|
-
Yields
|
35
|
-
------
|
36
|
-
None
|
37
|
-
"""
|
38
|
-
...
|
39
|
-
def count(self, name: str):
|
40
|
-
"""
|
41
|
-
Context manager to increment a counter.
|
42
|
-
|
43
|
-
Parameters
|
44
|
-
----------
|
45
|
-
name : str
|
46
|
-
The name of the counter.
|
47
|
-
|
48
|
-
Yields
|
49
|
-
------
|
50
|
-
None
|
51
|
-
"""
|
52
|
-
...
|
53
|
-
def gauge(self, gauge: "metaflow.monitor.Gauge"):
|
54
|
-
"""
|
55
|
-
Log a gauge.
|
56
|
-
|
57
|
-
Parameters
|
58
|
-
----------
|
59
|
-
gauge : metaflow.monitor.Gauge
|
60
|
-
The gauge to log.
|
61
|
-
"""
|
62
|
-
...
|
63
|
-
...
|
64
|
-
|
65
|
-
class SystemLogger(object, metaclass=type):
|
66
|
-
def __init__(self):
|
67
|
-
...
|
68
|
-
def __del__(self):
|
69
|
-
...
|
70
|
-
def init_system_logger(self, flow_name: str, logger: "metaflow.event_logger.NullEventLogger"):
|
71
|
-
...
|
72
|
-
@property
|
73
|
-
def logger(self) -> typing.Optional["metaflow.event_logger.NullEventLogger"]:
|
74
|
-
...
|
75
|
-
def log_event(self, level: str, module: str, name: str, payload: typing.Optional[typing.Any] = None):
|
76
|
-
"""
|
77
|
-
Log an event to the event logger.
|
78
|
-
|
79
|
-
Parameters
|
80
|
-
----------
|
81
|
-
level : str
|
82
|
-
Log level of the event. Can be one of "info", "warning", "error", "critical", "debug".
|
83
|
-
module : str
|
84
|
-
Module of the event. Usually the name of the class, function, or module that the event is being logged from.
|
85
|
-
name : str
|
86
|
-
Name of the event. Used to qualify the event type.
|
87
|
-
payload : Optional[Any], default None
|
88
|
-
Payload of the event. Contains the event data.
|
89
|
-
"""
|
90
|
-
...
|
91
|
-
...
|
10
|
+
from . import system_monitor as system_monitor
|
11
|
+
from .system_monitor import SystemMonitor as SystemMonitor
|
12
|
+
from . import system_logger as system_logger
|
13
|
+
from .system_logger import SystemLogger as SystemLogger
|
92
14
|
|
@@ -1,15 +1,16 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.600323 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import typing
|
12
11
|
import metaflow.event_logger
|
12
|
+
import typing
|
13
|
+
|
13
14
|
|
14
15
|
class SystemLogger(object, metaclass=type):
|
15
16
|
def __init__(self):
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.599913 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
@@ -10,6 +10,7 @@ import typing
|
|
10
10
|
if typing.TYPE_CHECKING:
|
11
11
|
import metaflow.monitor
|
12
12
|
|
13
|
+
|
13
14
|
class SystemMonitor(object, metaclass=type):
|
14
15
|
def __init__(self):
|
15
16
|
...
|
metaflow-stubs/tagging_util.pyi
CHANGED
@@ -1,17 +1,13 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.558598 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
-
import typing
|
10
|
-
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.exception
|
12
9
|
|
13
|
-
|
14
|
-
...
|
10
|
+
from .exception import MetaflowTaggingError as MetaflowTaggingError
|
15
11
|
|
16
12
|
def is_utf8_encodable(x):
|
17
13
|
"""
|
metaflow-stubs/tuple_util.pyi
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.561013 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
|
10
11
|
def namedtuple_with_defaults(typename, field_descr, defaults = ()):
|
11
12
|
...
|
12
13
|
|
metaflow-stubs/version.pyi
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
5
|
-
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.575284 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
|
10
11
|
metaflow_version: str
|
11
12
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: metaflow-stubs
|
3
|
-
Version: 2.12.
|
3
|
+
Version: 2.12.29
|
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.29
|
25
25
|
|
26
26
|
# Metaflow Stubs
|
27
27
|
|