metaflow-stubs 2.16.6__py2.py3-none-any.whl → 2.16.8__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 +424 -424
- 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 +6 -6
- metaflow-stubs/client/filecache.pyi +3 -3
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +6 -6
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +4 -4
- 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 +3 -3
- 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 +12 -12
- metaflow-stubs/packaging_sys/backend.pyi +21 -8
- metaflow-stubs/packaging_sys/distribution_support.pyi +4 -4
- metaflow-stubs/packaging_sys/tar_backend.pyi +17 -8
- metaflow-stubs/packaging_sys/utils.pyi +2 -2
- metaflow-stubs/packaging_sys/v1.pyi +3 -3
- 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 +33 -4
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +25 -3
- metaflow-stubs/plugins/argo/exit_hooks.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 +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 +14 -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 +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 +3 -3
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
- 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 +4 -4
- 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 +3 -3
- 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 +3 -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 +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 +3 -3
- 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 +3 -3
- 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 +54 -23
- metaflow-stubs/runner/deployer_impl.pyi +3 -3
- metaflow-stubs/runner/metaflow_runner.pyi +4 -4
- 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 -5
- 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_options.pyi +3 -3
- metaflow-stubs/user_configs/config_parameters.pyi +4 -4
- metaflow-stubs/user_decorators/__init__.pyi +2 -2
- metaflow-stubs/user_decorators/common.pyi +2 -2
- metaflow-stubs/user_decorators/mutable_flow.pyi +5 -5
- metaflow-stubs/user_decorators/mutable_step.pyi +5 -5
- metaflow-stubs/user_decorators/user_flow_decorator.pyi +5 -5
- metaflow-stubs/user_decorators/user_step_decorator.pyi +7 -7
- metaflow-stubs/version.pyi +2 -2
- {metaflow_stubs-2.16.6.dist-info → metaflow_stubs-2.16.8.dist-info}/METADATA +2 -2
- metaflow_stubs-2.16.8.dist-info/RECORD +166 -0
- metaflow_stubs-2.16.6.dist-info/RECORD +0 -166
- {metaflow_stubs-2.16.6.dist-info → metaflow_stubs-2.16.8.dist-info}/WHEEL +0 -0
- {metaflow_stubs-2.16.6.dist-info → metaflow_stubs-2.16.8.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
######################################################################################################
|
|
2
2
|
# Auto-generated Metaflow stub file #
|
|
3
|
-
# MF version: 2.16.
|
|
4
|
-
# Generated on 2025-07-
|
|
3
|
+
# MF version: 2.16.8 #
|
|
4
|
+
# Generated on 2025-07-29T19:28:34.106017 #
|
|
5
5
|
######################################################################################################
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
import typing
|
|
10
10
|
if typing.TYPE_CHECKING:
|
|
11
|
-
import datetime
|
|
12
11
|
import typing
|
|
12
|
+
import datetime
|
|
13
13
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
|
14
14
|
StepFlag = typing.NewType("StepFlag", bool)
|
|
15
15
|
|
|
@@ -39,9 +39,9 @@ from .user_decorators.user_step_decorator import UserStepDecorator as UserStepDe
|
|
|
39
39
|
from .user_decorators.user_step_decorator import StepMutator as StepMutator
|
|
40
40
|
from .user_decorators.user_step_decorator import user_step_decorator as user_step_decorator
|
|
41
41
|
from .user_decorators.user_flow_decorator import FlowMutator as FlowMutator
|
|
42
|
-
from . import tuple_util as tuple_util
|
|
43
42
|
from . import metaflow_git as metaflow_git
|
|
44
43
|
from . import events as events
|
|
44
|
+
from . import tuple_util as tuple_util
|
|
45
45
|
from . import runner as runner
|
|
46
46
|
from . import plugins as plugins
|
|
47
47
|
from .plugins.datatools.s3.s3 import S3 as S3
|
|
@@ -70,8 +70,8 @@ from .runner.deployer import Deployer as Deployer
|
|
|
70
70
|
from .runner.deployer import DeployedFlow as DeployedFlow
|
|
71
71
|
from .runner.nbdeploy import NBDeployer as NBDeployer
|
|
72
72
|
from . import version as version
|
|
73
|
-
from . import cli_components as cli_components
|
|
74
73
|
from . import system as system
|
|
74
|
+
from . import cli_components as cli_components
|
|
75
75
|
from . import pylint_wrapper as pylint_wrapper
|
|
76
76
|
from . import cli as cli
|
|
77
77
|
|
|
@@ -152,55 +152,6 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
|
152
152
|
"""
|
|
153
153
|
...
|
|
154
154
|
|
|
155
|
-
@typing.overload
|
|
156
|
-
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]]]:
|
|
157
|
-
"""
|
|
158
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
|
159
|
-
|
|
160
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
Parameters
|
|
164
|
-
----------
|
|
165
|
-
type : str, default 'default'
|
|
166
|
-
Card type.
|
|
167
|
-
id : str, optional, default None
|
|
168
|
-
If multiple cards are present, use this id to identify this card.
|
|
169
|
-
options : Dict[str, Any], default {}
|
|
170
|
-
Options passed to the card. The contents depend on the card type.
|
|
171
|
-
timeout : int, default 45
|
|
172
|
-
Interrupt reporting if it takes more than this many seconds.
|
|
173
|
-
"""
|
|
174
|
-
...
|
|
175
|
-
|
|
176
|
-
@typing.overload
|
|
177
|
-
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
178
|
-
...
|
|
179
|
-
|
|
180
|
-
@typing.overload
|
|
181
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
182
|
-
...
|
|
183
|
-
|
|
184
|
-
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):
|
|
185
|
-
"""
|
|
186
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
|
187
|
-
|
|
188
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
Parameters
|
|
192
|
-
----------
|
|
193
|
-
type : str, default 'default'
|
|
194
|
-
Card type.
|
|
195
|
-
id : str, optional, default None
|
|
196
|
-
If multiple cards are present, use this id to identify this card.
|
|
197
|
-
options : Dict[str, Any], default {}
|
|
198
|
-
Options passed to the card. The contents depend on the card type.
|
|
199
|
-
timeout : int, default 45
|
|
200
|
-
Interrupt reporting if it takes more than this many seconds.
|
|
201
|
-
"""
|
|
202
|
-
...
|
|
203
|
-
|
|
204
155
|
@typing.overload
|
|
205
156
|
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
206
157
|
"""
|
|
@@ -220,90 +171,6 @@ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
|
220
171
|
"""
|
|
221
172
|
...
|
|
222
173
|
|
|
223
|
-
@typing.overload
|
|
224
|
-
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]]]:
|
|
225
|
-
"""
|
|
226
|
-
Specifies that the step will success under all circumstances.
|
|
227
|
-
|
|
228
|
-
The decorator will create an optional artifact, specified by `var`, which
|
|
229
|
-
contains the exception raised. You can use it to detect the presence
|
|
230
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
|
231
|
-
are missing.
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
Parameters
|
|
235
|
-
----------
|
|
236
|
-
var : str, optional, default None
|
|
237
|
-
Name of the artifact in which to store the caught exception.
|
|
238
|
-
If not specified, the exception is not stored.
|
|
239
|
-
print_exception : bool, default True
|
|
240
|
-
Determines whether or not the exception is printed to
|
|
241
|
-
stdout when caught.
|
|
242
|
-
"""
|
|
243
|
-
...
|
|
244
|
-
|
|
245
|
-
@typing.overload
|
|
246
|
-
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
247
|
-
...
|
|
248
|
-
|
|
249
|
-
@typing.overload
|
|
250
|
-
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
251
|
-
...
|
|
252
|
-
|
|
253
|
-
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):
|
|
254
|
-
"""
|
|
255
|
-
Specifies that the step will success under all circumstances.
|
|
256
|
-
|
|
257
|
-
The decorator will create an optional artifact, specified by `var`, which
|
|
258
|
-
contains the exception raised. You can use it to detect the presence
|
|
259
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
|
260
|
-
are missing.
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
Parameters
|
|
264
|
-
----------
|
|
265
|
-
var : str, optional, default None
|
|
266
|
-
Name of the artifact in which to store the caught exception.
|
|
267
|
-
If not specified, the exception is not stored.
|
|
268
|
-
print_exception : bool, default True
|
|
269
|
-
Determines whether or not the exception is printed to
|
|
270
|
-
stdout when caught.
|
|
271
|
-
"""
|
|
272
|
-
...
|
|
273
|
-
|
|
274
|
-
@typing.overload
|
|
275
|
-
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]]]:
|
|
276
|
-
"""
|
|
277
|
-
Specifies environment variables to be set prior to the execution of a step.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
Parameters
|
|
281
|
-
----------
|
|
282
|
-
vars : Dict[str, str], default {}
|
|
283
|
-
Dictionary of environment variables to set.
|
|
284
|
-
"""
|
|
285
|
-
...
|
|
286
|
-
|
|
287
|
-
@typing.overload
|
|
288
|
-
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
289
|
-
...
|
|
290
|
-
|
|
291
|
-
@typing.overload
|
|
292
|
-
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
293
|
-
...
|
|
294
|
-
|
|
295
|
-
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
|
296
|
-
"""
|
|
297
|
-
Specifies environment variables to be set prior to the execution of a step.
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
Parameters
|
|
301
|
-
----------
|
|
302
|
-
vars : Dict[str, str], default {}
|
|
303
|
-
Dictionary of environment variables to set.
|
|
304
|
-
"""
|
|
305
|
-
...
|
|
306
|
-
|
|
307
174
|
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]]]:
|
|
308
175
|
"""
|
|
309
176
|
Specifies that this step should execute on Kubernetes.
|
|
@@ -393,6 +260,65 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
|
|
|
393
260
|
"""
|
|
394
261
|
...
|
|
395
262
|
|
|
263
|
+
@typing.overload
|
|
264
|
+
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]]]:
|
|
265
|
+
"""
|
|
266
|
+
Specifies the Conda environment for the step.
|
|
267
|
+
|
|
268
|
+
Information in this decorator will augment any
|
|
269
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
|
270
|
+
you can use `@conda_base` to set packages required by all
|
|
271
|
+
steps and use `@conda` to specify step-specific overrides.
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
Parameters
|
|
275
|
+
----------
|
|
276
|
+
packages : Dict[str, str], default {}
|
|
277
|
+
Packages to use for this step. The key is the name of the package
|
|
278
|
+
and the value is the version to use.
|
|
279
|
+
libraries : Dict[str, str], default {}
|
|
280
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
281
|
+
python : str, optional, default None
|
|
282
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
283
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
284
|
+
disabled : bool, default False
|
|
285
|
+
If set to True, disables @conda.
|
|
286
|
+
"""
|
|
287
|
+
...
|
|
288
|
+
|
|
289
|
+
@typing.overload
|
|
290
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
291
|
+
...
|
|
292
|
+
|
|
293
|
+
@typing.overload
|
|
294
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
295
|
+
...
|
|
296
|
+
|
|
297
|
+
def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
|
|
298
|
+
"""
|
|
299
|
+
Specifies the Conda environment for the step.
|
|
300
|
+
|
|
301
|
+
Information in this decorator will augment any
|
|
302
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
|
303
|
+
you can use `@conda_base` to set packages required by all
|
|
304
|
+
steps and use `@conda` to specify step-specific overrides.
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
Parameters
|
|
308
|
+
----------
|
|
309
|
+
packages : Dict[str, str], default {}
|
|
310
|
+
Packages to use for this step. The key is the name of the package
|
|
311
|
+
and the value is the version to use.
|
|
312
|
+
libraries : Dict[str, str], default {}
|
|
313
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
314
|
+
python : str, optional, default None
|
|
315
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
316
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
317
|
+
disabled : bool, default False
|
|
318
|
+
If set to True, disables @conda.
|
|
319
|
+
"""
|
|
320
|
+
...
|
|
321
|
+
|
|
396
322
|
@typing.overload
|
|
397
323
|
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]]]:
|
|
398
324
|
"""
|
|
@@ -473,63 +399,108 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
|
473
399
|
...
|
|
474
400
|
|
|
475
401
|
@typing.overload
|
|
476
|
-
def
|
|
402
|
+
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]]]:
|
|
477
403
|
"""
|
|
478
|
-
Specifies
|
|
479
|
-
|
|
480
|
-
This decorator is useful if this step may hang indefinitely.
|
|
404
|
+
Specifies the number of times the task corresponding
|
|
405
|
+
to a step needs to be retried.
|
|
481
406
|
|
|
482
|
-
This
|
|
483
|
-
|
|
484
|
-
|
|
407
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
|
408
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
|
409
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
|
485
410
|
|
|
486
|
-
|
|
487
|
-
|
|
411
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
|
412
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
|
413
|
+
ensuring that the flow execution can continue.
|
|
488
414
|
|
|
489
415
|
|
|
490
416
|
Parameters
|
|
491
417
|
----------
|
|
492
|
-
|
|
493
|
-
Number of
|
|
494
|
-
|
|
495
|
-
Number of minutes
|
|
496
|
-
hours : int, default 0
|
|
497
|
-
Number of hours to wait prior to timing out.
|
|
418
|
+
times : int, default 3
|
|
419
|
+
Number of times to retry this task.
|
|
420
|
+
minutes_between_retries : int, default 2
|
|
421
|
+
Number of minutes between retries.
|
|
498
422
|
"""
|
|
499
423
|
...
|
|
500
424
|
|
|
501
425
|
@typing.overload
|
|
502
|
-
def
|
|
426
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
503
427
|
...
|
|
504
428
|
|
|
505
429
|
@typing.overload
|
|
506
|
-
def
|
|
430
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
507
431
|
...
|
|
508
432
|
|
|
509
|
-
def
|
|
433
|
+
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):
|
|
510
434
|
"""
|
|
511
|
-
Specifies
|
|
512
|
-
|
|
513
|
-
This decorator is useful if this step may hang indefinitely.
|
|
435
|
+
Specifies the number of times the task corresponding
|
|
436
|
+
to a step needs to be retried.
|
|
514
437
|
|
|
515
|
-
This
|
|
516
|
-
|
|
517
|
-
|
|
438
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
|
439
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
|
440
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
|
518
441
|
|
|
519
|
-
|
|
520
|
-
|
|
442
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
|
443
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
|
444
|
+
ensuring that the flow execution can continue.
|
|
521
445
|
|
|
522
446
|
|
|
523
447
|
Parameters
|
|
524
448
|
----------
|
|
525
|
-
|
|
526
|
-
Number of
|
|
527
|
-
|
|
528
|
-
Number of minutes
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
449
|
+
times : int, default 3
|
|
450
|
+
Number of times to retry this task.
|
|
451
|
+
minutes_between_retries : int, default 2
|
|
452
|
+
Number of minutes between retries.
|
|
453
|
+
"""
|
|
454
|
+
...
|
|
455
|
+
|
|
456
|
+
@typing.overload
|
|
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
|
+
...
|
|
533
504
|
|
|
534
505
|
@typing.overload
|
|
535
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]]]:
|
|
@@ -680,6 +651,104 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
|
680
651
|
"""
|
|
681
652
|
...
|
|
682
653
|
|
|
654
|
+
@typing.overload
|
|
655
|
+
def timeout(*, seconds: int = 0, minutes: int = 0, hours: int = 0) -> 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]]]:
|
|
656
|
+
"""
|
|
657
|
+
Specifies a timeout for your step.
|
|
658
|
+
|
|
659
|
+
This decorator is useful if this step may hang indefinitely.
|
|
660
|
+
|
|
661
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
|
662
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
|
663
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
|
664
|
+
|
|
665
|
+
Note that all the values specified in parameters are added together so if you specify
|
|
666
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
Parameters
|
|
670
|
+
----------
|
|
671
|
+
seconds : int, default 0
|
|
672
|
+
Number of seconds to wait prior to timing out.
|
|
673
|
+
minutes : int, default 0
|
|
674
|
+
Number of minutes to wait prior to timing out.
|
|
675
|
+
hours : int, default 0
|
|
676
|
+
Number of hours to wait prior to timing out.
|
|
677
|
+
"""
|
|
678
|
+
...
|
|
679
|
+
|
|
680
|
+
@typing.overload
|
|
681
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
682
|
+
...
|
|
683
|
+
|
|
684
|
+
@typing.overload
|
|
685
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
686
|
+
...
|
|
687
|
+
|
|
688
|
+
def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
|
|
689
|
+
"""
|
|
690
|
+
Specifies a timeout for your step.
|
|
691
|
+
|
|
692
|
+
This decorator is useful if this step may hang indefinitely.
|
|
693
|
+
|
|
694
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
|
695
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
|
696
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
|
697
|
+
|
|
698
|
+
Note that all the values specified in parameters are added together so if you specify
|
|
699
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
Parameters
|
|
703
|
+
----------
|
|
704
|
+
seconds : int, default 0
|
|
705
|
+
Number of seconds to wait prior to timing out.
|
|
706
|
+
minutes : int, default 0
|
|
707
|
+
Number of minutes to wait prior to timing out.
|
|
708
|
+
hours : int, default 0
|
|
709
|
+
Number of hours to wait prior to timing out.
|
|
710
|
+
"""
|
|
711
|
+
...
|
|
712
|
+
|
|
713
|
+
@typing.overload
|
|
714
|
+
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]]]:
|
|
715
|
+
"""
|
|
716
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
|
717
|
+
the execution of a step.
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
Parameters
|
|
721
|
+
----------
|
|
722
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
|
723
|
+
List of secret specs, defining how the secrets are to be retrieved
|
|
724
|
+
role : str, optional, default: None
|
|
725
|
+
Role to use for fetching secrets
|
|
726
|
+
"""
|
|
727
|
+
...
|
|
728
|
+
|
|
729
|
+
@typing.overload
|
|
730
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
731
|
+
...
|
|
732
|
+
|
|
733
|
+
@typing.overload
|
|
734
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
735
|
+
...
|
|
736
|
+
|
|
737
|
+
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):
|
|
738
|
+
"""
|
|
739
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
|
740
|
+
the execution of a step.
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
Parameters
|
|
744
|
+
----------
|
|
745
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
|
746
|
+
List of secret specs, defining how the secrets are to be retrieved
|
|
747
|
+
role : str, optional, default: None
|
|
748
|
+
Role to use for fetching secrets
|
|
749
|
+
"""
|
|
750
|
+
...
|
|
751
|
+
|
|
683
752
|
@typing.overload
|
|
684
753
|
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]]]:
|
|
685
754
|
"""
|
|
@@ -732,155 +801,205 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
|
|
|
732
801
|
...
|
|
733
802
|
|
|
734
803
|
@typing.overload
|
|
735
|
-
def
|
|
804
|
+
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]]]:
|
|
736
805
|
"""
|
|
737
|
-
Specifies
|
|
738
|
-
the execution of a step.
|
|
806
|
+
Specifies environment variables to be set prior to the execution of a step.
|
|
739
807
|
|
|
740
808
|
|
|
741
809
|
Parameters
|
|
742
810
|
----------
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
role : str, optional, default: None
|
|
746
|
-
Role to use for fetching secrets
|
|
811
|
+
vars : Dict[str, str], default {}
|
|
812
|
+
Dictionary of environment variables to set.
|
|
747
813
|
"""
|
|
748
814
|
...
|
|
749
815
|
|
|
750
816
|
@typing.overload
|
|
751
|
-
def
|
|
817
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
752
818
|
...
|
|
753
819
|
|
|
754
820
|
@typing.overload
|
|
755
|
-
def
|
|
821
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
756
822
|
...
|
|
757
823
|
|
|
758
|
-
def
|
|
824
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
|
759
825
|
"""
|
|
760
|
-
Specifies
|
|
761
|
-
the execution of a step.
|
|
826
|
+
Specifies environment variables to be set prior to the execution of a step.
|
|
762
827
|
|
|
763
828
|
|
|
764
829
|
Parameters
|
|
765
830
|
----------
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
role : str, optional, default: None
|
|
769
|
-
Role to use for fetching secrets
|
|
831
|
+
vars : Dict[str, str], default {}
|
|
832
|
+
Dictionary of environment variables to set.
|
|
770
833
|
"""
|
|
771
834
|
...
|
|
772
835
|
|
|
773
836
|
@typing.overload
|
|
774
|
-
def
|
|
837
|
+
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]]]:
|
|
775
838
|
"""
|
|
776
|
-
Specifies the
|
|
777
|
-
to a step needs to be retried.
|
|
778
|
-
|
|
779
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
|
780
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
|
781
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
|
839
|
+
Specifies that the step will success under all circumstances.
|
|
782
840
|
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
841
|
+
The decorator will create an optional artifact, specified by `var`, which
|
|
842
|
+
contains the exception raised. You can use it to detect the presence
|
|
843
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
|
844
|
+
are missing.
|
|
786
845
|
|
|
787
846
|
|
|
788
847
|
Parameters
|
|
789
848
|
----------
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
849
|
+
var : str, optional, default None
|
|
850
|
+
Name of the artifact in which to store the caught exception.
|
|
851
|
+
If not specified, the exception is not stored.
|
|
852
|
+
print_exception : bool, default True
|
|
853
|
+
Determines whether or not the exception is printed to
|
|
854
|
+
stdout when caught.
|
|
794
855
|
"""
|
|
795
856
|
...
|
|
796
857
|
|
|
797
858
|
@typing.overload
|
|
798
|
-
def
|
|
859
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
799
860
|
...
|
|
800
861
|
|
|
801
862
|
@typing.overload
|
|
802
|
-
def
|
|
863
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
803
864
|
...
|
|
804
865
|
|
|
805
|
-
def
|
|
866
|
+
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):
|
|
806
867
|
"""
|
|
807
|
-
Specifies the
|
|
808
|
-
to a step needs to be retried.
|
|
868
|
+
Specifies that the step will success under all circumstances.
|
|
809
869
|
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
870
|
+
The decorator will create an optional artifact, specified by `var`, which
|
|
871
|
+
contains the exception raised. You can use it to detect the presence
|
|
872
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
|
873
|
+
are missing.
|
|
813
874
|
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
875
|
+
|
|
876
|
+
Parameters
|
|
877
|
+
----------
|
|
878
|
+
var : str, optional, default None
|
|
879
|
+
Name of the artifact in which to store the caught exception.
|
|
880
|
+
If not specified, the exception is not stored.
|
|
881
|
+
print_exception : bool, default True
|
|
882
|
+
Determines whether or not the exception is printed to
|
|
883
|
+
stdout when caught.
|
|
884
|
+
"""
|
|
885
|
+
...
|
|
886
|
+
|
|
887
|
+
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]]:
|
|
888
|
+
"""
|
|
889
|
+
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.
|
|
890
|
+
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.
|
|
817
891
|
|
|
818
892
|
|
|
819
893
|
Parameters
|
|
820
894
|
----------
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
895
|
+
timeout : int
|
|
896
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
|
897
|
+
poke_interval : int
|
|
898
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
|
899
|
+
mode : str
|
|
900
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
|
901
|
+
exponential_backoff : bool
|
|
902
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
|
903
|
+
pool : str
|
|
904
|
+
the slot pool this task should run in,
|
|
905
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
|
906
|
+
soft_fail : bool
|
|
907
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
|
908
|
+
name : str
|
|
909
|
+
Name of the sensor on Airflow
|
|
910
|
+
description : str
|
|
911
|
+
Description of sensor in the Airflow UI
|
|
912
|
+
external_dag_id : str
|
|
913
|
+
The dag_id that contains the task you want to wait for.
|
|
914
|
+
external_task_ids : List[str]
|
|
915
|
+
The list of task_ids that you want to wait for.
|
|
916
|
+
If None (default value) the sensor waits for the DAG. (Default: None)
|
|
917
|
+
allowed_states : List[str]
|
|
918
|
+
Iterable of allowed states, (Default: ['success'])
|
|
919
|
+
failed_states : List[str]
|
|
920
|
+
Iterable of failed or dis-allowed states. (Default: None)
|
|
921
|
+
execution_delta : datetime.timedelta
|
|
922
|
+
time difference with the previous execution to look at,
|
|
923
|
+
the default is the same logical date as the current task or DAG. (Default: None)
|
|
924
|
+
check_existence: bool
|
|
925
|
+
Set to True to check if the external task exists or check if
|
|
926
|
+
the DAG to wait for exists. (Default: True)
|
|
825
927
|
"""
|
|
826
928
|
...
|
|
827
929
|
|
|
828
930
|
@typing.overload
|
|
829
|
-
def
|
|
931
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
830
932
|
"""
|
|
831
|
-
Specifies the
|
|
832
|
-
|
|
833
|
-
Information in this decorator will augment any
|
|
834
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
|
835
|
-
you can use `@conda_base` to set packages required by all
|
|
836
|
-
steps and use `@conda` to specify step-specific overrides.
|
|
933
|
+
Specifies the PyPI packages for all steps of the flow.
|
|
837
934
|
|
|
935
|
+
Use `@pypi_base` to set common packages required by all
|
|
936
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
838
937
|
|
|
839
938
|
Parameters
|
|
840
939
|
----------
|
|
841
|
-
packages : Dict[str, str], default {}
|
|
842
|
-
Packages to use for this
|
|
940
|
+
packages : Dict[str, str], default: {}
|
|
941
|
+
Packages to use for this flow. The key is the name of the package
|
|
843
942
|
and the value is the version to use.
|
|
844
|
-
|
|
845
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
846
|
-
python : str, optional, default None
|
|
943
|
+
python : str, optional, default: None
|
|
847
944
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
848
945
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
849
|
-
disabled : bool, default False
|
|
850
|
-
If set to True, disables @conda.
|
|
851
946
|
"""
|
|
852
947
|
...
|
|
853
948
|
|
|
854
949
|
@typing.overload
|
|
855
|
-
def
|
|
950
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
856
951
|
...
|
|
857
952
|
|
|
858
|
-
|
|
859
|
-
|
|
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
|
+
"""
|
|
860
969
|
...
|
|
861
970
|
|
|
862
|
-
def
|
|
971
|
+
def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
863
972
|
"""
|
|
864
|
-
Specifies
|
|
973
|
+
Specifies what flows belong to the same project.
|
|
865
974
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
975
|
+
A project-specific namespace is created for all flows that
|
|
976
|
+
use the same `@project(name)`.
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
Parameters
|
|
980
|
+
----------
|
|
981
|
+
name : str
|
|
982
|
+
Project name. Make sure that the name is unique amongst all
|
|
983
|
+
projects that use the same production scheduler. The name may
|
|
984
|
+
contain only lowercase alphanumeric characters and underscores.
|
|
870
985
|
|
|
986
|
+
branch : Optional[str], default None
|
|
987
|
+
The branch to use. If not specified, the branch is set to
|
|
988
|
+
`user.<username>` unless `production` is set to `True`. This can
|
|
989
|
+
also be set on the command line using `--branch` as a top-level option.
|
|
990
|
+
It is an error to specify `branch` in the decorator and on the command line.
|
|
871
991
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
If set to True, disables @conda.
|
|
992
|
+
production : bool, default False
|
|
993
|
+
Whether or not the branch is the production branch. This can also be set on the
|
|
994
|
+
command line using `--production` as a top-level option. It is an error to specify
|
|
995
|
+
`production` in the decorator and on the command line.
|
|
996
|
+
The project branch name will be:
|
|
997
|
+
- if `branch` is specified:
|
|
998
|
+
- if `production` is True: `prod.<branch>`
|
|
999
|
+
- if `production` is False: `test.<branch>`
|
|
1000
|
+
- if `branch` is not specified:
|
|
1001
|
+
- if `production` is True: `prod`
|
|
1002
|
+
- if `production` is False: `user.<username>`
|
|
884
1003
|
"""
|
|
885
1004
|
...
|
|
886
1005
|
|
|
@@ -935,61 +1054,13 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
|
|
|
935
1054
|
"""
|
|
936
1055
|
...
|
|
937
1056
|
|
|
938
|
-
|
|
939
|
-
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]]:
|
|
940
|
-
"""
|
|
941
|
-
Specifies the times when the flow should be run when running on a
|
|
942
|
-
production scheduler.
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
Parameters
|
|
946
|
-
----------
|
|
947
|
-
hourly : bool, default False
|
|
948
|
-
Run the workflow hourly.
|
|
949
|
-
daily : bool, default True
|
|
950
|
-
Run the workflow daily.
|
|
951
|
-
weekly : bool, default False
|
|
952
|
-
Run the workflow weekly.
|
|
953
|
-
cron : str, optional, default None
|
|
954
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
|
955
|
-
specified by this expression.
|
|
956
|
-
timezone : str, optional, default None
|
|
957
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
|
958
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
|
959
|
-
"""
|
|
960
|
-
...
|
|
961
|
-
|
|
962
|
-
@typing.overload
|
|
963
|
-
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
964
|
-
...
|
|
965
|
-
|
|
966
|
-
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):
|
|
967
|
-
"""
|
|
968
|
-
Specifies the times when the flow should be run when running on a
|
|
969
|
-
production scheduler.
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
Parameters
|
|
973
|
-
----------
|
|
974
|
-
hourly : bool, default False
|
|
975
|
-
Run the workflow hourly.
|
|
976
|
-
daily : bool, default True
|
|
977
|
-
Run the workflow daily.
|
|
978
|
-
weekly : bool, default False
|
|
979
|
-
Run the workflow weekly.
|
|
980
|
-
cron : str, optional, default None
|
|
981
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
|
982
|
-
specified by this expression.
|
|
983
|
-
timezone : str, optional, default None
|
|
984
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
|
985
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
|
986
|
-
"""
|
|
987
|
-
...
|
|
988
|
-
|
|
989
|
-
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]]:
|
|
1057
|
+
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]]:
|
|
990
1058
|
"""
|
|
991
|
-
The `@
|
|
992
|
-
This decorator only works when a flow is scheduled on Airflow
|
|
1059
|
+
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)
|
|
1060
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
|
1061
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
|
1062
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
|
1063
|
+
starts only after all sensors finish.
|
|
993
1064
|
|
|
994
1065
|
|
|
995
1066
|
Parameters
|
|
@@ -1011,21 +1082,18 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
|
|
|
1011
1082
|
Name of the sensor on Airflow
|
|
1012
1083
|
description : str
|
|
1013
1084
|
Description of sensor in the Airflow UI
|
|
1014
|
-
|
|
1015
|
-
The
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
check_existence: bool
|
|
1027
|
-
Set to True to check if the external task exists or check if
|
|
1028
|
-
the DAG to wait for exists. (Default: True)
|
|
1085
|
+
bucket_key : Union[str, List[str]]
|
|
1086
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
|
1087
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
|
1088
|
+
bucket_name : str
|
|
1089
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
|
1090
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
|
1091
|
+
wildcard_match : bool
|
|
1092
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
|
1093
|
+
aws_conn_id : str
|
|
1094
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
|
1095
|
+
verify : bool
|
|
1096
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
|
1029
1097
|
"""
|
|
1030
1098
|
...
|
|
1031
1099
|
|
|
@@ -1122,81 +1190,54 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
|
1122
1190
|
"""
|
|
1123
1191
|
...
|
|
1124
1192
|
|
|
1125
|
-
|
|
1193
|
+
@typing.overload
|
|
1194
|
+
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]]:
|
|
1126
1195
|
"""
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
|
1130
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
|
1131
|
-
starts only after all sensors finish.
|
|
1196
|
+
Specifies the times when the flow should be run when running on a
|
|
1197
|
+
production scheduler.
|
|
1132
1198
|
|
|
1133
1199
|
|
|
1134
1200
|
Parameters
|
|
1135
1201
|
----------
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
|
1149
|
-
name : str
|
|
1150
|
-
Name of the sensor on Airflow
|
|
1151
|
-
description : str
|
|
1152
|
-
Description of sensor in the Airflow UI
|
|
1153
|
-
bucket_key : Union[str, List[str]]
|
|
1154
|
-
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
|
1155
|
-
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
|
1156
|
-
bucket_name : str
|
|
1157
|
-
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
|
1158
|
-
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
|
1159
|
-
wildcard_match : bool
|
|
1160
|
-
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
|
1161
|
-
aws_conn_id : str
|
|
1162
|
-
a reference to the s3 connection on Airflow. (Default: None)
|
|
1163
|
-
verify : bool
|
|
1164
|
-
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
|
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).
|
|
1165
1214
|
"""
|
|
1166
1215
|
...
|
|
1167
1216
|
|
|
1168
|
-
|
|
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):
|
|
1169
1222
|
"""
|
|
1170
|
-
Specifies
|
|
1171
|
-
|
|
1172
|
-
A project-specific namespace is created for all flows that
|
|
1173
|
-
use the same `@project(name)`.
|
|
1223
|
+
Specifies the times when the flow should be run when running on a
|
|
1224
|
+
production scheduler.
|
|
1174
1225
|
|
|
1175
1226
|
|
|
1176
1227
|
Parameters
|
|
1177
1228
|
----------
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
Whether or not the branch is the production branch. This can also be set on the
|
|
1191
|
-
command line using `--production` as a top-level option. It is an error to specify
|
|
1192
|
-
`production` in the decorator and on the command line.
|
|
1193
|
-
The project branch name will be:
|
|
1194
|
-
- if `branch` is specified:
|
|
1195
|
-
- if `production` is True: `prod.<branch>`
|
|
1196
|
-
- if `production` is False: `test.<branch>`
|
|
1197
|
-
- if `branch` is not specified:
|
|
1198
|
-
- if `production` is True: `prod`
|
|
1199
|
-
- if `production` is False: `user.<username>`
|
|
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).
|
|
1200
1241
|
"""
|
|
1201
1242
|
...
|
|
1202
1243
|
|
|
@@ -1301,44 +1342,3 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
|
|
|
1301
1342
|
"""
|
|
1302
1343
|
...
|
|
1303
1344
|
|
|
1304
|
-
@typing.overload
|
|
1305
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
1306
|
-
"""
|
|
1307
|
-
Specifies the PyPI packages for all steps of the flow.
|
|
1308
|
-
|
|
1309
|
-
Use `@pypi_base` to set common packages required by all
|
|
1310
|
-
steps and use `@pypi` to specify step-specific overrides.
|
|
1311
|
-
|
|
1312
|
-
Parameters
|
|
1313
|
-
----------
|
|
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.
|
|
1320
|
-
"""
|
|
1321
|
-
...
|
|
1322
|
-
|
|
1323
|
-
@typing.overload
|
|
1324
|
-
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
1325
|
-
...
|
|
1326
|
-
|
|
1327
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
|
1328
|
-
"""
|
|
1329
|
-
Specifies the PyPI packages for all steps of the flow.
|
|
1330
|
-
|
|
1331
|
-
Use `@pypi_base` to set common packages required by all
|
|
1332
|
-
steps and use `@pypi` to specify step-specific overrides.
|
|
1333
|
-
|
|
1334
|
-
Parameters
|
|
1335
|
-
----------
|
|
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
|
-
"""
|
|
1343
|
-
...
|
|
1344
|
-
|