metaflow-stubs 2.15.14__py2.py3-none-any.whl → 2.15.15__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 +474 -474
- 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 +4 -4
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/events.pyi +2 -2
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +4 -4
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +3 -3
- metaflow-stubs/info_file.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 +6 -6
- metaflow-stubs/metaflow_git.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +3 -3
- metaflow-stubs/plugins/__init__.pyi +9 -9
- 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 +3 -3
- 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 +4 -4
- 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 +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
- 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 +4 -4
- 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 +2 -2
- 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 +2 -2
- 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/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 +4 -4
- 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 +3 -3
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
- 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 +3 -3
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/secrets/secrets_decorator.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 +2 -2
- 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 +29 -29
- metaflow-stubs/runner/deployer_impl.pyi +5 -2
- metaflow-stubs/runner/metaflow_runner.pyi +6 -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 +5 -2
- metaflow-stubs/system/__init__.pyi +2 -2
- metaflow-stubs/system/system_logger.pyi +3 -3
- 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_decorators.pyi +5 -5
- metaflow-stubs/user_configs/config_options.pyi +2 -2
- metaflow-stubs/user_configs/config_parameters.pyi +78 -18
- metaflow-stubs/version.pyi +2 -2
- {metaflow_stubs-2.15.14.dist-info → metaflow_stubs-2.15.15.dist-info}/METADATA +2 -2
- metaflow_stubs-2.15.15.dist-info/RECORD +149 -0
- {metaflow_stubs-2.15.14.dist-info → metaflow_stubs-2.15.15.dist-info}/WHEEL +1 -1
- metaflow_stubs-2.15.14.dist-info/RECORD +0 -149
- {metaflow_stubs-2.15.14.dist-info → metaflow_stubs-2.15.15.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.15.
|
4
|
-
# Generated on 2025-05-
|
3
|
+
# MF version: 2.15.15 #
|
4
|
+
# Generated on 2025-05-30T13:33:59.796602 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -35,8 +35,8 @@ from .user_configs.config_parameters import ConfigValue as ConfigValue
|
|
35
35
|
from .user_configs.config_parameters import config_expr as config_expr
|
36
36
|
from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
|
37
37
|
from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
|
38
|
-
from . import tuple_util as tuple_util
|
39
38
|
from . import events as events
|
39
|
+
from . import tuple_util as tuple_util
|
40
40
|
from . import metaflow_git as metaflow_git
|
41
41
|
from . import runner as runner
|
42
42
|
from . import plugins as plugins
|
@@ -44,8 +44,8 @@ from .plugins.datatools.s3.s3 import S3 as S3
|
|
44
44
|
from . import includefile as includefile
|
45
45
|
from .includefile import IncludeFile as IncludeFile
|
46
46
|
from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
|
47
|
-
from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
|
48
47
|
from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
|
48
|
+
from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
|
49
49
|
from . import cards as cards
|
50
50
|
from . import client as client
|
51
51
|
from .client.core import namespace as namespace
|
@@ -147,57 +147,72 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
147
147
|
...
|
148
148
|
|
149
149
|
@typing.overload
|
150
|
-
def
|
150
|
+
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]]]:
|
151
151
|
"""
|
152
|
-
Specifies the
|
153
|
-
to a step needs to be retried.
|
154
|
-
|
155
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
156
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
157
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
152
|
+
Specifies that the step will success under all circumstances.
|
158
153
|
|
159
|
-
|
160
|
-
|
161
|
-
|
154
|
+
The decorator will create an optional artifact, specified by `var`, which
|
155
|
+
contains the exception raised. You can use it to detect the presence
|
156
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
157
|
+
are missing.
|
162
158
|
|
163
159
|
|
164
160
|
Parameters
|
165
161
|
----------
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
162
|
+
var : str, optional, default None
|
163
|
+
Name of the artifact in which to store the caught exception.
|
164
|
+
If not specified, the exception is not stored.
|
165
|
+
print_exception : bool, default True
|
166
|
+
Determines whether or not the exception is printed to
|
167
|
+
stdout when caught.
|
170
168
|
"""
|
171
169
|
...
|
172
170
|
|
173
171
|
@typing.overload
|
174
|
-
def
|
172
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
175
173
|
...
|
176
174
|
|
177
175
|
@typing.overload
|
178
|
-
def
|
176
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
179
177
|
...
|
180
178
|
|
181
|
-
def
|
179
|
+
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):
|
182
180
|
"""
|
183
|
-
Specifies the
|
184
|
-
to a step needs to be retried.
|
185
|
-
|
186
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
187
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
188
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
181
|
+
Specifies that the step will success under all circumstances.
|
189
182
|
|
190
|
-
|
191
|
-
|
192
|
-
|
183
|
+
The decorator will create an optional artifact, specified by `var`, which
|
184
|
+
contains the exception raised. You can use it to detect the presence
|
185
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
186
|
+
are missing.
|
193
187
|
|
194
188
|
|
195
189
|
Parameters
|
196
190
|
----------
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
191
|
+
var : str, optional, default None
|
192
|
+
Name of the artifact in which to store the caught exception.
|
193
|
+
If not specified, the exception is not stored.
|
194
|
+
print_exception : bool, default True
|
195
|
+
Determines whether or not the exception is printed to
|
196
|
+
stdout when caught.
|
197
|
+
"""
|
198
|
+
...
|
199
|
+
|
200
|
+
@typing.overload
|
201
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
202
|
+
"""
|
203
|
+
Decorator prototype for all step decorators. This function gets specialized
|
204
|
+
and imported for all decorators types by _import_plugin_decorators().
|
205
|
+
"""
|
206
|
+
...
|
207
|
+
|
208
|
+
@typing.overload
|
209
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
210
|
+
...
|
211
|
+
|
212
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
213
|
+
"""
|
214
|
+
Decorator prototype for all step decorators. This function gets specialized
|
215
|
+
and imported for all decorators types by _import_plugin_decorators().
|
201
216
|
"""
|
202
217
|
...
|
203
218
|
|
@@ -286,6 +301,55 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
|
|
286
301
|
"""
|
287
302
|
...
|
288
303
|
|
304
|
+
@typing.overload
|
305
|
+
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]]]:
|
306
|
+
"""
|
307
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
308
|
+
|
309
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
310
|
+
|
311
|
+
|
312
|
+
Parameters
|
313
|
+
----------
|
314
|
+
type : str, default 'default'
|
315
|
+
Card type.
|
316
|
+
id : str, optional, default None
|
317
|
+
If multiple cards are present, use this id to identify this card.
|
318
|
+
options : Dict[str, Any], default {}
|
319
|
+
Options passed to the card. The contents depend on the card type.
|
320
|
+
timeout : int, default 45
|
321
|
+
Interrupt reporting if it takes more than this many seconds.
|
322
|
+
"""
|
323
|
+
...
|
324
|
+
|
325
|
+
@typing.overload
|
326
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
327
|
+
...
|
328
|
+
|
329
|
+
@typing.overload
|
330
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
331
|
+
...
|
332
|
+
|
333
|
+
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):
|
334
|
+
"""
|
335
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
336
|
+
|
337
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
338
|
+
|
339
|
+
|
340
|
+
Parameters
|
341
|
+
----------
|
342
|
+
type : str, default 'default'
|
343
|
+
Card type.
|
344
|
+
id : str, optional, default None
|
345
|
+
If multiple cards are present, use this id to identify this card.
|
346
|
+
options : Dict[str, Any], default {}
|
347
|
+
Options passed to the card. The contents depend on the card type.
|
348
|
+
timeout : int, default 45
|
349
|
+
Interrupt reporting if it takes more than this many seconds.
|
350
|
+
"""
|
351
|
+
...
|
352
|
+
|
289
353
|
@typing.overload
|
290
354
|
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]]]:
|
291
355
|
"""
|
@@ -435,6 +499,90 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
435
499
|
"""
|
436
500
|
...
|
437
501
|
|
502
|
+
@typing.overload
|
503
|
+
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]]]:
|
504
|
+
"""
|
505
|
+
Specifies the PyPI packages for the step.
|
506
|
+
|
507
|
+
Information in this decorator will augment any
|
508
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
509
|
+
you can use `@pypi_base` to set packages required by all
|
510
|
+
steps and use `@pypi` to specify step-specific overrides.
|
511
|
+
|
512
|
+
|
513
|
+
Parameters
|
514
|
+
----------
|
515
|
+
packages : Dict[str, str], default: {}
|
516
|
+
Packages to use for this step. The key is the name of the package
|
517
|
+
and the value is the version to use.
|
518
|
+
python : str, optional, default: None
|
519
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
520
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
521
|
+
"""
|
522
|
+
...
|
523
|
+
|
524
|
+
@typing.overload
|
525
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
526
|
+
...
|
527
|
+
|
528
|
+
@typing.overload
|
529
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
530
|
+
...
|
531
|
+
|
532
|
+
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):
|
533
|
+
"""
|
534
|
+
Specifies the PyPI packages for the step.
|
535
|
+
|
536
|
+
Information in this decorator will augment any
|
537
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
538
|
+
you can use `@pypi_base` to set packages required by all
|
539
|
+
steps and use `@pypi` to specify step-specific overrides.
|
540
|
+
|
541
|
+
|
542
|
+
Parameters
|
543
|
+
----------
|
544
|
+
packages : Dict[str, str], default: {}
|
545
|
+
Packages to use for this step. The key is the name of the package
|
546
|
+
and the value is the version to use.
|
547
|
+
python : str, optional, default: None
|
548
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
549
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
550
|
+
"""
|
551
|
+
...
|
552
|
+
|
553
|
+
@typing.overload
|
554
|
+
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]]]:
|
555
|
+
"""
|
556
|
+
Specifies environment variables to be set prior to the execution of a step.
|
557
|
+
|
558
|
+
|
559
|
+
Parameters
|
560
|
+
----------
|
561
|
+
vars : Dict[str, str], default {}
|
562
|
+
Dictionary of environment variables to set.
|
563
|
+
"""
|
564
|
+
...
|
565
|
+
|
566
|
+
@typing.overload
|
567
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
568
|
+
...
|
569
|
+
|
570
|
+
@typing.overload
|
571
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
572
|
+
...
|
573
|
+
|
574
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
575
|
+
"""
|
576
|
+
Specifies environment variables to be set prior to the execution of a step.
|
577
|
+
|
578
|
+
|
579
|
+
Parameters
|
580
|
+
----------
|
581
|
+
vars : Dict[str, str], default {}
|
582
|
+
Dictionary of environment variables to set.
|
583
|
+
"""
|
584
|
+
...
|
585
|
+
|
438
586
|
@typing.overload
|
439
587
|
def conda(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> 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]]]:
|
440
588
|
"""
|
@@ -495,50 +643,62 @@ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
495
643
|
...
|
496
644
|
|
497
645
|
@typing.overload
|
498
|
-
def
|
646
|
+
def retry(*, times: int = 3, minutes_between_retries: int = 2) -> 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]]]:
|
499
647
|
"""
|
500
|
-
Specifies the
|
648
|
+
Specifies the number of times the task corresponding
|
649
|
+
to a step needs to be retried.
|
501
650
|
|
502
|
-
|
503
|
-
|
651
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
652
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
653
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
504
654
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
```
|
509
|
-
or
|
510
|
-
```
|
511
|
-
python myflow.py run --with kubernetes
|
512
|
-
```
|
513
|
-
which executes the flow on the desired system using the
|
514
|
-
requirements specified in `@resources`.
|
655
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
656
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
657
|
+
ensuring that the flow execution can continue.
|
515
658
|
|
516
659
|
|
517
660
|
Parameters
|
518
661
|
----------
|
519
|
-
|
520
|
-
Number of
|
521
|
-
|
522
|
-
Number of
|
523
|
-
disk : int, optional, default None
|
524
|
-
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
525
|
-
memory : int, default 4096
|
526
|
-
Memory size (in MB) required for this step.
|
527
|
-
shared_memory : int, optional, default None
|
528
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
529
|
-
This parameter maps to the `--shm-size` option in Docker.
|
662
|
+
times : int, default 3
|
663
|
+
Number of times to retry this task.
|
664
|
+
minutes_between_retries : int, default 2
|
665
|
+
Number of minutes between retries.
|
530
666
|
"""
|
531
667
|
...
|
532
668
|
|
533
669
|
@typing.overload
|
534
|
-
def
|
670
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
535
671
|
...
|
536
672
|
|
537
673
|
@typing.overload
|
538
|
-
def
|
674
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
539
675
|
...
|
540
676
|
|
541
|
-
def
|
677
|
+
def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
|
678
|
+
"""
|
679
|
+
Specifies the number of times the task corresponding
|
680
|
+
to a step needs to be retried.
|
681
|
+
|
682
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
683
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
684
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
685
|
+
|
686
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
687
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
688
|
+
ensuring that the flow execution can continue.
|
689
|
+
|
690
|
+
|
691
|
+
Parameters
|
692
|
+
----------
|
693
|
+
times : int, default 3
|
694
|
+
Number of times to retry this task.
|
695
|
+
minutes_between_retries : int, default 2
|
696
|
+
Number of minutes between retries.
|
697
|
+
"""
|
698
|
+
...
|
699
|
+
|
700
|
+
@typing.overload
|
701
|
+
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]]]:
|
542
702
|
"""
|
543
703
|
Specifies the resources needed when executing this step.
|
544
704
|
|
@@ -574,105 +734,45 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
574
734
|
...
|
575
735
|
|
576
736
|
@typing.overload
|
577
|
-
def
|
578
|
-
"""
|
579
|
-
Decorator prototype for all step decorators. This function gets specialized
|
580
|
-
and imported for all decorators types by _import_plugin_decorators().
|
581
|
-
"""
|
582
|
-
...
|
583
|
-
|
584
|
-
@typing.overload
|
585
|
-
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
586
|
-
...
|
587
|
-
|
588
|
-
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
589
|
-
"""
|
590
|
-
Decorator prototype for all step decorators. This function gets specialized
|
591
|
-
and imported for all decorators types by _import_plugin_decorators().
|
592
|
-
"""
|
593
|
-
...
|
594
|
-
|
595
|
-
@typing.overload
|
596
|
-
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]]]:
|
597
|
-
"""
|
598
|
-
Specifies environment variables to be set prior to the execution of a step.
|
599
|
-
|
600
|
-
|
601
|
-
Parameters
|
602
|
-
----------
|
603
|
-
vars : Dict[str, str], default {}
|
604
|
-
Dictionary of environment variables to set.
|
605
|
-
"""
|
606
|
-
...
|
607
|
-
|
608
|
-
@typing.overload
|
609
|
-
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
737
|
+
def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
610
738
|
...
|
611
739
|
|
612
740
|
@typing.overload
|
613
|
-
def
|
614
|
-
...
|
615
|
-
|
616
|
-
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
617
|
-
"""
|
618
|
-
Specifies environment variables to be set prior to the execution of a step.
|
619
|
-
|
620
|
-
|
621
|
-
Parameters
|
622
|
-
----------
|
623
|
-
vars : Dict[str, str], default {}
|
624
|
-
Dictionary of environment variables to set.
|
625
|
-
"""
|
741
|
+
def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
626
742
|
...
|
627
743
|
|
628
|
-
|
629
|
-
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]]]:
|
744
|
+
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):
|
630
745
|
"""
|
631
|
-
Specifies the
|
632
|
-
|
633
|
-
Information in this decorator will augment any
|
634
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
635
|
-
you can use `@pypi_base` to set packages required by all
|
636
|
-
steps and use `@pypi` to specify step-specific overrides.
|
637
|
-
|
746
|
+
Specifies the resources needed when executing this step.
|
638
747
|
|
639
|
-
|
640
|
-
|
641
|
-
packages : Dict[str, str], default: {}
|
642
|
-
Packages to use for this step. The key is the name of the package
|
643
|
-
and the value is the version to use.
|
644
|
-
python : str, optional, default: None
|
645
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
646
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
647
|
-
"""
|
648
|
-
...
|
649
|
-
|
650
|
-
@typing.overload
|
651
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
652
|
-
...
|
653
|
-
|
654
|
-
@typing.overload
|
655
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
656
|
-
...
|
657
|
-
|
658
|
-
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):
|
659
|
-
"""
|
660
|
-
Specifies the PyPI packages for the step.
|
748
|
+
Use `@resources` to specify the resource requirements
|
749
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
661
750
|
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
751
|
+
You can choose the compute layer on the command line by executing e.g.
|
752
|
+
```
|
753
|
+
python myflow.py run --with batch
|
754
|
+
```
|
755
|
+
or
|
756
|
+
```
|
757
|
+
python myflow.py run --with kubernetes
|
758
|
+
```
|
759
|
+
which executes the flow on the desired system using the
|
760
|
+
requirements specified in `@resources`.
|
666
761
|
|
667
762
|
|
668
763
|
Parameters
|
669
764
|
----------
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
765
|
+
cpu : int, default 1
|
766
|
+
Number of CPUs required for this step.
|
767
|
+
gpu : int, optional, default None
|
768
|
+
Number of GPUs required for this step.
|
769
|
+
disk : int, optional, default None
|
770
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
771
|
+
memory : int, default 4096
|
772
|
+
Memory size (in MB) required for this step.
|
773
|
+
shared_memory : int, optional, default None
|
774
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
775
|
+
This parameter maps to the `--shm-size` option in Docker.
|
676
776
|
"""
|
677
777
|
...
|
678
778
|
|
@@ -770,250 +870,6 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
770
870
|
"""
|
771
871
|
...
|
772
872
|
|
773
|
-
@typing.overload
|
774
|
-
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]]]:
|
775
|
-
"""
|
776
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
777
|
-
|
778
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
779
|
-
|
780
|
-
|
781
|
-
Parameters
|
782
|
-
----------
|
783
|
-
type : str, default 'default'
|
784
|
-
Card type.
|
785
|
-
id : str, optional, default None
|
786
|
-
If multiple cards are present, use this id to identify this card.
|
787
|
-
options : Dict[str, Any], default {}
|
788
|
-
Options passed to the card. The contents depend on the card type.
|
789
|
-
timeout : int, default 45
|
790
|
-
Interrupt reporting if it takes more than this many seconds.
|
791
|
-
"""
|
792
|
-
...
|
793
|
-
|
794
|
-
@typing.overload
|
795
|
-
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
796
|
-
...
|
797
|
-
|
798
|
-
@typing.overload
|
799
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
800
|
-
...
|
801
|
-
|
802
|
-
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):
|
803
|
-
"""
|
804
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
805
|
-
|
806
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
807
|
-
|
808
|
-
|
809
|
-
Parameters
|
810
|
-
----------
|
811
|
-
type : str, default 'default'
|
812
|
-
Card type.
|
813
|
-
id : str, optional, default None
|
814
|
-
If multiple cards are present, use this id to identify this card.
|
815
|
-
options : Dict[str, Any], default {}
|
816
|
-
Options passed to the card. The contents depend on the card type.
|
817
|
-
timeout : int, default 45
|
818
|
-
Interrupt reporting if it takes more than this many seconds.
|
819
|
-
"""
|
820
|
-
...
|
821
|
-
|
822
|
-
@typing.overload
|
823
|
-
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]]]:
|
824
|
-
"""
|
825
|
-
Specifies that the step will success under all circumstances.
|
826
|
-
|
827
|
-
The decorator will create an optional artifact, specified by `var`, which
|
828
|
-
contains the exception raised. You can use it to detect the presence
|
829
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
830
|
-
are missing.
|
831
|
-
|
832
|
-
|
833
|
-
Parameters
|
834
|
-
----------
|
835
|
-
var : str, optional, default None
|
836
|
-
Name of the artifact in which to store the caught exception.
|
837
|
-
If not specified, the exception is not stored.
|
838
|
-
print_exception : bool, default True
|
839
|
-
Determines whether or not the exception is printed to
|
840
|
-
stdout when caught.
|
841
|
-
"""
|
842
|
-
...
|
843
|
-
|
844
|
-
@typing.overload
|
845
|
-
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
846
|
-
...
|
847
|
-
|
848
|
-
@typing.overload
|
849
|
-
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
850
|
-
...
|
851
|
-
|
852
|
-
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):
|
853
|
-
"""
|
854
|
-
Specifies that the step will success under all circumstances.
|
855
|
-
|
856
|
-
The decorator will create an optional artifact, specified by `var`, which
|
857
|
-
contains the exception raised. You can use it to detect the presence
|
858
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
859
|
-
are missing.
|
860
|
-
|
861
|
-
|
862
|
-
Parameters
|
863
|
-
----------
|
864
|
-
var : str, optional, default None
|
865
|
-
Name of the artifact in which to store the caught exception.
|
866
|
-
If not specified, the exception is not stored.
|
867
|
-
print_exception : bool, default True
|
868
|
-
Determines whether or not the exception is printed to
|
869
|
-
stdout when caught.
|
870
|
-
"""
|
871
|
-
...
|
872
|
-
|
873
|
-
@typing.overload
|
874
|
-
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]]:
|
875
|
-
"""
|
876
|
-
Specifies the flow(s) that this flow depends on.
|
877
|
-
|
878
|
-
```
|
879
|
-
@trigger_on_finish(flow='FooFlow')
|
880
|
-
```
|
881
|
-
or
|
882
|
-
```
|
883
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
884
|
-
```
|
885
|
-
This decorator respects the @project decorator and triggers the flow
|
886
|
-
when upstream runs within the same namespace complete successfully
|
887
|
-
|
888
|
-
Additionally, you can specify project aware upstream flow dependencies
|
889
|
-
by specifying the fully qualified project_flow_name.
|
890
|
-
```
|
891
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
892
|
-
```
|
893
|
-
or
|
894
|
-
```
|
895
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
896
|
-
```
|
897
|
-
|
898
|
-
You can also specify just the project or project branch (other values will be
|
899
|
-
inferred from the current project or project branch):
|
900
|
-
```
|
901
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
902
|
-
```
|
903
|
-
|
904
|
-
Note that `branch` is typically one of:
|
905
|
-
- `prod`
|
906
|
-
- `user.bob`
|
907
|
-
- `test.my_experiment`
|
908
|
-
- `prod.staging`
|
909
|
-
|
910
|
-
|
911
|
-
Parameters
|
912
|
-
----------
|
913
|
-
flow : Union[str, Dict[str, str]], optional, default None
|
914
|
-
Upstream flow dependency for this flow.
|
915
|
-
flows : List[Union[str, Dict[str, str]]], default []
|
916
|
-
Upstream flow dependencies for this flow.
|
917
|
-
options : Dict[str, Any], default {}
|
918
|
-
Backend-specific configuration for tuning eventing behavior.
|
919
|
-
"""
|
920
|
-
...
|
921
|
-
|
922
|
-
@typing.overload
|
923
|
-
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
924
|
-
...
|
925
|
-
|
926
|
-
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] = {}):
|
927
|
-
"""
|
928
|
-
Specifies the flow(s) that this flow depends on.
|
929
|
-
|
930
|
-
```
|
931
|
-
@trigger_on_finish(flow='FooFlow')
|
932
|
-
```
|
933
|
-
or
|
934
|
-
```
|
935
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
936
|
-
```
|
937
|
-
This decorator respects the @project decorator and triggers the flow
|
938
|
-
when upstream runs within the same namespace complete successfully
|
939
|
-
|
940
|
-
Additionally, you can specify project aware upstream flow dependencies
|
941
|
-
by specifying the fully qualified project_flow_name.
|
942
|
-
```
|
943
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
944
|
-
```
|
945
|
-
or
|
946
|
-
```
|
947
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
948
|
-
```
|
949
|
-
|
950
|
-
You can also specify just the project or project branch (other values will be
|
951
|
-
inferred from the current project or project branch):
|
952
|
-
```
|
953
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
954
|
-
```
|
955
|
-
|
956
|
-
Note that `branch` is typically one of:
|
957
|
-
- `prod`
|
958
|
-
- `user.bob`
|
959
|
-
- `test.my_experiment`
|
960
|
-
- `prod.staging`
|
961
|
-
|
962
|
-
|
963
|
-
Parameters
|
964
|
-
----------
|
965
|
-
flow : Union[str, Dict[str, str]], optional, default None
|
966
|
-
Upstream flow dependency for this flow.
|
967
|
-
flows : List[Union[str, Dict[str, str]]], default []
|
968
|
-
Upstream flow dependencies for this flow.
|
969
|
-
options : Dict[str, Any], default {}
|
970
|
-
Backend-specific configuration for tuning eventing behavior.
|
971
|
-
"""
|
972
|
-
...
|
973
|
-
|
974
|
-
def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, external_dag_id: str, external_task_ids: typing.List[str], allowed_states: typing.List[str], failed_states: typing.List[str], execution_delta: "datetime.timedelta", check_existence: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
975
|
-
"""
|
976
|
-
The `@airflow_external_task_sensor` decorator attaches a Airflow [ExternalTaskSensor](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/sensors/external_task/index.html#airflow.sensors.external_task.ExternalTaskSensor) before the start step of the flow.
|
977
|
-
This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
|
978
|
-
|
979
|
-
|
980
|
-
Parameters
|
981
|
-
----------
|
982
|
-
timeout : int
|
983
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
984
|
-
poke_interval : int
|
985
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
986
|
-
mode : str
|
987
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
988
|
-
exponential_backoff : bool
|
989
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
990
|
-
pool : str
|
991
|
-
the slot pool this task should run in,
|
992
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
993
|
-
soft_fail : bool
|
994
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
995
|
-
name : str
|
996
|
-
Name of the sensor on Airflow
|
997
|
-
description : str
|
998
|
-
Description of sensor in the Airflow UI
|
999
|
-
external_dag_id : str
|
1000
|
-
The dag_id that contains the task you want to wait for.
|
1001
|
-
external_task_ids : List[str]
|
1002
|
-
The list of task_ids that you want to wait for.
|
1003
|
-
If None (default value) the sensor waits for the DAG. (Default: None)
|
1004
|
-
allowed_states : List[str]
|
1005
|
-
Iterable of allowed states, (Default: ['success'])
|
1006
|
-
failed_states : List[str]
|
1007
|
-
Iterable of failed or dis-allowed states. (Default: None)
|
1008
|
-
execution_delta : datetime.timedelta
|
1009
|
-
time difference with the previous execution to look at,
|
1010
|
-
the default is the same logical date as the current task or DAG. (Default: None)
|
1011
|
-
check_existence: bool
|
1012
|
-
Set to True to check if the external task exists or check if
|
1013
|
-
the DAG to wait for exists. (Default: True)
|
1014
|
-
"""
|
1015
|
-
...
|
1016
|
-
|
1017
873
|
@typing.overload
|
1018
874
|
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1019
875
|
"""
|
@@ -1045,56 +901,13 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
|
|
1045
901
|
steps and use `@pypi` to specify step-specific overrides.
|
1046
902
|
|
1047
903
|
Parameters
|
1048
|
-
----------
|
1049
|
-
packages : Dict[str, str], default: {}
|
1050
|
-
Packages to use for this flow. The key is the name of the package
|
1051
|
-
and the value is the version to use.
|
1052
|
-
python : str, optional, default: None
|
1053
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1054
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1055
|
-
"""
|
1056
|
-
...
|
1057
|
-
|
1058
|
-
def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1059
|
-
"""
|
1060
|
-
The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
|
1061
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1062
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1063
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1064
|
-
starts only after all sensors finish.
|
1065
|
-
|
1066
|
-
|
1067
|
-
Parameters
|
1068
|
-
----------
|
1069
|
-
timeout : int
|
1070
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1071
|
-
poke_interval : int
|
1072
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1073
|
-
mode : str
|
1074
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1075
|
-
exponential_backoff : bool
|
1076
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1077
|
-
pool : str
|
1078
|
-
the slot pool this task should run in,
|
1079
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1080
|
-
soft_fail : bool
|
1081
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1082
|
-
name : str
|
1083
|
-
Name of the sensor on Airflow
|
1084
|
-
description : str
|
1085
|
-
Description of sensor in the Airflow UI
|
1086
|
-
bucket_key : Union[str, List[str]]
|
1087
|
-
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1088
|
-
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1089
|
-
bucket_name : str
|
1090
|
-
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1091
|
-
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1092
|
-
wildcard_match : bool
|
1093
|
-
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1094
|
-
aws_conn_id : str
|
1095
|
-
a reference to the s3 connection on Airflow. (Default: None)
|
1096
|
-
verify : bool
|
1097
|
-
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
904
|
+
----------
|
905
|
+
packages : Dict[str, str], default: {}
|
906
|
+
Packages to use for this flow. The key is the name of the package
|
907
|
+
and the value is the version to use.
|
908
|
+
python : str, optional, default: None
|
909
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
910
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1098
911
|
"""
|
1099
912
|
...
|
1100
913
|
|
@@ -1192,53 +1005,103 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1192
1005
|
...
|
1193
1006
|
|
1194
1007
|
@typing.overload
|
1195
|
-
def
|
1008
|
+
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]]:
|
1196
1009
|
"""
|
1197
|
-
Specifies the
|
1198
|
-
|
1010
|
+
Specifies the flow(s) that this flow depends on.
|
1011
|
+
|
1012
|
+
```
|
1013
|
+
@trigger_on_finish(flow='FooFlow')
|
1014
|
+
```
|
1015
|
+
or
|
1016
|
+
```
|
1017
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1018
|
+
```
|
1019
|
+
This decorator respects the @project decorator and triggers the flow
|
1020
|
+
when upstream runs within the same namespace complete successfully
|
1021
|
+
|
1022
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1023
|
+
by specifying the fully qualified project_flow_name.
|
1024
|
+
```
|
1025
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1026
|
+
```
|
1027
|
+
or
|
1028
|
+
```
|
1029
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1030
|
+
```
|
1031
|
+
|
1032
|
+
You can also specify just the project or project branch (other values will be
|
1033
|
+
inferred from the current project or project branch):
|
1034
|
+
```
|
1035
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1036
|
+
```
|
1037
|
+
|
1038
|
+
Note that `branch` is typically one of:
|
1039
|
+
- `prod`
|
1040
|
+
- `user.bob`
|
1041
|
+
- `test.my_experiment`
|
1042
|
+
- `prod.staging`
|
1199
1043
|
|
1200
1044
|
|
1201
1045
|
Parameters
|
1202
1046
|
----------
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
cron : str, optional, default None
|
1210
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1211
|
-
specified by this expression.
|
1212
|
-
timezone : str, optional, default None
|
1213
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1214
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1047
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1048
|
+
Upstream flow dependency for this flow.
|
1049
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1050
|
+
Upstream flow dependencies for this flow.
|
1051
|
+
options : Dict[str, Any], default {}
|
1052
|
+
Backend-specific configuration for tuning eventing behavior.
|
1215
1053
|
"""
|
1216
1054
|
...
|
1217
1055
|
|
1218
1056
|
@typing.overload
|
1219
|
-
def
|
1057
|
+
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1220
1058
|
...
|
1221
1059
|
|
1222
|
-
def
|
1060
|
+
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] = {}):
|
1223
1061
|
"""
|
1224
|
-
Specifies the
|
1225
|
-
|
1062
|
+
Specifies the flow(s) that this flow depends on.
|
1063
|
+
|
1064
|
+
```
|
1065
|
+
@trigger_on_finish(flow='FooFlow')
|
1066
|
+
```
|
1067
|
+
or
|
1068
|
+
```
|
1069
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1070
|
+
```
|
1071
|
+
This decorator respects the @project decorator and triggers the flow
|
1072
|
+
when upstream runs within the same namespace complete successfully
|
1073
|
+
|
1074
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1075
|
+
by specifying the fully qualified project_flow_name.
|
1076
|
+
```
|
1077
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1078
|
+
```
|
1079
|
+
or
|
1080
|
+
```
|
1081
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1082
|
+
```
|
1083
|
+
|
1084
|
+
You can also specify just the project or project branch (other values will be
|
1085
|
+
inferred from the current project or project branch):
|
1086
|
+
```
|
1087
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1088
|
+
```
|
1089
|
+
|
1090
|
+
Note that `branch` is typically one of:
|
1091
|
+
- `prod`
|
1092
|
+
- `user.bob`
|
1093
|
+
- `test.my_experiment`
|
1094
|
+
- `prod.staging`
|
1226
1095
|
|
1227
1096
|
|
1228
1097
|
Parameters
|
1229
1098
|
----------
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
cron : str, optional, default None
|
1237
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1238
|
-
specified by this expression.
|
1239
|
-
timezone : str, optional, default None
|
1240
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1241
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1099
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1100
|
+
Upstream flow dependency for this flow.
|
1101
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1102
|
+
Upstream flow dependencies for this flow.
|
1103
|
+
options : Dict[str, Any], default {}
|
1104
|
+
Backend-specific configuration for tuning eventing behavior.
|
1242
1105
|
"""
|
1243
1106
|
...
|
1244
1107
|
|
@@ -1277,6 +1140,92 @@ def project(*, name: str, branch: typing.Optional[str] = None, production: bool
|
|
1277
1140
|
"""
|
1278
1141
|
...
|
1279
1142
|
|
1143
|
+
def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, external_dag_id: str, external_task_ids: typing.List[str], allowed_states: typing.List[str], failed_states: typing.List[str], execution_delta: "datetime.timedelta", check_existence: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1144
|
+
"""
|
1145
|
+
The `@airflow_external_task_sensor` decorator attaches a Airflow [ExternalTaskSensor](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/sensors/external_task/index.html#airflow.sensors.external_task.ExternalTaskSensor) before the start step of the flow.
|
1146
|
+
This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
|
1147
|
+
|
1148
|
+
|
1149
|
+
Parameters
|
1150
|
+
----------
|
1151
|
+
timeout : int
|
1152
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1153
|
+
poke_interval : int
|
1154
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1155
|
+
mode : str
|
1156
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1157
|
+
exponential_backoff : bool
|
1158
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1159
|
+
pool : str
|
1160
|
+
the slot pool this task should run in,
|
1161
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1162
|
+
soft_fail : bool
|
1163
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1164
|
+
name : str
|
1165
|
+
Name of the sensor on Airflow
|
1166
|
+
description : str
|
1167
|
+
Description of sensor in the Airflow UI
|
1168
|
+
external_dag_id : str
|
1169
|
+
The dag_id that contains the task you want to wait for.
|
1170
|
+
external_task_ids : List[str]
|
1171
|
+
The list of task_ids that you want to wait for.
|
1172
|
+
If None (default value) the sensor waits for the DAG. (Default: None)
|
1173
|
+
allowed_states : List[str]
|
1174
|
+
Iterable of allowed states, (Default: ['success'])
|
1175
|
+
failed_states : List[str]
|
1176
|
+
Iterable of failed or dis-allowed states. (Default: None)
|
1177
|
+
execution_delta : datetime.timedelta
|
1178
|
+
time difference with the previous execution to look at,
|
1179
|
+
the default is the same logical date as the current task or DAG. (Default: None)
|
1180
|
+
check_existence: bool
|
1181
|
+
Set to True to check if the external task exists or check if
|
1182
|
+
the DAG to wait for exists. (Default: True)
|
1183
|
+
"""
|
1184
|
+
...
|
1185
|
+
|
1186
|
+
def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1187
|
+
"""
|
1188
|
+
The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
|
1189
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1190
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1191
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1192
|
+
starts only after all sensors finish.
|
1193
|
+
|
1194
|
+
|
1195
|
+
Parameters
|
1196
|
+
----------
|
1197
|
+
timeout : int
|
1198
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1199
|
+
poke_interval : int
|
1200
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1201
|
+
mode : str
|
1202
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1203
|
+
exponential_backoff : bool
|
1204
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1205
|
+
pool : str
|
1206
|
+
the slot pool this task should run in,
|
1207
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1208
|
+
soft_fail : bool
|
1209
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1210
|
+
name : str
|
1211
|
+
Name of the sensor on Airflow
|
1212
|
+
description : str
|
1213
|
+
Description of sensor in the Airflow UI
|
1214
|
+
bucket_key : Union[str, List[str]]
|
1215
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1216
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1217
|
+
bucket_name : str
|
1218
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1219
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1220
|
+
wildcard_match : bool
|
1221
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1222
|
+
aws_conn_id : str
|
1223
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
1224
|
+
verify : bool
|
1225
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1226
|
+
"""
|
1227
|
+
...
|
1228
|
+
|
1280
1229
|
@typing.overload
|
1281
1230
|
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]]:
|
1282
1231
|
"""
|
@@ -1328,3 +1277,54 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
|
|
1328
1277
|
"""
|
1329
1278
|
...
|
1330
1279
|
|
1280
|
+
@typing.overload
|
1281
|
+
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]]:
|
1282
|
+
"""
|
1283
|
+
Specifies the times when the flow should be run when running on a
|
1284
|
+
production scheduler.
|
1285
|
+
|
1286
|
+
|
1287
|
+
Parameters
|
1288
|
+
----------
|
1289
|
+
hourly : bool, default False
|
1290
|
+
Run the workflow hourly.
|
1291
|
+
daily : bool, default True
|
1292
|
+
Run the workflow daily.
|
1293
|
+
weekly : bool, default False
|
1294
|
+
Run the workflow weekly.
|
1295
|
+
cron : str, optional, default None
|
1296
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1297
|
+
specified by this expression.
|
1298
|
+
timezone : str, optional, default None
|
1299
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1300
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1301
|
+
"""
|
1302
|
+
...
|
1303
|
+
|
1304
|
+
@typing.overload
|
1305
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1306
|
+
...
|
1307
|
+
|
1308
|
+
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):
|
1309
|
+
"""
|
1310
|
+
Specifies the times when the flow should be run when running on a
|
1311
|
+
production scheduler.
|
1312
|
+
|
1313
|
+
|
1314
|
+
Parameters
|
1315
|
+
----------
|
1316
|
+
hourly : bool, default False
|
1317
|
+
Run the workflow hourly.
|
1318
|
+
daily : bool, default True
|
1319
|
+
Run the workflow daily.
|
1320
|
+
weekly : bool, default False
|
1321
|
+
Run the workflow weekly.
|
1322
|
+
cron : str, optional, default None
|
1323
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1324
|
+
specified by this expression.
|
1325
|
+
timezone : str, optional, default None
|
1326
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1327
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1328
|
+
"""
|
1329
|
+
...
|
1330
|
+
|