ob-metaflow-stubs 6.0.3.119__py2.py3-none-any.whl → 6.0.3.121__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- metaflow-stubs/__init__.pyi +243 -243
- metaflow-stubs/cards.pyi +2 -2
- metaflow-stubs/cli.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/clone_util.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 +4 -4
- 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 +149 -149
- metaflow-stubs/mf_extensions/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +2 -2
- metaflow-stubs/mflog/__init__.pyi +2 -2
- metaflow-stubs/mflog/mflog.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +4 -4
- metaflow-stubs/plugins/__init__.pyi +11 -11
- metaflow-stubs/plugins/airflow/__init__.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 +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +4 -4
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
- metaflow-stubs/plugins/aws/__init__.pyi +2 -2
- 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 +2 -2
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/production_token.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_deployer.pyi +3 -3
- 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 +2 -2
- 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_cli.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 +2 -2
- 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 +2 -2
- 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 +3 -3
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.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_jobsets.pyi +2 -2
- metaflow-stubs/plugins/logs_cli.pyi +2 -2
- metaflow-stubs/plugins/package_cli.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
- metaflow-stubs/plugins/perimeters.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/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/tag_cli.pyi +2 -2
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/procpoll.pyi +2 -2
- metaflow-stubs/profilers/__init__.pyi +2 -2
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/deployer.pyi +5 -5
- metaflow-stubs/runner/deployer_impl.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +3 -3
- metaflow-stubs/runner/nbdeploy.pyi +2 -2
- metaflow-stubs/runner/nbrun.pyi +2 -2
- metaflow-stubs/runner/subprocess_manager.pyi +2 -2
- metaflow-stubs/runner/utils.pyi +4 -4
- metaflow-stubs/system/__init__.pyi +2 -2
- metaflow-stubs/system/system_logger.pyi +2 -2
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- {ob_metaflow_stubs-6.0.3.119.dist-info → ob_metaflow_stubs-6.0.3.121.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.121.dist-info/RECORD +174 -0
- {ob_metaflow_stubs-6.0.3.119.dist-info → ob_metaflow_stubs-6.0.3.121.dist-info}/WHEEL +1 -1
- ob_metaflow_stubs-6.0.3.119.dist-info/RECORD +0 -174
- {ob_metaflow_stubs-6.0.3.119.dist-info → ob_metaflow_stubs-6.0.3.121.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.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.33.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-02T17:17:46.476932 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -140,48 +140,53 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
140
140
|
"""
|
141
141
|
...
|
142
142
|
|
143
|
-
|
143
|
+
@typing.overload
|
144
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
144
145
|
"""
|
145
|
-
|
146
|
+
Decorator prototype for all step decorators. This function gets specialized
|
147
|
+
and imported for all decorators types by _import_plugin_decorators().
|
146
148
|
"""
|
147
149
|
...
|
148
150
|
|
149
151
|
@typing.overload
|
150
|
-
def
|
152
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
153
|
+
...
|
154
|
+
|
155
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
151
156
|
"""
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
157
|
+
Decorator prototype for all step decorators. This function gets specialized
|
158
|
+
and imported for all decorators types by _import_plugin_decorators().
|
159
|
+
"""
|
160
|
+
...
|
161
|
+
|
162
|
+
@typing.overload
|
163
|
+
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]]]:
|
164
|
+
"""
|
165
|
+
Specifies the Conda environment for the step.
|
159
166
|
|
160
|
-
|
161
|
-
|
167
|
+
Information in this decorator will augment any
|
168
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
169
|
+
you can use `@conda_base` to set packages required by all
|
170
|
+
steps and use `@conda` to specify step-specific overrides.
|
162
171
|
"""
|
163
172
|
...
|
164
173
|
|
165
174
|
@typing.overload
|
166
|
-
def
|
175
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
167
176
|
...
|
168
177
|
|
169
178
|
@typing.overload
|
170
|
-
def
|
179
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
171
180
|
...
|
172
181
|
|
173
|
-
def
|
182
|
+
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):
|
174
183
|
"""
|
175
|
-
Specifies
|
176
|
-
|
177
|
-
This decorator is useful if this step may hang indefinitely.
|
178
|
-
|
179
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
180
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
181
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
184
|
+
Specifies the Conda environment for the step.
|
182
185
|
|
183
|
-
|
184
|
-
|
186
|
+
Information in this decorator will augment any
|
187
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
188
|
+
you can use `@conda_base` to set packages required by all
|
189
|
+
steps and use `@conda` to specify step-specific overrides.
|
185
190
|
"""
|
186
191
|
...
|
187
192
|
|
@@ -234,20 +239,9 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
234
239
|
"""
|
235
240
|
...
|
236
241
|
|
237
|
-
|
238
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
239
|
-
"""
|
240
|
-
Internal decorator to support Fast bakery
|
241
|
-
"""
|
242
|
-
...
|
243
|
-
|
244
|
-
@typing.overload
|
245
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
246
|
-
...
|
247
|
-
|
248
|
-
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
242
|
+
def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.Union[typing.List[str], typing.List[typing.Tuple[typing.Dict, str]], typing.List[typing.Tuple[str, str]], typing.List[typing.Dict], 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]]]:
|
249
243
|
"""
|
250
|
-
|
244
|
+
Decorator that helps cache, version and store models/datasets from huggingface hub.
|
251
245
|
"""
|
252
246
|
...
|
253
247
|
|
@@ -283,87 +277,47 @@ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
283
277
|
...
|
284
278
|
|
285
279
|
@typing.overload
|
286
|
-
def
|
287
|
-
"""
|
288
|
-
Enables loading / saving of models within a step.
|
289
|
-
"""
|
290
|
-
...
|
291
|
-
|
292
|
-
@typing.overload
|
293
|
-
def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
294
|
-
...
|
295
|
-
|
296
|
-
@typing.overload
|
297
|
-
def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
298
|
-
...
|
299
|
-
|
300
|
-
def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: str = None):
|
301
|
-
"""
|
302
|
-
Enables loading / saving of models within a step.
|
303
|
-
"""
|
304
|
-
...
|
305
|
-
|
306
|
-
@typing.overload
|
307
|
-
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]]]:
|
280
|
+
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]]]:
|
308
281
|
"""
|
309
|
-
|
282
|
+
Specifies a timeout for your step.
|
310
283
|
|
311
|
-
|
284
|
+
This decorator is useful if this step may hang indefinitely.
|
285
|
+
|
286
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
287
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
288
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
289
|
+
|
290
|
+
Note that all the values specified in parameters are added together so if you specify
|
291
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
312
292
|
"""
|
313
293
|
...
|
314
294
|
|
315
295
|
@typing.overload
|
316
|
-
def
|
296
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
317
297
|
...
|
318
298
|
|
319
299
|
@typing.overload
|
320
|
-
def
|
300
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
321
301
|
...
|
322
302
|
|
323
|
-
def
|
303
|
+
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):
|
324
304
|
"""
|
325
|
-
|
305
|
+
Specifies a timeout for your step.
|
326
306
|
|
327
|
-
|
328
|
-
"""
|
329
|
-
...
|
330
|
-
|
331
|
-
@typing.overload
|
332
|
-
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]]]:
|
333
|
-
"""
|
334
|
-
Specifies the number of times the task corresponding
|
335
|
-
to a step needs to be retried.
|
307
|
+
This decorator is useful if this step may hang indefinitely.
|
336
308
|
|
337
|
-
This
|
338
|
-
|
339
|
-
|
309
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
310
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
311
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
340
312
|
|
341
|
-
|
342
|
-
decorator will
|
343
|
-
ensuring that the flow execution can continue.
|
313
|
+
Note that all the values specified in parameters are added together so if you specify
|
314
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
344
315
|
"""
|
345
316
|
...
|
346
317
|
|
347
|
-
|
348
|
-
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
349
|
-
...
|
350
|
-
|
351
|
-
@typing.overload
|
352
|
-
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
353
|
-
...
|
354
|
-
|
355
|
-
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):
|
318
|
+
def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = 'KUBERNETES_IMAGE_PULL_POLICY', 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[str] = [], 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) -> 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]]]:
|
356
319
|
"""
|
357
|
-
Specifies
|
358
|
-
to a step needs to be retried.
|
359
|
-
|
360
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
361
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
362
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
363
|
-
|
364
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
365
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
366
|
-
ensuring that the flow execution can continue.
|
320
|
+
Specifies that this step should execute on Kubernetes.
|
367
321
|
"""
|
368
322
|
...
|
369
323
|
|
@@ -420,109 +374,148 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
|
|
420
374
|
...
|
421
375
|
|
422
376
|
@typing.overload
|
423
|
-
def
|
377
|
+
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]]]:
|
424
378
|
"""
|
425
|
-
Specifies
|
426
|
-
|
427
|
-
Information in this decorator will augment any
|
428
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
429
|
-
you can use `@conda_base` to set packages required by all
|
430
|
-
steps and use `@conda` to specify step-specific overrides.
|
379
|
+
Specifies environment variables to be set prior to the execution of a step.
|
431
380
|
"""
|
432
381
|
...
|
433
382
|
|
434
383
|
@typing.overload
|
435
|
-
def
|
384
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
436
385
|
...
|
437
386
|
|
438
387
|
@typing.overload
|
439
|
-
def
|
388
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
440
389
|
...
|
441
390
|
|
442
|
-
def
|
391
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
443
392
|
"""
|
444
|
-
Specifies
|
445
|
-
|
446
|
-
Information in this decorator will augment any
|
447
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
448
|
-
you can use `@conda_base` to set packages required by all
|
449
|
-
steps and use `@conda` to specify step-specific overrides.
|
393
|
+
Specifies environment variables to be set prior to the execution of a step.
|
450
394
|
"""
|
451
395
|
...
|
452
396
|
|
453
397
|
@typing.overload
|
454
|
-
def
|
398
|
+
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]]]:
|
455
399
|
"""
|
456
|
-
Specifies
|
457
|
-
|
400
|
+
Specifies the number of times the task corresponding
|
401
|
+
to a step needs to be retried.
|
402
|
+
|
403
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
404
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
405
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
406
|
+
|
407
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
408
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
409
|
+
ensuring that the flow execution can continue.
|
458
410
|
"""
|
459
411
|
...
|
460
412
|
|
461
413
|
@typing.overload
|
462
|
-
def
|
414
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
463
415
|
...
|
464
416
|
|
465
417
|
@typing.overload
|
466
|
-
def
|
418
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
467
419
|
...
|
468
420
|
|
469
|
-
def
|
421
|
+
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):
|
470
422
|
"""
|
471
|
-
Specifies
|
472
|
-
|
423
|
+
Specifies the number of times the task corresponding
|
424
|
+
to a step needs to be retried.
|
425
|
+
|
426
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
427
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
428
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
429
|
+
|
430
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
431
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
432
|
+
ensuring that the flow execution can continue.
|
473
433
|
"""
|
474
434
|
...
|
475
435
|
|
476
|
-
|
436
|
+
@typing.overload
|
437
|
+
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]]]:
|
477
438
|
"""
|
478
|
-
|
439
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
440
|
+
|
441
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
479
442
|
"""
|
480
443
|
...
|
481
444
|
|
482
445
|
@typing.overload
|
483
|
-
def
|
446
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
447
|
+
...
|
448
|
+
|
449
|
+
@typing.overload
|
450
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
451
|
+
...
|
452
|
+
|
453
|
+
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):
|
484
454
|
"""
|
485
|
-
|
486
|
-
|
455
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
456
|
+
|
457
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
487
458
|
"""
|
488
459
|
...
|
489
460
|
|
490
461
|
@typing.overload
|
491
|
-
def
|
462
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
463
|
+
"""
|
464
|
+
Internal decorator to support Fast bakery
|
465
|
+
"""
|
492
466
|
...
|
493
467
|
|
494
|
-
|
468
|
+
@typing.overload
|
469
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
470
|
+
...
|
471
|
+
|
472
|
+
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
495
473
|
"""
|
496
|
-
|
497
|
-
and imported for all decorators types by _import_plugin_decorators().
|
474
|
+
Internal decorator to support Fast bakery
|
498
475
|
"""
|
499
476
|
...
|
500
477
|
|
501
478
|
@typing.overload
|
502
|
-
def
|
479
|
+
def model(*, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: 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]]]:
|
503
480
|
"""
|
504
|
-
|
481
|
+
Enables loading / saving of models within a step.
|
505
482
|
"""
|
506
483
|
...
|
507
484
|
|
508
485
|
@typing.overload
|
509
|
-
def
|
486
|
+
def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
510
487
|
...
|
511
488
|
|
512
489
|
@typing.overload
|
513
|
-
def
|
490
|
+
def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
514
491
|
...
|
515
492
|
|
516
|
-
def
|
493
|
+
def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: str = None):
|
517
494
|
"""
|
518
|
-
|
495
|
+
Enables loading / saving of models within a step.
|
519
496
|
"""
|
520
497
|
...
|
521
498
|
|
522
|
-
|
499
|
+
@typing.overload
|
500
|
+
def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []) -> 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]]]:
|
523
501
|
"""
|
524
|
-
|
525
|
-
|
502
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
503
|
+
the execution of a step.
|
504
|
+
"""
|
505
|
+
...
|
506
|
+
|
507
|
+
@typing.overload
|
508
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
509
|
+
...
|
510
|
+
|
511
|
+
@typing.overload
|
512
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
513
|
+
...
|
514
|
+
|
515
|
+
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]]] = []):
|
516
|
+
"""
|
517
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
518
|
+
the execution of a step.
|
526
519
|
"""
|
527
520
|
...
|
528
521
|
|
@@ -549,6 +542,25 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
|
|
549
542
|
"""
|
550
543
|
...
|
551
544
|
|
545
|
+
@typing.overload
|
546
|
+
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]]:
|
547
|
+
"""
|
548
|
+
Specifies the times when the flow should be run when running on a
|
549
|
+
production scheduler.
|
550
|
+
"""
|
551
|
+
...
|
552
|
+
|
553
|
+
@typing.overload
|
554
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
555
|
+
...
|
556
|
+
|
557
|
+
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):
|
558
|
+
"""
|
559
|
+
Specifies the times when the flow should be run when running on a
|
560
|
+
production scheduler.
|
561
|
+
"""
|
562
|
+
...
|
563
|
+
|
552
564
|
def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
553
565
|
"""
|
554
566
|
This decorator is used to run NIM containers in Metaflow tasks as sidecars.
|
@@ -573,6 +585,87 @@ def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[Fl
|
|
573
585
|
"""
|
574
586
|
...
|
575
587
|
|
588
|
+
@typing.overload
|
589
|
+
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]]:
|
590
|
+
"""
|
591
|
+
Specifies the flow(s) that this flow depends on.
|
592
|
+
|
593
|
+
```
|
594
|
+
@trigger_on_finish(flow='FooFlow')
|
595
|
+
```
|
596
|
+
or
|
597
|
+
```
|
598
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
599
|
+
```
|
600
|
+
This decorator respects the @project decorator and triggers the flow
|
601
|
+
when upstream runs within the same namespace complete successfully
|
602
|
+
|
603
|
+
Additionally, you can specify project aware upstream flow dependencies
|
604
|
+
by specifying the fully qualified project_flow_name.
|
605
|
+
```
|
606
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
607
|
+
```
|
608
|
+
or
|
609
|
+
```
|
610
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
611
|
+
```
|
612
|
+
|
613
|
+
You can also specify just the project or project branch (other values will be
|
614
|
+
inferred from the current project or project branch):
|
615
|
+
```
|
616
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
617
|
+
```
|
618
|
+
|
619
|
+
Note that `branch` is typically one of:
|
620
|
+
- `prod`
|
621
|
+
- `user.bob`
|
622
|
+
- `test.my_experiment`
|
623
|
+
- `prod.staging`
|
624
|
+
"""
|
625
|
+
...
|
626
|
+
|
627
|
+
@typing.overload
|
628
|
+
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
629
|
+
...
|
630
|
+
|
631
|
+
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] = {}):
|
632
|
+
"""
|
633
|
+
Specifies the flow(s) that this flow depends on.
|
634
|
+
|
635
|
+
```
|
636
|
+
@trigger_on_finish(flow='FooFlow')
|
637
|
+
```
|
638
|
+
or
|
639
|
+
```
|
640
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
641
|
+
```
|
642
|
+
This decorator respects the @project decorator and triggers the flow
|
643
|
+
when upstream runs within the same namespace complete successfully
|
644
|
+
|
645
|
+
Additionally, you can specify project aware upstream flow dependencies
|
646
|
+
by specifying the fully qualified project_flow_name.
|
647
|
+
```
|
648
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
649
|
+
```
|
650
|
+
or
|
651
|
+
```
|
652
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
653
|
+
```
|
654
|
+
|
655
|
+
You can also specify just the project or project branch (other values will be
|
656
|
+
inferred from the current project or project branch):
|
657
|
+
```
|
658
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
659
|
+
```
|
660
|
+
|
661
|
+
Note that `branch` is typically one of:
|
662
|
+
- `prod`
|
663
|
+
- `user.bob`
|
664
|
+
- `test.my_experiment`
|
665
|
+
- `prod.staging`
|
666
|
+
"""
|
667
|
+
...
|
668
|
+
|
576
669
|
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]]:
|
577
670
|
"""
|
578
671
|
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)
|
@@ -656,6 +749,13 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
656
749
|
"""
|
657
750
|
...
|
658
751
|
|
752
|
+
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]]:
|
753
|
+
"""
|
754
|
+
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.
|
755
|
+
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.
|
756
|
+
"""
|
757
|
+
...
|
758
|
+
|
659
759
|
@typing.overload
|
660
760
|
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]]:
|
661
761
|
"""
|
@@ -679,106 +779,6 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
|
|
679
779
|
"""
|
680
780
|
...
|
681
781
|
|
682
|
-
@typing.overload
|
683
|
-
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]]:
|
684
|
-
"""
|
685
|
-
Specifies the flow(s) that this flow depends on.
|
686
|
-
|
687
|
-
```
|
688
|
-
@trigger_on_finish(flow='FooFlow')
|
689
|
-
```
|
690
|
-
or
|
691
|
-
```
|
692
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
693
|
-
```
|
694
|
-
This decorator respects the @project decorator and triggers the flow
|
695
|
-
when upstream runs within the same namespace complete successfully
|
696
|
-
|
697
|
-
Additionally, you can specify project aware upstream flow dependencies
|
698
|
-
by specifying the fully qualified project_flow_name.
|
699
|
-
```
|
700
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
701
|
-
```
|
702
|
-
or
|
703
|
-
```
|
704
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
705
|
-
```
|
706
|
-
|
707
|
-
You can also specify just the project or project branch (other values will be
|
708
|
-
inferred from the current project or project branch):
|
709
|
-
```
|
710
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
711
|
-
```
|
712
|
-
|
713
|
-
Note that `branch` is typically one of:
|
714
|
-
- `prod`
|
715
|
-
- `user.bob`
|
716
|
-
- `test.my_experiment`
|
717
|
-
- `prod.staging`
|
718
|
-
"""
|
719
|
-
...
|
720
|
-
|
721
|
-
@typing.overload
|
722
|
-
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
723
|
-
...
|
724
|
-
|
725
|
-
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] = {}):
|
726
|
-
"""
|
727
|
-
Specifies the flow(s) that this flow depends on.
|
728
|
-
|
729
|
-
```
|
730
|
-
@trigger_on_finish(flow='FooFlow')
|
731
|
-
```
|
732
|
-
or
|
733
|
-
```
|
734
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
735
|
-
```
|
736
|
-
This decorator respects the @project decorator and triggers the flow
|
737
|
-
when upstream runs within the same namespace complete successfully
|
738
|
-
|
739
|
-
Additionally, you can specify project aware upstream flow dependencies
|
740
|
-
by specifying the fully qualified project_flow_name.
|
741
|
-
```
|
742
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
743
|
-
```
|
744
|
-
or
|
745
|
-
```
|
746
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
747
|
-
```
|
748
|
-
|
749
|
-
You can also specify just the project or project branch (other values will be
|
750
|
-
inferred from the current project or project branch):
|
751
|
-
```
|
752
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
753
|
-
```
|
754
|
-
|
755
|
-
Note that `branch` is typically one of:
|
756
|
-
- `prod`
|
757
|
-
- `user.bob`
|
758
|
-
- `test.my_experiment`
|
759
|
-
- `prod.staging`
|
760
|
-
"""
|
761
|
-
...
|
762
|
-
|
763
|
-
@typing.overload
|
764
|
-
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]]:
|
765
|
-
"""
|
766
|
-
Specifies the times when the flow should be run when running on a
|
767
|
-
production scheduler.
|
768
|
-
"""
|
769
|
-
...
|
770
|
-
|
771
|
-
@typing.overload
|
772
|
-
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
773
|
-
...
|
774
|
-
|
775
|
-
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):
|
776
|
-
"""
|
777
|
-
Specifies the times when the flow should be run when running on a
|
778
|
-
production scheduler.
|
779
|
-
"""
|
780
|
-
...
|
781
|
-
|
782
782
|
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
783
783
|
"""
|
784
784
|
Specifies what flows belong to the same project.
|