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
@@ -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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.641811 #
|
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,23 +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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.642795 #
|
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 ...._vendor import click as click
|
11
|
+
from ....exception import CommandException as CommandException
|
12
|
+
from ....metadata_provider.util import sync_local_metadata_from_datastore as sync_local_metadata_from_datastore
|
13
|
+
from .batch import Batch as Batch
|
14
|
+
from .batch import BatchKilledException as BatchKilledException
|
15
15
|
|
16
16
|
METAFLOW_EXIT_DISALLOW_RETRY: int
|
17
17
|
|
18
|
-
def sync_local_metadata_from_datastore(metadata_local_dir, task_ds):
|
19
|
-
...
|
20
|
-
|
21
18
|
DATASTORE_LOCAL_DIR: str
|
22
19
|
|
23
20
|
TASK_LOG_SOURCE: str
|
@@ -26,21 +23,3 @@ UBF_CONTROL: str
|
|
26
23
|
|
27
24
|
UBF_TASK: str
|
28
25
|
|
29
|
-
class Batch(object, metaclass=type):
|
30
|
-
def __init__(self, metadata, environment):
|
31
|
-
...
|
32
|
-
def list_jobs(self, flow_name, run_id, user, echo):
|
33
|
-
...
|
34
|
-
def kill_jobs(self, flow_name, run_id, user, echo):
|
35
|
-
...
|
36
|
-
def create_job(self, step_name, step_cli, task_spec, code_package_sha, code_package_url, code_package_ds, image, queue, iam_role = None, execution_role = None, cpu = None, gpu = None, memory = None, run_time_limit = None, shared_memory = None, max_swap = None, swappiness = None, inferentia = None, efa = None, env = {}, attrs = {}, host_volumes = None, efs_volumes = None, use_tmpfs = None, tmpfs_tempdir = None, tmpfs_size = None, tmpfs_path = None, num_parallel = 0, ephemeral_storage = None, log_driver = None, log_options = None):
|
37
|
-
...
|
38
|
-
def launch_job(self, step_name, step_cli, task_spec, code_package_sha, code_package_url, code_package_ds, image, queue, iam_role = None, execution_role = None, cpu = None, gpu = None, memory = None, run_time_limit = None, shared_memory = None, max_swap = None, swappiness = None, inferentia = None, efa = None, host_volumes = None, efs_volumes = None, use_tmpfs = None, tmpfs_tempdir = None, tmpfs_size = None, tmpfs_path = None, num_parallel = 0, env = {}, attrs = {}, ephemeral_storage = None, log_driver = None, log_options = None):
|
39
|
-
...
|
40
|
-
def wait(self, stdout_location, stderr_location, echo = None):
|
41
|
-
...
|
42
|
-
...
|
43
|
-
|
44
|
-
class BatchKilledException(metaflow.exception.MetaflowException, metaclass=type):
|
45
|
-
...
|
46
|
-
|
@@ -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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.640821 #
|
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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.642503 #
|
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, 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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.612937 #
|
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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.643145 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
|
+
import abc
|
10
|
+
import metaflow
|
9
11
|
import typing
|
10
12
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.plugins.secrets
|
12
13
|
import abc
|
13
14
|
import metaflow.exception
|
15
|
+
import metaflow.plugins.secrets
|
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,19 @@
|
|
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.611812 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
from . import dynamo_db_client as dynamo_db_client
|
11
|
+
from . import step_functions_decorator as step_functions_decorator
|
12
|
+
from . import schedule_decorator as schedule_decorator
|
13
|
+
from . import step_functions_deployer as step_functions_deployer
|
14
|
+
from . import production_token as production_token
|
15
|
+
from . import event_bridge_client as event_bridge_client
|
16
|
+
from . import step_functions_client as step_functions_client
|
17
|
+
from . import step_functions as step_functions
|
18
|
+
from . import step_functions_cli as step_functions_cli
|
19
|
+
|
@@ -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.635242 #
|
5
|
+
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
|
10
|
+
|
10
11
|
SFN_DYNAMO_DB_TABLE: None
|
11
12
|
|
12
13
|
class DynamoDbClient(object, metaclass=type):
|
@@ -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.636608 #
|
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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.634972 #
|
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
|
|
@@ -1,15 +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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.635787 #
|
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
13
|
|
14
|
+
|
13
15
|
class ScheduleDecorator(metaflow.decorators.FlowDecorator, metaclass=type):
|
14
16
|
"""
|
15
17
|
Specifies the times when the flow should be run when running on a
|
@@ -1,21 +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.29 #
|
4
|
+
# Generated on 2024-11-07T22:19:34.638569 #
|
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
|
-
...
|
14
|
+
from ....exception import MetaflowException as MetaflowException
|
15
|
+
from ....parameters import deploy_time_eval as deploy_time_eval
|
16
|
+
from ..batch.batch import Batch as Batch
|
17
|
+
from .event_bridge_client import EventBridgeClient as EventBridgeClient
|
18
|
+
from .step_functions_client import StepFunctionsClient as StepFunctionsClient
|
19
19
|
|
20
20
|
EVENTS_SFN_ACCESS_IAM_ROLE: None
|
21
21
|
|
@@ -29,60 +29,6 @@ SFN_IAM_ROLE: None
|
|
29
29
|
|
30
30
|
SFN_S3_DISTRIBUTED_MAP_OUTPUT_PATH: None
|
31
31
|
|
32
|
-
def deploy_time_eval(value):
|
33
|
-
...
|
34
|
-
|
35
|
-
class Batch(object, metaclass=type):
|
36
|
-
def __init__(self, metadata, environment):
|
37
|
-
...
|
38
|
-
def list_jobs(self, flow_name, run_id, user, echo):
|
39
|
-
...
|
40
|
-
def kill_jobs(self, flow_name, run_id, user, echo):
|
41
|
-
...
|
42
|
-
def create_job(self, step_name, step_cli, task_spec, code_package_sha, code_package_url, code_package_ds, image, queue, iam_role = None, execution_role = None, cpu = None, gpu = None, memory = None, run_time_limit = None, shared_memory = None, max_swap = None, swappiness = None, inferentia = None, efa = None, env = {}, attrs = {}, host_volumes = None, efs_volumes = None, use_tmpfs = None, tmpfs_tempdir = None, tmpfs_size = None, tmpfs_path = None, num_parallel = 0, ephemeral_storage = None, log_driver = None, log_options = None):
|
43
|
-
...
|
44
|
-
def launch_job(self, step_name, step_cli, task_spec, code_package_sha, code_package_url, code_package_ds, image, queue, iam_role = None, execution_role = None, cpu = None, gpu = None, memory = None, run_time_limit = None, shared_memory = None, max_swap = None, swappiness = None, inferentia = None, efa = None, host_volumes = None, efs_volumes = None, use_tmpfs = None, tmpfs_tempdir = None, tmpfs_size = None, tmpfs_path = None, num_parallel = 0, env = {}, attrs = {}, ephemeral_storage = None, log_driver = None, log_options = None):
|
45
|
-
...
|
46
|
-
def wait(self, stdout_location, stderr_location, echo = None):
|
47
|
-
...
|
48
|
-
...
|
49
|
-
|
50
|
-
class EventBridgeClient(object, metaclass=type):
|
51
|
-
def __init__(self, name):
|
52
|
-
...
|
53
|
-
def cron(self, cron):
|
54
|
-
...
|
55
|
-
def role_arn(self, role_arn):
|
56
|
-
...
|
57
|
-
def state_machine_arn(self, state_machine_arn):
|
58
|
-
...
|
59
|
-
def schedule(self):
|
60
|
-
...
|
61
|
-
def delete(self):
|
62
|
-
...
|
63
|
-
...
|
64
|
-
|
65
|
-
class StepFunctionsClient(object, metaclass=type):
|
66
|
-
def __init__(self):
|
67
|
-
...
|
68
|
-
def search(self, name):
|
69
|
-
...
|
70
|
-
def push(self, name, definition, role_arn, log_execution_history):
|
71
|
-
...
|
72
|
-
def get(self, name):
|
73
|
-
...
|
74
|
-
def trigger(self, state_machine_arn, input):
|
75
|
-
...
|
76
|
-
def list_executions(self, state_machine_arn, states):
|
77
|
-
...
|
78
|
-
def terminate_execution(self, execution_arn):
|
79
|
-
...
|
80
|
-
def get_state_machine_arn(self, name):
|
81
|
-
...
|
82
|
-
def delete(self, name):
|
83
|
-
...
|
84
|
-
...
|
85
|
-
|
86
32
|
class StepFunctionsException(metaflow.exception.MetaflowException, metaclass=type):
|
87
33
|
...
|
88
34
|
|