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.
- metaflow-stubs/__init__.pyi +318 -2738
- 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 +7 -6
- metaflow-stubs/exception.pyi +8 -6
- metaflow-stubs/flowspec.pyi +20 -104
- 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 -13
- metaflow-stubs/metaflow_current.pyi +45 -44
- metaflow-stubs/mf_extensions/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +129 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +26 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +156 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +25 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +111 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +188 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +30 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +28 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +19 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +115 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +40 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +71 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +56 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +67 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +49 -0
- metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +130 -0
- metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +42 -0
- metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +17 -0
- 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 +52 -165
- metaflow-stubs/plugins/airflow/__init__.pyi +9 -5
- 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 +17 -129
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +11 -403
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +63 -448
- 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 +9 -5
- metaflow-stubs/plugins/aws/batch/batch.pyi +10 -55
- 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 +9 -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_client.pyi +6 -5
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +52 -292
- 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 +14 -76
- 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 +13 -81
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +13 -96
- metaflow-stubs/plugins/cards/card_modules/card.pyi +6 -5
- metaflow-stubs/plugins/cards/card_modules/components.pyi +24 -107
- 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 +15 -263
- 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 +12 -5
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +6 -10
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +10 -38
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +16 -155
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +7 -11
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +19 -142
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +7 -11
- metaflow-stubs/plugins/logs_cli.pyi +10 -9
- metaflow-stubs/plugins/package_cli.pyi +7 -5
- metaflow-stubs/plugins/parallel_decorator.pyi +11 -59
- metaflow-stubs/plugins/perimeters.pyi +6 -11
- 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 +8 -13
- 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/profilers/__init__.pyi +7 -11
- metaflow-stubs/pylint_wrapper.pyi +7 -11
- metaflow-stubs/runner/__init__.pyi +13 -5
- metaflow-stubs/runner/deployer.pyi +99 -223
- 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 -107
- metaflow-stubs/system/system_logger.pyi +7 -16
- metaflow-stubs/system/system_monitor.pyi +6 -16
- metaflow-stubs/tagging_util.pyi +6 -10
- metaflow-stubs/tuple_util.pyi +6 -5
- {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.119.dist-info/RECORD +174 -0
- metaflow-stubs/metadata/util.pyi +0 -18
- ob_metaflow_stubs-6.0.3.117.dist-info/RECORD +0 -140
- {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.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.30.2+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-21T22:12:20.811897 #
|
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.30.2+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-21T22:12:20.825145 #
|
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.30.2+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-21T22:12:20.825656 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import tempfile
|
12
|
+
import metaflow.runner.click_api
|
13
|
+
import typing
|
14
|
+
import metaflow.runner.subprocess_manager
|
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,112 +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.30.2+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-21T22:12:20.814393 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
-
import typing
|
10
|
-
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.event_logger
|
12
|
-
import metaflow.monitor
|
13
|
-
import typing
|
14
9
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
...
|
20
|
-
def update_context(self, context: typing.Dict[str, typing.Any]):
|
21
|
-
"""
|
22
|
-
Update the global context maintained by the system monitor.
|
23
|
-
|
24
|
-
Parameters
|
25
|
-
----------
|
26
|
-
context : Dict[str, Any]
|
27
|
-
A dictionary containing the context to update.
|
28
|
-
"""
|
29
|
-
...
|
30
|
-
def init_system_monitor(self, flow_name: str, monitor: "metaflow.monitor.NullMonitor"):
|
31
|
-
...
|
32
|
-
@property
|
33
|
-
def monitor(self) -> typing.Optional["metaflow.monitor.NullMonitor"]:
|
34
|
-
...
|
35
|
-
def measure(self, name: str):
|
36
|
-
"""
|
37
|
-
Context manager to measure the execution duration and counter of a block of code.
|
38
|
-
|
39
|
-
Parameters
|
40
|
-
----------
|
41
|
-
name : str
|
42
|
-
The name to associate with the timer and counter.
|
43
|
-
|
44
|
-
Yields
|
45
|
-
------
|
46
|
-
None
|
47
|
-
"""
|
48
|
-
...
|
49
|
-
def count(self, name: str):
|
50
|
-
"""
|
51
|
-
Context manager to increment a counter.
|
52
|
-
|
53
|
-
Parameters
|
54
|
-
----------
|
55
|
-
name : str
|
56
|
-
The name of the counter.
|
57
|
-
|
58
|
-
Yields
|
59
|
-
------
|
60
|
-
None
|
61
|
-
"""
|
62
|
-
...
|
63
|
-
def gauge(self, gauge: "metaflow.monitor.Gauge"):
|
64
|
-
"""
|
65
|
-
Log a gauge.
|
66
|
-
|
67
|
-
Parameters
|
68
|
-
----------
|
69
|
-
gauge : metaflow.monitor.Gauge
|
70
|
-
The gauge to log.
|
71
|
-
"""
|
72
|
-
...
|
73
|
-
...
|
74
|
-
|
75
|
-
class SystemLogger(object, metaclass=type):
|
76
|
-
def __init__(self):
|
77
|
-
...
|
78
|
-
def __del__(self):
|
79
|
-
...
|
80
|
-
def update_context(self, context: typing.Dict[str, typing.Any]):
|
81
|
-
"""
|
82
|
-
Update the global context maintained by the system logger.
|
83
|
-
|
84
|
-
Parameters
|
85
|
-
----------
|
86
|
-
context : Dict[str, Any]
|
87
|
-
A dictionary containing the context to update.
|
88
|
-
"""
|
89
|
-
...
|
90
|
-
def init_system_logger(self, flow_name: str, logger: "metaflow.event_logger.NullEventLogger"):
|
91
|
-
...
|
92
|
-
@property
|
93
|
-
def logger(self) -> typing.Optional["metaflow.event_logger.NullEventLogger"]:
|
94
|
-
...
|
95
|
-
def log_event(self, level: str, module: str, name: str, payload: typing.Optional[typing.Any] = None):
|
96
|
-
"""
|
97
|
-
Log an event to the event logger.
|
98
|
-
|
99
|
-
Parameters
|
100
|
-
----------
|
101
|
-
level : str
|
102
|
-
Log level of the event. Can be one of "info", "warning", "error", "critical", "debug".
|
103
|
-
module : str
|
104
|
-
Module of the event. Usually the name of the class, function, or module that the event is being logged from.
|
105
|
-
name : str
|
106
|
-
Name of the event. Used to qualify the event type.
|
107
|
-
payload : Optional[Any], default None
|
108
|
-
Payload of the event. Contains the event data.
|
109
|
-
"""
|
110
|
-
...
|
111
|
-
...
|
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
|
112
14
|
|
@@ -1,31 +1,22 @@
|
|
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.30.2+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-21T22:12:20.837051 #
|
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
15
|
class SystemLogger(object, metaclass=type):
|
15
16
|
def __init__(self):
|
16
17
|
...
|
17
18
|
def __del__(self):
|
18
19
|
...
|
19
|
-
def update_context(self, context: typing.Dict[str, typing.Any]):
|
20
|
-
"""
|
21
|
-
Update the global context maintained by the system logger.
|
22
|
-
|
23
|
-
Parameters
|
24
|
-
----------
|
25
|
-
context : Dict[str, Any]
|
26
|
-
A dictionary containing the context to update.
|
27
|
-
"""
|
28
|
-
...
|
29
20
|
def init_system_logger(self, flow_name: str, logger: "metaflow.event_logger.NullEventLogger"):
|
30
21
|
...
|
31
22
|
@property
|
@@ -1,31 +1,21 @@
|
|
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.30.2+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-21T22:12:20.836713 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
11
|
import metaflow.monitor
|
12
|
-
|
12
|
+
|
13
13
|
|
14
14
|
class SystemMonitor(object, metaclass=type):
|
15
15
|
def __init__(self):
|
16
16
|
...
|
17
17
|
def __del__(self):
|
18
18
|
...
|
19
|
-
def update_context(self, context: typing.Dict[str, typing.Any]):
|
20
|
-
"""
|
21
|
-
Update the global context maintained by the system monitor.
|
22
|
-
|
23
|
-
Parameters
|
24
|
-
----------
|
25
|
-
context : Dict[str, Any]
|
26
|
-
A dictionary containing the context to update.
|
27
|
-
"""
|
28
|
-
...
|
29
19
|
def init_system_monitor(self, flow_name: str, monitor: "metaflow.monitor.NullMonitor"):
|
30
20
|
...
|
31
21
|
@property
|
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.30.2+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-21T22:12:20.801242 #
|
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.30.2+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-21T22:12:20.802639 #
|
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
|
|