ob-metaflow-stubs 6.0.3.117__py2.py3-none-any.whl → 6.0.3.118__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 +319 -2739
- 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 -13
- metaflow-stubs/metaflow_current.pyi +134 -133
- 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 +18 -130
- 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 +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 +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 +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 +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 +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 +8 -33
- 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 +6 -15
- 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.118.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.118.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.118.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.118.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,165 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.905160 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import metaflow
|
10
|
+
import typing
|
11
|
+
if typing.TYPE_CHECKING:
|
12
|
+
import metaflow.runner.deployer
|
13
|
+
import metaflow.plugins.argo.argo_workflows_deployer_objects
|
14
|
+
|
15
|
+
from ...client.core import get_metadata as get_metadata
|
16
|
+
from ...exception import MetaflowException as MetaflowException
|
17
|
+
from .argo_client import ArgoClient as ArgoClient
|
18
|
+
from .argo_workflows import ArgoWorkflows as ArgoWorkflows
|
19
|
+
from ...runner.deployer import Deployer as Deployer
|
20
|
+
from ...runner.deployer import DeployedFlow as DeployedFlow
|
21
|
+
from ...runner.deployer import TriggeredRun as TriggeredRun
|
22
|
+
from ...runner.utils import get_lower_level_group as get_lower_level_group
|
23
|
+
from ...runner.utils import handle_timeout as handle_timeout
|
24
|
+
|
25
|
+
KUBERNETES_NAMESPACE: str
|
26
|
+
|
27
|
+
def generate_fake_flow_file_contents(flow_name: str, param_info: dict, project_name: typing.Optional[str] = None):
|
28
|
+
...
|
29
|
+
|
30
|
+
class ArgoWorkflowsTriggeredRun(metaflow.runner.deployer.TriggeredRun, metaclass=type):
|
31
|
+
"""
|
32
|
+
A class representing a triggered Argo Workflow execution.
|
33
|
+
"""
|
34
|
+
def suspend(self, **kwargs) -> bool:
|
35
|
+
"""
|
36
|
+
Suspend the running workflow.
|
37
|
+
|
38
|
+
Parameters
|
39
|
+
----------
|
40
|
+
authorize : str, optional, default None
|
41
|
+
Authorize the suspension with a production token.
|
42
|
+
|
43
|
+
Returns
|
44
|
+
-------
|
45
|
+
bool
|
46
|
+
True if the command was successful, False otherwise.
|
47
|
+
"""
|
48
|
+
...
|
49
|
+
def unsuspend(self, **kwargs) -> bool:
|
50
|
+
"""
|
51
|
+
Unsuspend the suspended workflow.
|
52
|
+
|
53
|
+
Parameters
|
54
|
+
----------
|
55
|
+
authorize : str, optional, default None
|
56
|
+
Authorize the unsuspend with a production token.
|
57
|
+
|
58
|
+
Returns
|
59
|
+
-------
|
60
|
+
bool
|
61
|
+
True if the command was successful, False otherwise.
|
62
|
+
"""
|
63
|
+
...
|
64
|
+
def terminate(self, **kwargs) -> bool:
|
65
|
+
"""
|
66
|
+
Terminate the running workflow.
|
67
|
+
|
68
|
+
Parameters
|
69
|
+
----------
|
70
|
+
authorize : str, optional, default None
|
71
|
+
Authorize the termination with a production token.
|
72
|
+
|
73
|
+
Returns
|
74
|
+
-------
|
75
|
+
bool
|
76
|
+
True if the command was successful, False otherwise.
|
77
|
+
"""
|
78
|
+
...
|
79
|
+
@property
|
80
|
+
def status(self) -> typing.Optional[str]:
|
81
|
+
"""
|
82
|
+
Get the status of the triggered run.
|
83
|
+
|
84
|
+
Returns
|
85
|
+
-------
|
86
|
+
str, optional
|
87
|
+
The status of the workflow considering the run object, or None if
|
88
|
+
the status could not be retrieved.
|
89
|
+
"""
|
90
|
+
...
|
91
|
+
...
|
92
|
+
|
93
|
+
class ArgoWorkflowsDeployedFlow(metaflow.runner.deployer.DeployedFlow, metaclass=metaflow.runner.deployer.DeployedFlowMeta):
|
94
|
+
"""
|
95
|
+
A class representing a deployed Argo Workflow template.
|
96
|
+
"""
|
97
|
+
@classmethod
|
98
|
+
def from_deployment(cls, identifier: str, metadata: typing.Optional[str] = None):
|
99
|
+
"""
|
100
|
+
Retrieves a `ArgoWorkflowsDeployedFlow` object from an identifier and optional
|
101
|
+
metadata.
|
102
|
+
|
103
|
+
Parameters
|
104
|
+
----------
|
105
|
+
identifier : str
|
106
|
+
Deployer specific identifier for the workflow to retrieve
|
107
|
+
metadata : str, optional, default None
|
108
|
+
Optional deployer specific metadata.
|
109
|
+
|
110
|
+
Returns
|
111
|
+
-------
|
112
|
+
ArgoWorkflowsDeployedFlow
|
113
|
+
A `ArgoWorkflowsDeployedFlow` object representing the
|
114
|
+
deployed flow on argo workflows.
|
115
|
+
"""
|
116
|
+
...
|
117
|
+
@property
|
118
|
+
def production_token(self) -> typing.Optional[str]:
|
119
|
+
"""
|
120
|
+
Get the production token for the deployed flow.
|
121
|
+
|
122
|
+
Returns
|
123
|
+
-------
|
124
|
+
str, optional
|
125
|
+
The production token, None if it cannot be retrieved.
|
126
|
+
"""
|
127
|
+
...
|
128
|
+
def delete(self, **kwargs) -> bool:
|
129
|
+
"""
|
130
|
+
Delete the deployed workflow template.
|
131
|
+
|
132
|
+
Parameters
|
133
|
+
----------
|
134
|
+
authorize : str, optional, default None
|
135
|
+
Authorize the deletion with a production token.
|
136
|
+
|
137
|
+
Returns
|
138
|
+
-------
|
139
|
+
bool
|
140
|
+
True if the command was successful, False otherwise.
|
141
|
+
"""
|
142
|
+
...
|
143
|
+
def trigger(self, **kwargs) -> ArgoWorkflowsTriggeredRun:
|
144
|
+
"""
|
145
|
+
Trigger a new run for the deployed flow.
|
146
|
+
|
147
|
+
Parameters
|
148
|
+
----------
|
149
|
+
**kwargs : Any
|
150
|
+
Additional arguments to pass to the trigger command,
|
151
|
+
`Parameters` in particular.
|
152
|
+
|
153
|
+
Returns
|
154
|
+
-------
|
155
|
+
ArgoWorkflowsTriggeredRun
|
156
|
+
The triggered run instance.
|
157
|
+
|
158
|
+
Raises
|
159
|
+
------
|
160
|
+
Exception
|
161
|
+
If there is an error during the trigger process.
|
162
|
+
"""
|
163
|
+
...
|
164
|
+
...
|
165
|
+
|
@@ -1,9 +1,15 @@
|
|
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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.864440 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
from . import aws_utils as aws_utils
|
11
|
+
from . import step_functions as step_functions
|
12
|
+
from . import batch as batch
|
13
|
+
from . import aws_client as aws_client
|
14
|
+
from . import secrets_manager as secrets_manager
|
15
|
+
|
@@ -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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.896266 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
|
10
11
|
cached_aws_sandbox_creds: None
|
11
12
|
|
12
13
|
cached_provider_class: None
|
@@ -1,18 +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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.895540 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
-
|
11
|
-
def __init__(self, msg = "", lineno = None):
|
12
|
-
...
|
13
|
-
def __str__(self):
|
14
|
-
...
|
15
|
-
...
|
10
|
+
from ...exception import MetaflowException as MetaflowException
|
16
11
|
|
17
12
|
MAX_MEMORY_PER_TASK: None
|
18
13
|
|
@@ -1,9 +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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.895978 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
from . import batch_client as batch_client
|
11
|
+
from . import batch as batch
|
12
|
+
from . import batch_decorator as batch_decorator
|
13
|
+
|
@@ -1,46 +1,20 @@
|
|
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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.908382 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
+
import metaflow
|
9
10
|
import typing
|
10
11
|
if typing.TYPE_CHECKING:
|
11
12
|
import metaflow.exception
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
...
|
18
|
-
def clone(self, s3url):
|
19
|
-
...
|
20
|
-
@property
|
21
|
-
def bytes_read(self):
|
22
|
-
...
|
23
|
-
@property
|
24
|
-
def tail(self):
|
25
|
-
...
|
26
|
-
def __iter__(self):
|
27
|
-
...
|
28
|
-
def _make_range_request(self, *args, **kwargs):
|
29
|
-
...
|
30
|
-
...
|
31
|
-
|
32
|
-
def sanitize_batch_tag(key, value):
|
33
|
-
"""
|
34
|
-
Sanitize a key and value for use as a Batch tag.
|
35
|
-
"""
|
36
|
-
...
|
37
|
-
|
38
|
-
class MetaflowException(Exception, metaclass=type):
|
39
|
-
def __init__(self, msg = "", lineno = None):
|
40
|
-
...
|
41
|
-
def __str__(self):
|
42
|
-
...
|
43
|
-
...
|
14
|
+
from ...datatools.s3.s3tail import S3Tail as S3Tail
|
15
|
+
from ..aws_utils import sanitize_batch_tag as sanitize_batch_tag
|
16
|
+
from ....exception import MetaflowException as MetaflowException
|
17
|
+
from .batch_client import BatchClient as BatchClient
|
44
18
|
|
45
19
|
OTEL_ENDPOINT: None
|
46
20
|
|
@@ -68,25 +42,6 @@ S3_SERVER_SIDE_ENCRYPTION: None
|
|
68
42
|
|
69
43
|
BASH_SAVE_LOGS: str
|
70
44
|
|
71
|
-
class BatchClient(object, metaclass=type):
|
72
|
-
def __init__(self):
|
73
|
-
...
|
74
|
-
def active_job_queues(self):
|
75
|
-
...
|
76
|
-
def unfinished_jobs(self):
|
77
|
-
...
|
78
|
-
def describe_jobs(self, job_ids):
|
79
|
-
...
|
80
|
-
def describe_job_queue(self, job_queue):
|
81
|
-
...
|
82
|
-
def job(self):
|
83
|
-
...
|
84
|
-
def attach_job(self, job_id):
|
85
|
-
...
|
86
|
-
def region(self):
|
87
|
-
...
|
88
|
-
...
|
89
|
-
|
90
45
|
LOGS_DIR: str
|
91
46
|
|
92
47
|
STDOUT_FILE: str
|
@@ -1,21 +1,17 @@
|
|
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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.907510 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
+
import metaflow
|
9
10
|
import typing
|
10
11
|
if typing.TYPE_CHECKING:
|
11
12
|
import metaflow.exception
|
12
13
|
|
13
|
-
|
14
|
-
def __init__(self, msg = "", lineno = None):
|
15
|
-
...
|
16
|
-
def __str__(self):
|
17
|
-
...
|
18
|
-
...
|
14
|
+
from ....exception import MetaflowException as MetaflowException
|
19
15
|
|
20
16
|
AWS_SANDBOX_ENABLED: bool
|
21
17
|
|
@@ -1,80 +1,25 @@
|
|
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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.908960 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
+
import metaflow
|
9
10
|
import typing
|
10
11
|
if typing.TYPE_CHECKING:
|
11
12
|
import metaflow.decorators
|
12
|
-
import metaflow.metaflow_current
|
13
|
-
import metaflow.exception
|
14
13
|
|
15
|
-
current
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
You can choose the compute layer on the command line by executing e.g.
|
25
|
-
```
|
26
|
-
python myflow.py run --with batch
|
27
|
-
```
|
28
|
-
or
|
29
|
-
```
|
30
|
-
python myflow.py run --with kubernetes
|
31
|
-
```
|
32
|
-
which executes the flow on the desired system using the
|
33
|
-
requirements specified in `@resources`.
|
34
|
-
|
35
|
-
Parameters
|
36
|
-
----------
|
37
|
-
cpu : int, default 1
|
38
|
-
Number of CPUs required for this step.
|
39
|
-
gpu : int, optional, default None
|
40
|
-
Number of GPUs required for this step.
|
41
|
-
disk : int, optional, default None
|
42
|
-
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
43
|
-
memory : int, default 4096
|
44
|
-
Memory size (in MB) required for this step.
|
45
|
-
shared_memory : int, optional, default None
|
46
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
47
|
-
This parameter maps to the `--shm-size` option in Docker.
|
48
|
-
"""
|
49
|
-
...
|
50
|
-
|
51
|
-
def get_run_time_limit_for_task(step_decos):
|
52
|
-
...
|
53
|
-
|
54
|
-
class MetaDatum(tuple, metaclass=type):
|
55
|
-
"""
|
56
|
-
MetaDatum(field, value, type, tags)
|
57
|
-
"""
|
58
|
-
@staticmethod
|
59
|
-
def __new__(_cls, field, value, type, tags):
|
60
|
-
"""
|
61
|
-
Create new instance of MetaDatum(field, value, type, tags)
|
62
|
-
"""
|
63
|
-
...
|
64
|
-
def __repr__(self):
|
65
|
-
"""
|
66
|
-
Return a nicely formatted representation string
|
67
|
-
"""
|
68
|
-
...
|
69
|
-
def __getnewargs__(self):
|
70
|
-
"""
|
71
|
-
Return self as a plain tuple. Used by copy and pickle.
|
72
|
-
"""
|
73
|
-
...
|
74
|
-
...
|
75
|
-
|
76
|
-
def sync_local_metadata_to_datastore(metadata_local_dir, task_ds):
|
77
|
-
...
|
14
|
+
from ....metaflow_current import current as current
|
15
|
+
from ...resources_decorator import ResourcesDecorator as ResourcesDecorator
|
16
|
+
from ...timeout_decorator import get_run_time_limit_for_task as get_run_time_limit_for_task
|
17
|
+
from ....metadata_provider.metadata import MetaDatum as MetaDatum
|
18
|
+
from ....metadata_provider.util import sync_local_metadata_to_datastore as sync_local_metadata_to_datastore
|
19
|
+
from .batch import BatchException as BatchException
|
20
|
+
from ..aws_utils import compute_resource_attributes as compute_resource_attributes
|
21
|
+
from ..aws_utils import get_docker_registry as get_docker_registry
|
22
|
+
from ..aws_utils import get_ec2_instance_metadata as get_ec2_instance_metadata
|
78
23
|
|
79
24
|
ECS_S3_ACCESS_IAM_ROLE: None
|
80
25
|
|
@@ -90,76 +35,6 @@ DATASTORE_LOCAL_DIR: str
|
|
90
35
|
|
91
36
|
UBF_CONTROL: str
|
92
37
|
|
93
|
-
class BatchException(metaflow.exception.MetaflowException, metaclass=type):
|
94
|
-
...
|
95
|
-
|
96
|
-
def compute_resource_attributes(decos, compute_deco, step_name, resource_defaults):
|
97
|
-
"""
|
98
|
-
Compute resource values taking into account defaults, the values specified
|
99
|
-
in the compute decorator (like @batch or @kubernetes) directly, and
|
100
|
-
resources specified via @resources decorator.
|
101
|
-
|
102
|
-
Returns a dictionary of resource attr -> value (str).
|
103
|
-
"""
|
104
|
-
...
|
105
|
-
|
106
|
-
def get_docker_registry(image_uri):
|
107
|
-
"""
|
108
|
-
Explanation:
|
109
|
-
(.+?(?:[:.].+?)\/)? - [GROUP 0] REGISTRY
|
110
|
-
.+? - A registry must start with at least one character
|
111
|
-
(?:[:.].+?)\/ - A registry must have ":" or "." and end with "/"
|
112
|
-
? - Make a registry optional
|
113
|
-
(.*?) - [GROUP 1] REPOSITORY
|
114
|
-
.*? - Get repository name until separator
|
115
|
-
(?:[@:])? - SEPARATOR
|
116
|
-
?: - Don't capture separator
|
117
|
-
[@:] - The separator must be either "@" or ":"
|
118
|
-
? - The separator is optional
|
119
|
-
((?<=[@:]).*)? - [GROUP 2] TAG / DIGEST
|
120
|
-
(?<=[@:]) - A tag / digest must be preceded by "@" or ":"
|
121
|
-
.* - Capture rest of tag / digest
|
122
|
-
? - A tag / digest is optional
|
123
|
-
Examples:
|
124
|
-
image
|
125
|
-
- None
|
126
|
-
- image
|
127
|
-
- None
|
128
|
-
example/image
|
129
|
-
- None
|
130
|
-
- example/image
|
131
|
-
- None
|
132
|
-
example/image:tag
|
133
|
-
- None
|
134
|
-
- example/image
|
135
|
-
- tag
|
136
|
-
example.domain.com/example/image:tag
|
137
|
-
- example.domain.com/
|
138
|
-
- example/image
|
139
|
-
- tag
|
140
|
-
123.123.123.123:123/example/image:tag
|
141
|
-
- 123.123.123.123:123/
|
142
|
-
- example/image
|
143
|
-
- tag
|
144
|
-
example.domain.com/example/image@sha256:45b23dee0
|
145
|
-
- example.domain.com/
|
146
|
-
- example/image
|
147
|
-
- sha256:45b23dee0
|
148
|
-
"""
|
149
|
-
...
|
150
|
-
|
151
|
-
def get_ec2_instance_metadata():
|
152
|
-
"""
|
153
|
-
Fetches the EC2 instance metadata through AWS instance metadata service
|
154
|
-
|
155
|
-
Returns either an empty dictionary, or one with the keys
|
156
|
-
- ec2-instance-id
|
157
|
-
- ec2-instance-type
|
158
|
-
- ec2-region
|
159
|
-
- ec2-availability-zone
|
160
|
-
"""
|
161
|
-
...
|
162
|
-
|
163
38
|
class BatchDecorator(metaflow.decorators.StepDecorator, metaclass=type):
|
164
39
|
"""
|
165
40
|
Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
|
@@ -1,9 +1,11 @@
|
|
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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.896465 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
from . import aws_secrets_manager_secrets_provider as aws_secrets_manager_secrets_provider
|
11
|
+
|
@@ -1,35 +1,24 @@
|
|
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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.909265 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
+
import metaflow
|
10
|
+
import abc
|
9
11
|
import typing
|
10
12
|
if typing.TYPE_CHECKING:
|
13
|
+
import metaflow.exception
|
11
14
|
import metaflow.plugins.secrets
|
12
15
|
import abc
|
13
|
-
import metaflow.exception
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
...
|
18
|
-
def __str__(self):
|
19
|
-
...
|
20
|
-
...
|
17
|
+
from ....exception import MetaflowException as MetaflowException
|
18
|
+
from ...secrets import SecretsProvider as SecretsProvider
|
21
19
|
|
22
20
|
AWS_SECRETS_MANAGER_DEFAULT_REGION: None
|
23
21
|
|
24
|
-
class SecretsProvider(abc.ABC, metaclass=abc.ABCMeta):
|
25
|
-
def get_secret_as_dict(self, secret_id, options = {}, role = None) -> typing.Dict[str, str]:
|
26
|
-
"""
|
27
|
-
Retrieve the secret from secrets backend, and return a dictionary of
|
28
|
-
environment variables.
|
29
|
-
"""
|
30
|
-
...
|
31
|
-
...
|
32
|
-
|
33
22
|
class MetaflowAWSSecretsManagerBadResponse(metaflow.exception.MetaflowException, metaclass=type):
|
34
23
|
"""
|
35
24
|
Raised when the response from AWS Secrets Manager is not valid in some way
|
@@ -1,9 +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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.895754 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
from . import schedule_decorator as schedule_decorator
|
11
|
+
from . import step_functions_deployer as step_functions_deployer
|
12
|
+
from . import production_token as production_token
|
13
|
+
|
@@ -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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.924243 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
|
10
11
|
class EventBridgeClient(object, metaclass=type):
|
11
12
|
def __init__(self, name):
|
12
13
|
...
|
@@ -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.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-11-13T23:34:52.905728 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
|
10
11
|
def new_token(token_prefix, prev_token = None):
|
11
12
|
...
|
12
13
|
|