metaflow-stubs 2.16.8__py2.py3-none-any.whl → 2.17.1__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.
Potentially problematic release.
This version of metaflow-stubs might be problematic. Click here for more details.
- metaflow-stubs/__init__.pyi +592 -592
- metaflow-stubs/cards.pyi +2 -2
- metaflow-stubs/cli.pyi +2 -2
- metaflow-stubs/cli_components/__init__.pyi +2 -2
- metaflow-stubs/cli_components/utils.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +2 -2
- metaflow-stubs/client/core.pyi +5 -5
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/events.pyi +2 -2
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +5 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +3 -3
- metaflow-stubs/meta_files.pyi +2 -2
- metaflow-stubs/metadata_provider/__init__.pyi +2 -2
- metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
- metaflow-stubs/metadata_provider/metadata.pyi +2 -2
- metaflow-stubs/metadata_provider/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -2
- metaflow-stubs/metaflow_current.pyi +28 -28
- metaflow-stubs/metaflow_git.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/packaging_sys/__init__.pyi +6 -6
- metaflow-stubs/packaging_sys/backend.pyi +3 -3
- metaflow-stubs/packaging_sys/distribution_support.pyi +3 -3
- metaflow-stubs/packaging_sys/tar_backend.pyi +4 -4
- metaflow-stubs/packaging_sys/utils.pyi +2 -2
- metaflow-stubs/packaging_sys/v1.pyi +2 -2
- metaflow-stubs/parameters.pyi +4 -4
- metaflow-stubs/plugins/__init__.pyi +13 -13
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
- metaflow-stubs/plugins/airflow/exception.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +2 -2
- metaflow-stubs/plugins/argo/exit_hooks.pyi +2 -2
- metaflow-stubs/plugins/aws/__init__.pyi +3 -3
- metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +3 -3
- metaflow-stubs/plugins/azure/__init__.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
- metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/cards/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_client.pyi +3 -3
- metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
- metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
- metaflow-stubs/plugins/debug_logger.pyi +2 -2
- metaflow-stubs/plugins/debug_monitor.pyi +2 -2
- metaflow-stubs/plugins/environment_decorator.pyi +2 -2
- metaflow-stubs/plugins/events_decorator.pyi +2 -2
- metaflow-stubs/plugins/exit_hook/__init__.pyi +2 -2
- metaflow-stubs/plugins/exit_hook/exit_hook_decorator.pyi +2 -2
- metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
- metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
- metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
- metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
- metaflow-stubs/plugins/project_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +5 -5
- metaflow-stubs/plugins/pypi/parsers.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_func.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_spec.pyi +2 -2
- metaflow-stubs/plugins/secrets/utils.pyi +2 -2
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
- metaflow-stubs/plugins/uv/__init__.pyi +2 -2
- metaflow-stubs/plugins/uv/uv_environment.pyi +3 -3
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/deployer.pyi +6 -6
- metaflow-stubs/runner/deployer_impl.pyi +10 -2
- metaflow-stubs/runner/metaflow_runner.pyi +3 -3
- metaflow-stubs/runner/nbdeploy.pyi +2 -2
- metaflow-stubs/runner/nbrun.pyi +2 -2
- metaflow-stubs/runner/subprocess_manager.pyi +2 -2
- metaflow-stubs/runner/utils.pyi +3 -3
- metaflow-stubs/system/__init__.pyi +2 -2
- metaflow-stubs/system/system_logger.pyi +2 -2
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- metaflow-stubs/user_configs/__init__.pyi +2 -2
- metaflow-stubs/user_configs/config_options.pyi +3 -3
- metaflow-stubs/user_configs/config_parameters.pyi +6 -6
- metaflow-stubs/user_decorators/__init__.pyi +2 -2
- metaflow-stubs/user_decorators/common.pyi +2 -2
- metaflow-stubs/user_decorators/mutable_flow.pyi +4 -4
- metaflow-stubs/user_decorators/mutable_step.pyi +5 -5
- metaflow-stubs/user_decorators/user_flow_decorator.pyi +3 -3
- metaflow-stubs/user_decorators/user_step_decorator.pyi +5 -5
- metaflow-stubs/version.pyi +2 -2
- {metaflow_stubs-2.16.8.dist-info → metaflow_stubs-2.17.1.dist-info}/METADATA +2 -2
- metaflow_stubs-2.17.1.dist-info/RECORD +166 -0
- metaflow_stubs-2.16.8.dist-info/RECORD +0 -166
- {metaflow_stubs-2.16.8.dist-info → metaflow_stubs-2.17.1.dist-info}/WHEEL +0 -0
- {metaflow_stubs-2.16.8.dist-info → metaflow_stubs-2.17.1.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
######################################################################################################
|
|
2
2
|
# Auto-generated Metaflow stub file #
|
|
3
|
-
# MF version: 2.
|
|
4
|
-
# Generated on 2025-
|
|
3
|
+
# MF version: 2.17.1 #
|
|
4
|
+
# Generated on 2025-08-11T22:07:35.926648 #
|
|
5
5
|
######################################################################################################
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
@@ -47,8 +47,8 @@ from . import plugins as plugins
|
|
|
47
47
|
from .plugins.datatools.s3.s3 import S3 as S3
|
|
48
48
|
from . import includefile as includefile
|
|
49
49
|
from .includefile import IncludeFile as IncludeFile
|
|
50
|
-
from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
|
|
51
50
|
from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
|
|
51
|
+
from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
|
|
52
52
|
from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
|
|
53
53
|
from . import cards as cards
|
|
54
54
|
from . import client as client
|
|
@@ -153,110 +153,41 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
|
153
153
|
...
|
|
154
154
|
|
|
155
155
|
@typing.overload
|
|
156
|
-
def
|
|
156
|
+
def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: typing.Optional[str] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
157
157
|
"""
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
|
159
|
+
the execution of a step.
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
Parameters
|
|
163
|
+
----------
|
|
164
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
|
165
|
+
List of secret specs, defining how the secrets are to be retrieved
|
|
166
|
+
role : str, optional, default: None
|
|
167
|
+
Role to use for fetching secrets
|
|
160
168
|
"""
|
|
161
169
|
...
|
|
162
170
|
|
|
163
171
|
@typing.overload
|
|
164
|
-
def
|
|
172
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
165
173
|
...
|
|
166
174
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
Decorator prototype for all step decorators. This function gets specialized
|
|
170
|
-
and imported for all decorators types by _import_plugin_decorators().
|
|
171
|
-
"""
|
|
175
|
+
@typing.overload
|
|
176
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
172
177
|
...
|
|
173
178
|
|
|
174
|
-
def
|
|
179
|
+
def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: typing.Optional[str] = None):
|
|
175
180
|
"""
|
|
176
|
-
Specifies
|
|
181
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
|
182
|
+
the execution of a step.
|
|
177
183
|
|
|
178
184
|
|
|
179
185
|
Parameters
|
|
180
186
|
----------
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
Memory size (in MB) required for this step. If
|
|
186
|
-
`@resources` is also present, the maximum value from all decorators is
|
|
187
|
-
used.
|
|
188
|
-
disk : int, default 10240
|
|
189
|
-
Disk size (in MB) required for this step. If
|
|
190
|
-
`@resources` is also present, the maximum value from all decorators is
|
|
191
|
-
used.
|
|
192
|
-
image : str, optional, default None
|
|
193
|
-
Docker image to use when launching on Kubernetes. If not specified, and
|
|
194
|
-
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
|
195
|
-
not, a default Docker image mapping to the current version of Python is used.
|
|
196
|
-
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
|
197
|
-
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
|
198
|
-
image_pull_secrets: List[str], default []
|
|
199
|
-
The default is extracted from METAFLOW_KUBERNETES_IMAGE_PULL_SECRETS.
|
|
200
|
-
Kubernetes image pull secrets to use when pulling container images
|
|
201
|
-
in Kubernetes.
|
|
202
|
-
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
|
203
|
-
Kubernetes service account to use when launching pod in Kubernetes.
|
|
204
|
-
secrets : List[str], optional, default None
|
|
205
|
-
Kubernetes secrets to use when launching pod in Kubernetes. These
|
|
206
|
-
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
|
207
|
-
in Metaflow configuration.
|
|
208
|
-
node_selector: Union[Dict[str,str], str], optional, default None
|
|
209
|
-
Kubernetes node selector(s) to apply to the pod running the task.
|
|
210
|
-
Can be passed in as a comma separated string of values e.g.
|
|
211
|
-
'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
|
|
212
|
-
{'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
|
|
213
|
-
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
|
214
|
-
Kubernetes namespace to use when launching pod in Kubernetes.
|
|
215
|
-
gpu : int, optional, default None
|
|
216
|
-
Number of GPUs required for this step. A value of zero implies that
|
|
217
|
-
the scheduled node should not have GPUs.
|
|
218
|
-
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
|
219
|
-
The vendor of the GPUs to be used for this step.
|
|
220
|
-
tolerations : List[Dict[str,str]], default []
|
|
221
|
-
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
|
222
|
-
Kubernetes tolerations to use when launching pod in Kubernetes.
|
|
223
|
-
labels: Dict[str, str], default: METAFLOW_KUBERNETES_LABELS
|
|
224
|
-
Kubernetes labels to use when launching pod in Kubernetes.
|
|
225
|
-
annotations: Dict[str, str], default: METAFLOW_KUBERNETES_ANNOTATIONS
|
|
226
|
-
Kubernetes annotations to use when launching pod in Kubernetes.
|
|
227
|
-
use_tmpfs : bool, default False
|
|
228
|
-
This enables an explicit tmpfs mount for this step.
|
|
229
|
-
tmpfs_tempdir : bool, default True
|
|
230
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
|
231
|
-
tmpfs_size : int, optional, default: None
|
|
232
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
|
233
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
|
234
|
-
memory allocated for this step.
|
|
235
|
-
tmpfs_path : str, optional, default /metaflow_temp
|
|
236
|
-
Path to tmpfs mount for this step.
|
|
237
|
-
persistent_volume_claims : Dict[str, str], optional, default None
|
|
238
|
-
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
|
239
|
-
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
|
240
|
-
shared_memory: int, optional
|
|
241
|
-
Shared memory size (in MiB) required for this step
|
|
242
|
-
port: int, optional
|
|
243
|
-
Port number to specify in the Kubernetes job object
|
|
244
|
-
compute_pool : str, optional, default None
|
|
245
|
-
Compute pool to be used for for this step.
|
|
246
|
-
If not specified, any accessible compute pool within the perimeter is used.
|
|
247
|
-
hostname_resolution_timeout: int, default 10 * 60
|
|
248
|
-
Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
|
|
249
|
-
Only applicable when @parallel is used.
|
|
250
|
-
qos: str, default: Burstable
|
|
251
|
-
Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
|
|
252
|
-
|
|
253
|
-
security_context: Dict[str, Any], optional, default None
|
|
254
|
-
Container security context. Applies to the task container. Allows the following keys:
|
|
255
|
-
- privileged: bool, optional, default None
|
|
256
|
-
- allow_privilege_escalation: bool, optional, default None
|
|
257
|
-
- run_as_user: int, optional, default None
|
|
258
|
-
- run_as_group: int, optional, default None
|
|
259
|
-
- run_as_non_root: bool, optional, default None
|
|
187
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
|
188
|
+
List of secret specs, defining how the secrets are to be retrieved
|
|
189
|
+
role : str, optional, default: None
|
|
190
|
+
Role to use for fetching secrets
|
|
260
191
|
"""
|
|
261
192
|
...
|
|
262
193
|
|
|
@@ -320,81 +251,35 @@ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
|
320
251
|
...
|
|
321
252
|
|
|
322
253
|
@typing.overload
|
|
323
|
-
def
|
|
254
|
+
def environment(*, vars: typing.Dict[str, str] = {}) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
324
255
|
"""
|
|
325
|
-
Specifies
|
|
326
|
-
|
|
327
|
-
Use `@resources` to specify the resource requirements
|
|
328
|
-
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
|
329
|
-
|
|
330
|
-
You can choose the compute layer on the command line by executing e.g.
|
|
331
|
-
```
|
|
332
|
-
python myflow.py run --with batch
|
|
333
|
-
```
|
|
334
|
-
or
|
|
335
|
-
```
|
|
336
|
-
python myflow.py run --with kubernetes
|
|
337
|
-
```
|
|
338
|
-
which executes the flow on the desired system using the
|
|
339
|
-
requirements specified in `@resources`.
|
|
256
|
+
Specifies environment variables to be set prior to the execution of a step.
|
|
340
257
|
|
|
341
258
|
|
|
342
259
|
Parameters
|
|
343
260
|
----------
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
gpu : int, optional, default None
|
|
347
|
-
Number of GPUs required for this step.
|
|
348
|
-
disk : int, optional, default None
|
|
349
|
-
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
|
350
|
-
memory : int, default 4096
|
|
351
|
-
Memory size (in MB) required for this step.
|
|
352
|
-
shared_memory : int, optional, default None
|
|
353
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
354
|
-
This parameter maps to the `--shm-size` option in Docker.
|
|
261
|
+
vars : Dict[str, str], default {}
|
|
262
|
+
Dictionary of environment variables to set.
|
|
355
263
|
"""
|
|
356
264
|
...
|
|
357
265
|
|
|
358
266
|
@typing.overload
|
|
359
|
-
def
|
|
267
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
360
268
|
...
|
|
361
269
|
|
|
362
270
|
@typing.overload
|
|
363
|
-
def
|
|
271
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
364
272
|
...
|
|
365
273
|
|
|
366
|
-
def
|
|
274
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
|
367
275
|
"""
|
|
368
|
-
Specifies
|
|
369
|
-
|
|
370
|
-
Use `@resources` to specify the resource requirements
|
|
371
|
-
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
|
372
|
-
|
|
373
|
-
You can choose the compute layer on the command line by executing e.g.
|
|
374
|
-
```
|
|
375
|
-
python myflow.py run --with batch
|
|
376
|
-
```
|
|
377
|
-
or
|
|
378
|
-
```
|
|
379
|
-
python myflow.py run --with kubernetes
|
|
380
|
-
```
|
|
381
|
-
which executes the flow on the desired system using the
|
|
382
|
-
requirements specified in `@resources`.
|
|
276
|
+
Specifies environment variables to be set prior to the execution of a step.
|
|
383
277
|
|
|
384
278
|
|
|
385
279
|
Parameters
|
|
386
280
|
----------
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
gpu : int, optional, default None
|
|
390
|
-
Number of GPUs required for this step.
|
|
391
|
-
disk : int, optional, default None
|
|
392
|
-
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
|
393
|
-
memory : int, default 4096
|
|
394
|
-
Memory size (in MB) required for this step.
|
|
395
|
-
shared_memory : int, optional, default None
|
|
396
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
397
|
-
This parameter maps to the `--shm-size` option in Docker.
|
|
281
|
+
vars : Dict[str, str], default {}
|
|
282
|
+
Dictionary of environment variables to set.
|
|
398
283
|
"""
|
|
399
284
|
...
|
|
400
285
|
|
|
@@ -453,59 +338,9 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
|
453
338
|
"""
|
|
454
339
|
...
|
|
455
340
|
|
|
456
|
-
|
|
457
|
-
def card(*, type: str = 'default', id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
458
|
-
"""
|
|
459
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
|
460
|
-
|
|
461
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
Parameters
|
|
465
|
-
----------
|
|
466
|
-
type : str, default 'default'
|
|
467
|
-
Card type.
|
|
468
|
-
id : str, optional, default None
|
|
469
|
-
If multiple cards are present, use this id to identify this card.
|
|
470
|
-
options : Dict[str, Any], default {}
|
|
471
|
-
Options passed to the card. The contents depend on the card type.
|
|
472
|
-
timeout : int, default 45
|
|
473
|
-
Interrupt reporting if it takes more than this many seconds.
|
|
474
|
-
"""
|
|
475
|
-
...
|
|
476
|
-
|
|
477
|
-
@typing.overload
|
|
478
|
-
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
479
|
-
...
|
|
480
|
-
|
|
481
|
-
@typing.overload
|
|
482
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
483
|
-
...
|
|
484
|
-
|
|
485
|
-
def card(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, type: str = 'default', id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45):
|
|
486
|
-
"""
|
|
487
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
|
488
|
-
|
|
489
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
Parameters
|
|
493
|
-
----------
|
|
494
|
-
type : str, default 'default'
|
|
495
|
-
Card type.
|
|
496
|
-
id : str, optional, default None
|
|
497
|
-
If multiple cards are present, use this id to identify this card.
|
|
498
|
-
options : Dict[str, Any], default {}
|
|
499
|
-
Options passed to the card. The contents depend on the card type.
|
|
500
|
-
timeout : int, default 45
|
|
501
|
-
Interrupt reporting if it takes more than this many seconds.
|
|
502
|
-
"""
|
|
503
|
-
...
|
|
504
|
-
|
|
505
|
-
@typing.overload
|
|
506
|
-
def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = 'METAFLOW_BATCH_JOB_QUEUE', iam_role: str = 'METAFLOW_ECS_S3_ACCESS_IAM_ROLE', execution_role: str = 'METAFLOW_ECS_FARGATE_EXECUTION_ROLE', shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[str]] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
341
|
+
def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = 'KUBERNETES_IMAGE_PULL_POLICY', image_pull_secrets: typing.List[str] = [], service_account: str = 'METAFLOW_KUBERNETES_SERVICE_ACCOUNT', secrets: typing.Optional[typing.List[str]] = None, node_selector: typing.Union[typing.Dict[str, str], str, None] = None, namespace: str = 'METAFLOW_KUBERNETES_NAMESPACE', gpu: typing.Optional[int] = None, gpu_vendor: str = 'KUBERNETES_GPU_VENDOR', tolerations: typing.List[typing.Dict[str, str]] = [], labels: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_LABELS', annotations: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_ANNOTATIONS', use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = '/metaflow_temp', persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None, compute_pool: typing.Optional[str] = None, hostname_resolution_timeout: int = 600, qos: str = 'Burstable', security_context: typing.Optional[typing.Dict[str, typing.Any]] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
507
342
|
"""
|
|
508
|
-
Specifies that this step should execute on
|
|
343
|
+
Specifies that this step should execute on Kubernetes.
|
|
509
344
|
|
|
510
345
|
|
|
511
346
|
Parameters
|
|
@@ -513,141 +348,201 @@ def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optio
|
|
|
513
348
|
cpu : int, default 1
|
|
514
349
|
Number of CPUs required for this step. If `@resources` is
|
|
515
350
|
also present, the maximum value from all decorators is used.
|
|
516
|
-
gpu : int, default 0
|
|
517
|
-
Number of GPUs required for this step. If `@resources` is
|
|
518
|
-
also present, the maximum value from all decorators is used.
|
|
519
351
|
memory : int, default 4096
|
|
520
352
|
Memory size (in MB) required for this step. If
|
|
521
353
|
`@resources` is also present, the maximum value from all decorators is
|
|
522
354
|
used.
|
|
355
|
+
disk : int, default 10240
|
|
356
|
+
Disk size (in MB) required for this step. If
|
|
357
|
+
`@resources` is also present, the maximum value from all decorators is
|
|
358
|
+
used.
|
|
523
359
|
image : str, optional, default None
|
|
524
|
-
Docker image to use when launching on
|
|
525
|
-
|
|
360
|
+
Docker image to use when launching on Kubernetes. If not specified, and
|
|
361
|
+
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
|
526
362
|
not, a default Docker image mapping to the current version of Python is used.
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
363
|
+
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
|
364
|
+
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
|
365
|
+
image_pull_secrets: List[str], default []
|
|
366
|
+
The default is extracted from METAFLOW_KUBERNETES_IMAGE_PULL_SECRETS.
|
|
367
|
+
Kubernetes image pull secrets to use when pulling container images
|
|
368
|
+
in Kubernetes.
|
|
369
|
+
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
|
370
|
+
Kubernetes service account to use when launching pod in Kubernetes.
|
|
371
|
+
secrets : List[str], optional, default None
|
|
372
|
+
Kubernetes secrets to use when launching pod in Kubernetes. These
|
|
373
|
+
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
|
374
|
+
in Metaflow configuration.
|
|
375
|
+
node_selector: Union[Dict[str,str], str], optional, default None
|
|
376
|
+
Kubernetes node selector(s) to apply to the pod running the task.
|
|
377
|
+
Can be passed in as a comma separated string of values e.g.
|
|
378
|
+
'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
|
|
379
|
+
{'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
|
|
380
|
+
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
|
381
|
+
Kubernetes namespace to use when launching pod in Kubernetes.
|
|
382
|
+
gpu : int, optional, default None
|
|
383
|
+
Number of GPUs required for this step. A value of zero implies that
|
|
384
|
+
the scheduled node should not have GPUs.
|
|
385
|
+
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
|
386
|
+
The vendor of the GPUs to be used for this step.
|
|
387
|
+
tolerations : List[Dict[str,str]], default []
|
|
388
|
+
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
|
389
|
+
Kubernetes tolerations to use when launching pod in Kubernetes.
|
|
390
|
+
labels: Dict[str, str], default: METAFLOW_KUBERNETES_LABELS
|
|
391
|
+
Kubernetes labels to use when launching pod in Kubernetes.
|
|
392
|
+
annotations: Dict[str, str], default: METAFLOW_KUBERNETES_ANNOTATIONS
|
|
393
|
+
Kubernetes annotations to use when launching pod in Kubernetes.
|
|
547
394
|
use_tmpfs : bool, default False
|
|
548
|
-
This enables an explicit tmpfs mount for this step.
|
|
549
|
-
not available on Fargate compute environments
|
|
395
|
+
This enables an explicit tmpfs mount for this step.
|
|
550
396
|
tmpfs_tempdir : bool, default True
|
|
551
397
|
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
|
552
|
-
tmpfs_size : int, optional, default None
|
|
398
|
+
tmpfs_size : int, optional, default: None
|
|
553
399
|
The value for the size (in MiB) of the tmpfs mount for this step.
|
|
554
400
|
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
|
555
401
|
memory allocated for this step.
|
|
556
|
-
tmpfs_path : str, optional, default
|
|
557
|
-
Path to tmpfs mount for this step.
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
402
|
+
tmpfs_path : str, optional, default /metaflow_temp
|
|
403
|
+
Path to tmpfs mount for this step.
|
|
404
|
+
persistent_volume_claims : Dict[str, str], optional, default None
|
|
405
|
+
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
|
406
|
+
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
|
407
|
+
shared_memory: int, optional
|
|
408
|
+
Shared memory size (in MiB) required for this step
|
|
409
|
+
port: int, optional
|
|
410
|
+
Port number to specify in the Kubernetes job object
|
|
411
|
+
compute_pool : str, optional, default None
|
|
412
|
+
Compute pool to be used for for this step.
|
|
413
|
+
If not specified, any accessible compute pool within the perimeter is used.
|
|
414
|
+
hostname_resolution_timeout: int, default 10 * 60
|
|
415
|
+
Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
|
|
416
|
+
Only applicable when @parallel is used.
|
|
417
|
+
qos: str, default: Burstable
|
|
418
|
+
Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
|
|
419
|
+
|
|
420
|
+
security_context: Dict[str, Any], optional, default None
|
|
421
|
+
Container security context. Applies to the task container. Allows the following keys:
|
|
422
|
+
- privileged: bool, optional, default None
|
|
423
|
+
- allow_privilege_escalation: bool, optional, default None
|
|
424
|
+
- run_as_user: int, optional, default None
|
|
425
|
+
- run_as_group: int, optional, default None
|
|
426
|
+
- run_as_non_root: bool, optional, default None
|
|
573
427
|
"""
|
|
574
428
|
...
|
|
575
429
|
|
|
576
430
|
@typing.overload
|
|
577
|
-
def
|
|
431
|
+
def pypi(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
432
|
+
"""
|
|
433
|
+
Specifies the PyPI packages for the step.
|
|
434
|
+
|
|
435
|
+
Information in this decorator will augment any
|
|
436
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
|
437
|
+
you can use `@pypi_base` to set packages required by all
|
|
438
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
Parameters
|
|
442
|
+
----------
|
|
443
|
+
packages : Dict[str, str], default: {}
|
|
444
|
+
Packages to use for this step. The key is the name of the package
|
|
445
|
+
and the value is the version to use.
|
|
446
|
+
python : str, optional, default: None
|
|
447
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
448
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
449
|
+
"""
|
|
578
450
|
...
|
|
579
451
|
|
|
580
452
|
@typing.overload
|
|
581
|
-
def
|
|
453
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
582
454
|
...
|
|
583
455
|
|
|
584
|
-
|
|
456
|
+
@typing.overload
|
|
457
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
458
|
+
...
|
|
459
|
+
|
|
460
|
+
def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
|
585
461
|
"""
|
|
586
|
-
Specifies
|
|
462
|
+
Specifies the PyPI packages for the step.
|
|
463
|
+
|
|
464
|
+
Information in this decorator will augment any
|
|
465
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
|
466
|
+
you can use `@pypi_base` to set packages required by all
|
|
467
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
587
468
|
|
|
588
469
|
|
|
589
470
|
Parameters
|
|
590
471
|
----------
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
472
|
+
packages : Dict[str, str], default: {}
|
|
473
|
+
Packages to use for this step. The key is the name of the package
|
|
474
|
+
and the value is the version to use.
|
|
475
|
+
python : str, optional, default: None
|
|
476
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
477
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
478
|
+
"""
|
|
479
|
+
...
|
|
480
|
+
|
|
481
|
+
@typing.overload
|
|
482
|
+
def card(*, type: str = 'default', id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
483
|
+
"""
|
|
484
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
|
485
|
+
|
|
486
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
Parameters
|
|
490
|
+
----------
|
|
491
|
+
type : str, default 'default'
|
|
492
|
+
Card type.
|
|
493
|
+
id : str, optional, default None
|
|
494
|
+
If multiple cards are present, use this id to identify this card.
|
|
495
|
+
options : Dict[str, Any], default {}
|
|
496
|
+
Options passed to the card. The contents depend on the card type.
|
|
497
|
+
timeout : int, default 45
|
|
498
|
+
Interrupt reporting if it takes more than this many seconds.
|
|
499
|
+
"""
|
|
500
|
+
...
|
|
501
|
+
|
|
502
|
+
@typing.overload
|
|
503
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
504
|
+
...
|
|
505
|
+
|
|
506
|
+
@typing.overload
|
|
507
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
508
|
+
...
|
|
509
|
+
|
|
510
|
+
def card(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, type: str = 'default', id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45):
|
|
511
|
+
"""
|
|
512
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
|
513
|
+
|
|
514
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
Parameters
|
|
518
|
+
----------
|
|
519
|
+
type : str, default 'default'
|
|
520
|
+
Card type.
|
|
521
|
+
id : str, optional, default None
|
|
522
|
+
If multiple cards are present, use this id to identify this card.
|
|
523
|
+
options : Dict[str, Any], default {}
|
|
524
|
+
Options passed to the card. The contents depend on the card type.
|
|
525
|
+
timeout : int, default 45
|
|
526
|
+
Interrupt reporting if it takes more than this many seconds.
|
|
527
|
+
"""
|
|
528
|
+
...
|
|
529
|
+
|
|
530
|
+
@typing.overload
|
|
531
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
532
|
+
"""
|
|
533
|
+
Decorator prototype for all step decorators. This function gets specialized
|
|
534
|
+
and imported for all decorators types by _import_plugin_decorators().
|
|
535
|
+
"""
|
|
536
|
+
...
|
|
537
|
+
|
|
538
|
+
@typing.overload
|
|
539
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
540
|
+
...
|
|
541
|
+
|
|
542
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
|
543
|
+
"""
|
|
544
|
+
Decorator prototype for all step decorators. This function gets specialized
|
|
545
|
+
and imported for all decorators types by _import_plugin_decorators().
|
|
651
546
|
"""
|
|
652
547
|
...
|
|
653
548
|
|
|
@@ -711,176 +606,433 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
|
711
606
|
...
|
|
712
607
|
|
|
713
608
|
@typing.overload
|
|
714
|
-
def
|
|
609
|
+
def resources(*, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
715
610
|
"""
|
|
716
|
-
Specifies
|
|
717
|
-
|
|
611
|
+
Specifies the resources needed when executing this step.
|
|
612
|
+
|
|
613
|
+
Use `@resources` to specify the resource requirements
|
|
614
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
|
615
|
+
|
|
616
|
+
You can choose the compute layer on the command line by executing e.g.
|
|
617
|
+
```
|
|
618
|
+
python myflow.py run --with batch
|
|
619
|
+
```
|
|
620
|
+
or
|
|
621
|
+
```
|
|
622
|
+
python myflow.py run --with kubernetes
|
|
623
|
+
```
|
|
624
|
+
which executes the flow on the desired system using the
|
|
625
|
+
requirements specified in `@resources`.
|
|
718
626
|
|
|
719
627
|
|
|
720
628
|
Parameters
|
|
721
629
|
----------
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
630
|
+
cpu : int, default 1
|
|
631
|
+
Number of CPUs required for this step.
|
|
632
|
+
gpu : int, optional, default None
|
|
633
|
+
Number of GPUs required for this step.
|
|
634
|
+
disk : int, optional, default None
|
|
635
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
|
636
|
+
memory : int, default 4096
|
|
637
|
+
Memory size (in MB) required for this step.
|
|
638
|
+
shared_memory : int, optional, default None
|
|
639
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
640
|
+
This parameter maps to the `--shm-size` option in Docker.
|
|
726
641
|
"""
|
|
727
642
|
...
|
|
728
643
|
|
|
729
644
|
@typing.overload
|
|
730
|
-
def
|
|
645
|
+
def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
731
646
|
...
|
|
732
647
|
|
|
733
648
|
@typing.overload
|
|
734
|
-
def
|
|
649
|
+
def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
735
650
|
...
|
|
736
651
|
|
|
737
|
-
def
|
|
652
|
+
def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
|
|
738
653
|
"""
|
|
739
|
-
Specifies
|
|
740
|
-
|
|
654
|
+
Specifies the resources needed when executing this step.
|
|
655
|
+
|
|
656
|
+
Use `@resources` to specify the resource requirements
|
|
657
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
|
658
|
+
|
|
659
|
+
You can choose the compute layer on the command line by executing e.g.
|
|
660
|
+
```
|
|
661
|
+
python myflow.py run --with batch
|
|
662
|
+
```
|
|
663
|
+
or
|
|
664
|
+
```
|
|
665
|
+
python myflow.py run --with kubernetes
|
|
666
|
+
```
|
|
667
|
+
which executes the flow on the desired system using the
|
|
668
|
+
requirements specified in `@resources`.
|
|
741
669
|
|
|
742
670
|
|
|
743
671
|
Parameters
|
|
744
672
|
----------
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
673
|
+
cpu : int, default 1
|
|
674
|
+
Number of CPUs required for this step.
|
|
675
|
+
gpu : int, optional, default None
|
|
676
|
+
Number of GPUs required for this step.
|
|
677
|
+
disk : int, optional, default None
|
|
678
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
|
679
|
+
memory : int, default 4096
|
|
680
|
+
Memory size (in MB) required for this step.
|
|
681
|
+
shared_memory : int, optional, default None
|
|
682
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
683
|
+
This parameter maps to the `--shm-size` option in Docker.
|
|
749
684
|
"""
|
|
750
685
|
...
|
|
751
686
|
|
|
752
687
|
@typing.overload
|
|
753
|
-
def
|
|
688
|
+
def catch(*, var: typing.Optional[str] = None, print_exception: bool = True) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
754
689
|
"""
|
|
755
|
-
Specifies the
|
|
690
|
+
Specifies that the step will success under all circumstances.
|
|
756
691
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
692
|
+
The decorator will create an optional artifact, specified by `var`, which
|
|
693
|
+
contains the exception raised. You can use it to detect the presence
|
|
694
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
|
695
|
+
are missing.
|
|
761
696
|
|
|
762
697
|
|
|
763
698
|
Parameters
|
|
764
699
|
----------
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
700
|
+
var : str, optional, default None
|
|
701
|
+
Name of the artifact in which to store the caught exception.
|
|
702
|
+
If not specified, the exception is not stored.
|
|
703
|
+
print_exception : bool, default True
|
|
704
|
+
Determines whether or not the exception is printed to
|
|
705
|
+
stdout when caught.
|
|
771
706
|
"""
|
|
772
707
|
...
|
|
773
708
|
|
|
774
709
|
@typing.overload
|
|
775
|
-
def
|
|
710
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
776
711
|
...
|
|
777
712
|
|
|
778
713
|
@typing.overload
|
|
779
|
-
def
|
|
714
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
780
715
|
...
|
|
781
716
|
|
|
782
|
-
def
|
|
717
|
+
def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
|
|
783
718
|
"""
|
|
784
|
-
Specifies the
|
|
719
|
+
Specifies that the step will success under all circumstances.
|
|
785
720
|
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
721
|
+
The decorator will create an optional artifact, specified by `var`, which
|
|
722
|
+
contains the exception raised. You can use it to detect the presence
|
|
723
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
|
724
|
+
are missing.
|
|
790
725
|
|
|
791
726
|
|
|
792
727
|
Parameters
|
|
793
728
|
----------
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
729
|
+
var : str, optional, default None
|
|
730
|
+
Name of the artifact in which to store the caught exception.
|
|
731
|
+
If not specified, the exception is not stored.
|
|
732
|
+
print_exception : bool, default True
|
|
733
|
+
Determines whether or not the exception is printed to
|
|
734
|
+
stdout when caught.
|
|
800
735
|
"""
|
|
801
736
|
...
|
|
802
737
|
|
|
803
738
|
@typing.overload
|
|
804
|
-
def
|
|
739
|
+
def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = 'METAFLOW_BATCH_JOB_QUEUE', iam_role: str = 'METAFLOW_ECS_S3_ACCESS_IAM_ROLE', execution_role: str = 'METAFLOW_ECS_FARGATE_EXECUTION_ROLE', shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[str]] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
|
805
740
|
"""
|
|
806
|
-
Specifies
|
|
741
|
+
Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
|
|
807
742
|
|
|
808
743
|
|
|
809
744
|
Parameters
|
|
810
745
|
----------
|
|
811
|
-
|
|
812
|
-
|
|
746
|
+
cpu : int, default 1
|
|
747
|
+
Number of CPUs required for this step. If `@resources` is
|
|
748
|
+
also present, the maximum value from all decorators is used.
|
|
749
|
+
gpu : int, default 0
|
|
750
|
+
Number of GPUs required for this step. If `@resources` is
|
|
751
|
+
also present, the maximum value from all decorators is used.
|
|
752
|
+
memory : int, default 4096
|
|
753
|
+
Memory size (in MB) required for this step. If
|
|
754
|
+
`@resources` is also present, the maximum value from all decorators is
|
|
755
|
+
used.
|
|
756
|
+
image : str, optional, default None
|
|
757
|
+
Docker image to use when launching on AWS Batch. If not specified, and
|
|
758
|
+
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
|
759
|
+
not, a default Docker image mapping to the current version of Python is used.
|
|
760
|
+
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
|
761
|
+
AWS Batch Job Queue to submit the job to.
|
|
762
|
+
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
|
763
|
+
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
|
764
|
+
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
|
765
|
+
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
|
766
|
+
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
|
767
|
+
shared_memory : int, optional, default None
|
|
768
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
769
|
+
This parameter maps to the `--shm-size` option in Docker.
|
|
770
|
+
max_swap : int, optional, default None
|
|
771
|
+
The total amount of swap memory (in MiB) a container can use for this
|
|
772
|
+
step. This parameter is translated to the `--memory-swap` option in
|
|
773
|
+
Docker where the value is the sum of the container memory plus the
|
|
774
|
+
`max_swap` value.
|
|
775
|
+
swappiness : int, optional, default None
|
|
776
|
+
This allows you to tune memory swappiness behavior for this step.
|
|
777
|
+
A swappiness value of 0 causes swapping not to happen unless absolutely
|
|
778
|
+
necessary. A swappiness value of 100 causes pages to be swapped very
|
|
779
|
+
aggressively. Accepted values are whole numbers between 0 and 100.
|
|
780
|
+
use_tmpfs : bool, default False
|
|
781
|
+
This enables an explicit tmpfs mount for this step. Note that tmpfs is
|
|
782
|
+
not available on Fargate compute environments
|
|
783
|
+
tmpfs_tempdir : bool, default True
|
|
784
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
|
785
|
+
tmpfs_size : int, optional, default None
|
|
786
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
|
787
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
|
788
|
+
memory allocated for this step.
|
|
789
|
+
tmpfs_path : str, optional, default None
|
|
790
|
+
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
|
791
|
+
inferentia : int, default 0
|
|
792
|
+
Number of Inferentia chips required for this step.
|
|
793
|
+
trainium : int, default None
|
|
794
|
+
Alias for inferentia. Use only one of the two.
|
|
795
|
+
efa : int, default 0
|
|
796
|
+
Number of elastic fabric adapter network devices to attach to container
|
|
797
|
+
ephemeral_storage : int, default None
|
|
798
|
+
The total amount, in GiB, of ephemeral storage to set for the task, 21-200GiB.
|
|
799
|
+
This is only relevant for Fargate compute environments
|
|
800
|
+
log_driver: str, optional, default None
|
|
801
|
+
The log driver to use for the Amazon ECS container.
|
|
802
|
+
log_options: List[str], optional, default None
|
|
803
|
+
List of strings containing options for the chosen log driver. The configurable values
|
|
804
|
+
depend on the `log driver` chosen. Validation of these options is not supported yet.
|
|
805
|
+
Example: [`awslogs-group:aws/batch/job`]
|
|
813
806
|
"""
|
|
814
807
|
...
|
|
815
808
|
|
|
816
809
|
@typing.overload
|
|
817
|
-
def
|
|
810
|
+
def batch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
818
811
|
...
|
|
819
812
|
|
|
820
813
|
@typing.overload
|
|
821
|
-
def
|
|
814
|
+
def batch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
822
815
|
...
|
|
823
816
|
|
|
824
|
-
def
|
|
817
|
+
def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = 'METAFLOW_BATCH_JOB_QUEUE', iam_role: str = 'METAFLOW_ECS_S3_ACCESS_IAM_ROLE', execution_role: str = 'METAFLOW_ECS_FARGATE_EXECUTION_ROLE', shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[str]] = None):
|
|
825
818
|
"""
|
|
826
|
-
Specifies
|
|
819
|
+
Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
|
|
827
820
|
|
|
828
821
|
|
|
829
822
|
Parameters
|
|
830
823
|
----------
|
|
831
|
-
|
|
832
|
-
|
|
824
|
+
cpu : int, default 1
|
|
825
|
+
Number of CPUs required for this step. If `@resources` is
|
|
826
|
+
also present, the maximum value from all decorators is used.
|
|
827
|
+
gpu : int, default 0
|
|
828
|
+
Number of GPUs required for this step. If `@resources` is
|
|
829
|
+
also present, the maximum value from all decorators is used.
|
|
830
|
+
memory : int, default 4096
|
|
831
|
+
Memory size (in MB) required for this step. If
|
|
832
|
+
`@resources` is also present, the maximum value from all decorators is
|
|
833
|
+
used.
|
|
834
|
+
image : str, optional, default None
|
|
835
|
+
Docker image to use when launching on AWS Batch. If not specified, and
|
|
836
|
+
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
|
837
|
+
not, a default Docker image mapping to the current version of Python is used.
|
|
838
|
+
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
|
839
|
+
AWS Batch Job Queue to submit the job to.
|
|
840
|
+
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
|
841
|
+
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
|
842
|
+
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
|
843
|
+
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
|
844
|
+
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
|
845
|
+
shared_memory : int, optional, default None
|
|
846
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
847
|
+
This parameter maps to the `--shm-size` option in Docker.
|
|
848
|
+
max_swap : int, optional, default None
|
|
849
|
+
The total amount of swap memory (in MiB) a container can use for this
|
|
850
|
+
step. This parameter is translated to the `--memory-swap` option in
|
|
851
|
+
Docker where the value is the sum of the container memory plus the
|
|
852
|
+
`max_swap` value.
|
|
853
|
+
swappiness : int, optional, default None
|
|
854
|
+
This allows you to tune memory swappiness behavior for this step.
|
|
855
|
+
A swappiness value of 0 causes swapping not to happen unless absolutely
|
|
856
|
+
necessary. A swappiness value of 100 causes pages to be swapped very
|
|
857
|
+
aggressively. Accepted values are whole numbers between 0 and 100.
|
|
858
|
+
use_tmpfs : bool, default False
|
|
859
|
+
This enables an explicit tmpfs mount for this step. Note that tmpfs is
|
|
860
|
+
not available on Fargate compute environments
|
|
861
|
+
tmpfs_tempdir : bool, default True
|
|
862
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
|
863
|
+
tmpfs_size : int, optional, default None
|
|
864
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
|
865
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
|
866
|
+
memory allocated for this step.
|
|
867
|
+
tmpfs_path : str, optional, default None
|
|
868
|
+
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
|
869
|
+
inferentia : int, default 0
|
|
870
|
+
Number of Inferentia chips required for this step.
|
|
871
|
+
trainium : int, default None
|
|
872
|
+
Alias for inferentia. Use only one of the two.
|
|
873
|
+
efa : int, default 0
|
|
874
|
+
Number of elastic fabric adapter network devices to attach to container
|
|
875
|
+
ephemeral_storage : int, default None
|
|
876
|
+
The total amount, in GiB, of ephemeral storage to set for the task, 21-200GiB.
|
|
877
|
+
This is only relevant for Fargate compute environments
|
|
878
|
+
log_driver: str, optional, default None
|
|
879
|
+
The log driver to use for the Amazon ECS container.
|
|
880
|
+
log_options: List[str], optional, default None
|
|
881
|
+
List of strings containing options for the chosen log driver. The configurable values
|
|
882
|
+
depend on the `log driver` chosen. Validation of these options is not supported yet.
|
|
883
|
+
Example: [`awslogs-group:aws/batch/job`]
|
|
833
884
|
"""
|
|
834
885
|
...
|
|
835
886
|
|
|
836
887
|
@typing.overload
|
|
837
|
-
def
|
|
888
|
+
def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
838
889
|
"""
|
|
839
|
-
Specifies
|
|
890
|
+
Specifies the Conda environment for all steps of the flow.
|
|
840
891
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
|
844
|
-
are missing.
|
|
892
|
+
Use `@conda_base` to set common libraries required by all
|
|
893
|
+
steps and use `@conda` to specify step-specific additions.
|
|
845
894
|
|
|
846
895
|
|
|
847
896
|
Parameters
|
|
848
897
|
----------
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
898
|
+
packages : Dict[str, str], default {}
|
|
899
|
+
Packages to use for this flow. The key is the name of the package
|
|
900
|
+
and the value is the version to use.
|
|
901
|
+
libraries : Dict[str, str], default {}
|
|
902
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
903
|
+
python : str, optional, default None
|
|
904
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
905
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
906
|
+
disabled : bool, default False
|
|
907
|
+
If set to True, disables Conda.
|
|
855
908
|
"""
|
|
856
909
|
...
|
|
857
910
|
|
|
858
911
|
@typing.overload
|
|
859
|
-
def
|
|
912
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
913
|
+
...
|
|
914
|
+
|
|
915
|
+
def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
|
|
916
|
+
"""
|
|
917
|
+
Specifies the Conda environment for all steps of the flow.
|
|
918
|
+
|
|
919
|
+
Use `@conda_base` to set common libraries required by all
|
|
920
|
+
steps and use `@conda` to specify step-specific additions.
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
Parameters
|
|
924
|
+
----------
|
|
925
|
+
packages : Dict[str, str], default {}
|
|
926
|
+
Packages to use for this flow. The key is the name of the package
|
|
927
|
+
and the value is the version to use.
|
|
928
|
+
libraries : Dict[str, str], default {}
|
|
929
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
930
|
+
python : str, optional, default None
|
|
931
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
932
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
933
|
+
disabled : bool, default False
|
|
934
|
+
If set to True, disables Conda.
|
|
935
|
+
"""
|
|
860
936
|
...
|
|
861
937
|
|
|
862
938
|
@typing.overload
|
|
863
|
-
def
|
|
939
|
+
def trigger_on_finish(*, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
940
|
+
"""
|
|
941
|
+
Specifies the flow(s) that this flow depends on.
|
|
942
|
+
|
|
943
|
+
```
|
|
944
|
+
@trigger_on_finish(flow='FooFlow')
|
|
945
|
+
```
|
|
946
|
+
or
|
|
947
|
+
```
|
|
948
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
|
949
|
+
```
|
|
950
|
+
This decorator respects the @project decorator and triggers the flow
|
|
951
|
+
when upstream runs within the same namespace complete successfully
|
|
952
|
+
|
|
953
|
+
Additionally, you can specify project aware upstream flow dependencies
|
|
954
|
+
by specifying the fully qualified project_flow_name.
|
|
955
|
+
```
|
|
956
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
|
957
|
+
```
|
|
958
|
+
or
|
|
959
|
+
```
|
|
960
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
You can also specify just the project or project branch (other values will be
|
|
964
|
+
inferred from the current project or project branch):
|
|
965
|
+
```
|
|
966
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
Note that `branch` is typically one of:
|
|
970
|
+
- `prod`
|
|
971
|
+
- `user.bob`
|
|
972
|
+
- `test.my_experiment`
|
|
973
|
+
- `prod.staging`
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
Parameters
|
|
977
|
+
----------
|
|
978
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
|
979
|
+
Upstream flow dependency for this flow.
|
|
980
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
|
981
|
+
Upstream flow dependencies for this flow.
|
|
982
|
+
options : Dict[str, Any], default {}
|
|
983
|
+
Backend-specific configuration for tuning eventing behavior.
|
|
984
|
+
"""
|
|
864
985
|
...
|
|
865
986
|
|
|
866
|
-
|
|
987
|
+
@typing.overload
|
|
988
|
+
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
989
|
+
...
|
|
990
|
+
|
|
991
|
+
def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
|
|
867
992
|
"""
|
|
868
|
-
Specifies
|
|
993
|
+
Specifies the flow(s) that this flow depends on.
|
|
869
994
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
995
|
+
```
|
|
996
|
+
@trigger_on_finish(flow='FooFlow')
|
|
997
|
+
```
|
|
998
|
+
or
|
|
999
|
+
```
|
|
1000
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
|
1001
|
+
```
|
|
1002
|
+
This decorator respects the @project decorator and triggers the flow
|
|
1003
|
+
when upstream runs within the same namespace complete successfully
|
|
1004
|
+
|
|
1005
|
+
Additionally, you can specify project aware upstream flow dependencies
|
|
1006
|
+
by specifying the fully qualified project_flow_name.
|
|
1007
|
+
```
|
|
1008
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
|
1009
|
+
```
|
|
1010
|
+
or
|
|
1011
|
+
```
|
|
1012
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
|
1013
|
+
```
|
|
1014
|
+
|
|
1015
|
+
You can also specify just the project or project branch (other values will be
|
|
1016
|
+
inferred from the current project or project branch):
|
|
1017
|
+
```
|
|
1018
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
|
1019
|
+
```
|
|
1020
|
+
|
|
1021
|
+
Note that `branch` is typically one of:
|
|
1022
|
+
- `prod`
|
|
1023
|
+
- `user.bob`
|
|
1024
|
+
- `test.my_experiment`
|
|
1025
|
+
- `prod.staging`
|
|
874
1026
|
|
|
875
1027
|
|
|
876
1028
|
Parameters
|
|
877
1029
|
----------
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
1030
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
|
1031
|
+
Upstream flow dependency for this flow.
|
|
1032
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
|
1033
|
+
Upstream flow dependencies for this flow.
|
|
1034
|
+
options : Dict[str, Any], default {}
|
|
1035
|
+
Backend-specific configuration for tuning eventing behavior.
|
|
884
1036
|
"""
|
|
885
1037
|
...
|
|
886
1038
|
|
|
@@ -927,47 +1079,6 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
|
|
|
927
1079
|
"""
|
|
928
1080
|
...
|
|
929
1081
|
|
|
930
|
-
@typing.overload
|
|
931
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
932
|
-
"""
|
|
933
|
-
Specifies the PyPI packages for all steps of the flow.
|
|
934
|
-
|
|
935
|
-
Use `@pypi_base` to set common packages required by all
|
|
936
|
-
steps and use `@pypi` to specify step-specific overrides.
|
|
937
|
-
|
|
938
|
-
Parameters
|
|
939
|
-
----------
|
|
940
|
-
packages : Dict[str, str], default: {}
|
|
941
|
-
Packages to use for this flow. The key is the name of the package
|
|
942
|
-
and the value is the version to use.
|
|
943
|
-
python : str, optional, default: None
|
|
944
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
945
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
946
|
-
"""
|
|
947
|
-
...
|
|
948
|
-
|
|
949
|
-
@typing.overload
|
|
950
|
-
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
951
|
-
...
|
|
952
|
-
|
|
953
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
|
954
|
-
"""
|
|
955
|
-
Specifies the PyPI packages for all steps of the flow.
|
|
956
|
-
|
|
957
|
-
Use `@pypi_base` to set common packages required by all
|
|
958
|
-
steps and use `@pypi` to specify step-specific overrides.
|
|
959
|
-
|
|
960
|
-
Parameters
|
|
961
|
-
----------
|
|
962
|
-
packages : Dict[str, str], default: {}
|
|
963
|
-
Packages to use for this flow. The key is the name of the package
|
|
964
|
-
and the value is the version to use.
|
|
965
|
-
python : str, optional, default: None
|
|
966
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
967
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
968
|
-
"""
|
|
969
|
-
...
|
|
970
|
-
|
|
971
1082
|
def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
972
1083
|
"""
|
|
973
1084
|
Specifies what flows belong to the same project.
|
|
@@ -1004,53 +1115,53 @@ def project(*, name: str, branch: typing.Optional[str] = None, production: bool
|
|
|
1004
1115
|
...
|
|
1005
1116
|
|
|
1006
1117
|
@typing.overload
|
|
1007
|
-
def
|
|
1118
|
+
def schedule(*, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
1008
1119
|
"""
|
|
1009
|
-
Specifies the
|
|
1010
|
-
|
|
1011
|
-
Use `@conda_base` to set common libraries required by all
|
|
1012
|
-
steps and use `@conda` to specify step-specific additions.
|
|
1120
|
+
Specifies the times when the flow should be run when running on a
|
|
1121
|
+
production scheduler.
|
|
1013
1122
|
|
|
1014
1123
|
|
|
1015
1124
|
Parameters
|
|
1016
1125
|
----------
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1126
|
+
hourly : bool, default False
|
|
1127
|
+
Run the workflow hourly.
|
|
1128
|
+
daily : bool, default True
|
|
1129
|
+
Run the workflow daily.
|
|
1130
|
+
weekly : bool, default False
|
|
1131
|
+
Run the workflow weekly.
|
|
1132
|
+
cron : str, optional, default None
|
|
1133
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
|
1134
|
+
specified by this expression.
|
|
1135
|
+
timezone : str, optional, default None
|
|
1136
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
|
1137
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
|
1027
1138
|
"""
|
|
1028
1139
|
...
|
|
1029
1140
|
|
|
1030
1141
|
@typing.overload
|
|
1031
|
-
def
|
|
1142
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
1032
1143
|
...
|
|
1033
1144
|
|
|
1034
|
-
def
|
|
1145
|
+
def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None):
|
|
1035
1146
|
"""
|
|
1036
|
-
Specifies the
|
|
1037
|
-
|
|
1038
|
-
Use `@conda_base` to set common libraries required by all
|
|
1039
|
-
steps and use `@conda` to specify step-specific additions.
|
|
1147
|
+
Specifies the times when the flow should be run when running on a
|
|
1148
|
+
production scheduler.
|
|
1040
1149
|
|
|
1041
1150
|
|
|
1042
1151
|
Parameters
|
|
1043
1152
|
----------
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1153
|
+
hourly : bool, default False
|
|
1154
|
+
Run the workflow hourly.
|
|
1155
|
+
daily : bool, default True
|
|
1156
|
+
Run the workflow daily.
|
|
1157
|
+
weekly : bool, default False
|
|
1158
|
+
Run the workflow weekly.
|
|
1159
|
+
cron : str, optional, default None
|
|
1160
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
|
1161
|
+
specified by this expression.
|
|
1162
|
+
timezone : str, optional, default None
|
|
1163
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
|
1164
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
|
1054
1165
|
"""
|
|
1055
1166
|
...
|
|
1056
1167
|
|
|
@@ -1191,154 +1302,43 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
|
1191
1302
|
...
|
|
1192
1303
|
|
|
1193
1304
|
@typing.overload
|
|
1194
|
-
def
|
|
1195
|
-
"""
|
|
1196
|
-
Specifies the times when the flow should be run when running on a
|
|
1197
|
-
production scheduler.
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
Parameters
|
|
1201
|
-
----------
|
|
1202
|
-
hourly : bool, default False
|
|
1203
|
-
Run the workflow hourly.
|
|
1204
|
-
daily : bool, default True
|
|
1205
|
-
Run the workflow daily.
|
|
1206
|
-
weekly : bool, default False
|
|
1207
|
-
Run the workflow weekly.
|
|
1208
|
-
cron : str, optional, default None
|
|
1209
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
|
1210
|
-
specified by this expression.
|
|
1211
|
-
timezone : str, optional, default None
|
|
1212
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
|
1213
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
|
1214
|
-
"""
|
|
1215
|
-
...
|
|
1216
|
-
|
|
1217
|
-
@typing.overload
|
|
1218
|
-
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
1219
|
-
...
|
|
1220
|
-
|
|
1221
|
-
def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None):
|
|
1222
|
-
"""
|
|
1223
|
-
Specifies the times when the flow should be run when running on a
|
|
1224
|
-
production scheduler.
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
Parameters
|
|
1228
|
-
----------
|
|
1229
|
-
hourly : bool, default False
|
|
1230
|
-
Run the workflow hourly.
|
|
1231
|
-
daily : bool, default True
|
|
1232
|
-
Run the workflow daily.
|
|
1233
|
-
weekly : bool, default False
|
|
1234
|
-
Run the workflow weekly.
|
|
1235
|
-
cron : str, optional, default None
|
|
1236
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
|
1237
|
-
specified by this expression.
|
|
1238
|
-
timezone : str, optional, default None
|
|
1239
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
|
1240
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
|
1241
|
-
"""
|
|
1242
|
-
...
|
|
1243
|
-
|
|
1244
|
-
@typing.overload
|
|
1245
|
-
def trigger_on_finish(*, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
1305
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
1246
1306
|
"""
|
|
1247
|
-
Specifies the
|
|
1248
|
-
|
|
1249
|
-
```
|
|
1250
|
-
@trigger_on_finish(flow='FooFlow')
|
|
1251
|
-
```
|
|
1252
|
-
or
|
|
1253
|
-
```
|
|
1254
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
|
1255
|
-
```
|
|
1256
|
-
This decorator respects the @project decorator and triggers the flow
|
|
1257
|
-
when upstream runs within the same namespace complete successfully
|
|
1258
|
-
|
|
1259
|
-
Additionally, you can specify project aware upstream flow dependencies
|
|
1260
|
-
by specifying the fully qualified project_flow_name.
|
|
1261
|
-
```
|
|
1262
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
|
1263
|
-
```
|
|
1264
|
-
or
|
|
1265
|
-
```
|
|
1266
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
|
1267
|
-
```
|
|
1268
|
-
|
|
1269
|
-
You can also specify just the project or project branch (other values will be
|
|
1270
|
-
inferred from the current project or project branch):
|
|
1271
|
-
```
|
|
1272
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
|
1273
|
-
```
|
|
1274
|
-
|
|
1275
|
-
Note that `branch` is typically one of:
|
|
1276
|
-
- `prod`
|
|
1277
|
-
- `user.bob`
|
|
1278
|
-
- `test.my_experiment`
|
|
1279
|
-
- `prod.staging`
|
|
1307
|
+
Specifies the PyPI packages for all steps of the flow.
|
|
1280
1308
|
|
|
1309
|
+
Use `@pypi_base` to set common packages required by all
|
|
1310
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
1281
1311
|
|
|
1282
1312
|
Parameters
|
|
1283
1313
|
----------
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1314
|
+
packages : Dict[str, str], default: {}
|
|
1315
|
+
Packages to use for this flow. The key is the name of the package
|
|
1316
|
+
and the value is the version to use.
|
|
1317
|
+
python : str, optional, default: None
|
|
1318
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
1319
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
1290
1320
|
"""
|
|
1291
1321
|
...
|
|
1292
1322
|
|
|
1293
1323
|
@typing.overload
|
|
1294
|
-
def
|
|
1324
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
1295
1325
|
...
|
|
1296
1326
|
|
|
1297
|
-
def
|
|
1327
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
|
1298
1328
|
"""
|
|
1299
|
-
Specifies the
|
|
1300
|
-
|
|
1301
|
-
```
|
|
1302
|
-
@trigger_on_finish(flow='FooFlow')
|
|
1303
|
-
```
|
|
1304
|
-
or
|
|
1305
|
-
```
|
|
1306
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
|
1307
|
-
```
|
|
1308
|
-
This decorator respects the @project decorator and triggers the flow
|
|
1309
|
-
when upstream runs within the same namespace complete successfully
|
|
1310
|
-
|
|
1311
|
-
Additionally, you can specify project aware upstream flow dependencies
|
|
1312
|
-
by specifying the fully qualified project_flow_name.
|
|
1313
|
-
```
|
|
1314
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
|
1315
|
-
```
|
|
1316
|
-
or
|
|
1317
|
-
```
|
|
1318
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
|
1319
|
-
```
|
|
1320
|
-
|
|
1321
|
-
You can also specify just the project or project branch (other values will be
|
|
1322
|
-
inferred from the current project or project branch):
|
|
1323
|
-
```
|
|
1324
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
|
1325
|
-
```
|
|
1326
|
-
|
|
1327
|
-
Note that `branch` is typically one of:
|
|
1328
|
-
- `prod`
|
|
1329
|
-
- `user.bob`
|
|
1330
|
-
- `test.my_experiment`
|
|
1331
|
-
- `prod.staging`
|
|
1329
|
+
Specifies the PyPI packages for all steps of the flow.
|
|
1332
1330
|
|
|
1331
|
+
Use `@pypi_base` to set common packages required by all
|
|
1332
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
1333
1333
|
|
|
1334
1334
|
Parameters
|
|
1335
1335
|
----------
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1336
|
+
packages : Dict[str, str], default: {}
|
|
1337
|
+
Packages to use for this flow. The key is the name of the package
|
|
1338
|
+
and the value is the version to use.
|
|
1339
|
+
python : str, optional, default: None
|
|
1340
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
1341
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
1342
1342
|
"""
|
|
1343
1343
|
...
|
|
1344
1344
|
|