metaflow-stubs 2.16.2__py2.py3-none-any.whl → 2.16.4__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 +421 -421
- metaflow-stubs/cards.pyi +2 -2
- metaflow-stubs/cli.pyi +2 -2
- metaflow-stubs/cli_components/__init__.pyi +2 -2
- metaflow-stubs/cli_components/utils.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +2 -2
- metaflow-stubs/client/core.pyi +5 -5
- metaflow-stubs/client/filecache.pyi +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 +3 -3
- metaflow-stubs/meta_files.pyi +2 -2
- metaflow-stubs/metadata_provider/__init__.pyi +2 -2
- metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
- metaflow-stubs/metadata_provider/metadata.pyi +2 -2
- metaflow-stubs/metadata_provider/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -2
- metaflow-stubs/metaflow_current.pyi +3 -3
- metaflow-stubs/metaflow_git.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/packaging_sys/__init__.pyi +5 -5
- metaflow-stubs/packaging_sys/backend.pyi +3 -3
- metaflow-stubs/packaging_sys/distribution_support.pyi +3 -3
- metaflow-stubs/packaging_sys/tar_backend.pyi +4 -4
- metaflow-stubs/packaging_sys/utils.pyi +2 -2
- metaflow-stubs/packaging_sys/v1.pyi +3 -3
- metaflow-stubs/parameters.pyi +3 -3
- metaflow-stubs/plugins/__init__.pyi +13 -13
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
- metaflow-stubs/plugins/airflow/exception.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -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 +4 -4
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
- metaflow-stubs/plugins/azure/__init__.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +4 -4
- metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
- metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/cards/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_client.pyi +2 -2
- metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
- metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
- metaflow-stubs/plugins/debug_logger.pyi +2 -2
- metaflow-stubs/plugins/debug_monitor.pyi +2 -2
- metaflow-stubs/plugins/environment_decorator.pyi +2 -2
- metaflow-stubs/plugins/events_decorator.pyi +2 -2
- metaflow-stubs/plugins/exit_hook/__init__.pyi +2 -2
- metaflow-stubs/plugins/exit_hook/exit_hook_decorator.pyi +2 -2
- metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
- metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
- metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +4 -4
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
- metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
- metaflow-stubs/plugins/project_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/__init__.pyi +3 -3
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
- metaflow-stubs/plugins/pypi/parsers.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_func.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_spec.pyi +2 -2
- metaflow-stubs/plugins/secrets/utils.pyi +2 -2
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
- metaflow-stubs/plugins/uv/__init__.pyi +2 -2
- metaflow-stubs/plugins/uv/uv_environment.pyi +3 -3
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/deployer.pyi +29 -29
- metaflow-stubs/runner/deployer_impl.pyi +2 -2
- 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 +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
- metaflow-stubs/user_configs/__init__.pyi +2 -2
- metaflow-stubs/user_configs/config_options.pyi +3 -3
- metaflow-stubs/user_configs/config_parameters.pyi +7 -7
- 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 +6 -6
- metaflow-stubs/user_decorators/user_flow_decorator.pyi +3 -3
- metaflow-stubs/user_decorators/user_step_decorator.pyi +6 -6
- metaflow-stubs/version.pyi +2 -2
- {metaflow_stubs-2.16.2.dist-info → metaflow_stubs-2.16.4.dist-info}/METADATA +2 -2
- metaflow_stubs-2.16.4.dist-info/RECORD +166 -0
- metaflow_stubs-2.16.2.dist-info/RECORD +0 -166
- {metaflow_stubs-2.16.2.dist-info → metaflow_stubs-2.16.4.dist-info}/WHEEL +0 -0
- {metaflow_stubs-2.16.2.dist-info → metaflow_stubs-2.16.4.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.16.
|
|
4
|
-
# Generated on 2025-07-
|
|
3
|
+
# MF version: 2.16.4 #
|
|
4
|
+
# Generated on 2025-07-17T18:30:30.670730 #
|
|
5
5
|
######################################################################################################
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
@@ -47,9 +47,9 @@ from . import plugins as plugins
|
|
|
47
47
|
from .plugins.datatools.s3.s3 import S3 as S3
|
|
48
48
|
from . import includefile as includefile
|
|
49
49
|
from .includefile import IncludeFile as IncludeFile
|
|
50
|
-
from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
|
|
51
50
|
from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
|
|
52
51
|
from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
|
|
52
|
+
from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
|
|
53
53
|
from . import cards as cards
|
|
54
54
|
from . import client as client
|
|
55
55
|
from .client.core import namespace as namespace
|
|
@@ -232,270 +232,105 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
|
232
232
|
...
|
|
233
233
|
|
|
234
234
|
@typing.overload
|
|
235
|
-
def
|
|
236
|
-
"""
|
|
237
|
-
Decorator prototype for all step decorators. This function gets specialized
|
|
238
|
-
and imported for all decorators types by _import_plugin_decorators().
|
|
239
|
-
"""
|
|
240
|
-
...
|
|
241
|
-
|
|
242
|
-
@typing.overload
|
|
243
|
-
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
244
|
-
...
|
|
245
|
-
|
|
246
|
-
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
|
247
|
-
"""
|
|
248
|
-
Decorator prototype for all step decorators. This function gets specialized
|
|
249
|
-
and imported for all decorators types by _import_plugin_decorators().
|
|
250
|
-
"""
|
|
251
|
-
...
|
|
252
|
-
|
|
253
|
-
@typing.overload
|
|
254
|
-
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]]]:
|
|
235
|
+
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]]]:
|
|
255
236
|
"""
|
|
256
|
-
|
|
237
|
+
Specifies that the step will success under all circumstances.
|
|
257
238
|
|
|
258
|
-
|
|
239
|
+
The decorator will create an optional artifact, specified by `var`, which
|
|
240
|
+
contains the exception raised. You can use it to detect the presence
|
|
241
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
|
242
|
+
are missing.
|
|
259
243
|
|
|
260
244
|
|
|
261
245
|
Parameters
|
|
262
246
|
----------
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
timeout : int, default 45
|
|
270
|
-
Interrupt reporting if it takes more than this many seconds.
|
|
247
|
+
var : str, optional, default None
|
|
248
|
+
Name of the artifact in which to store the caught exception.
|
|
249
|
+
If not specified, the exception is not stored.
|
|
250
|
+
print_exception : bool, default True
|
|
251
|
+
Determines whether or not the exception is printed to
|
|
252
|
+
stdout when caught.
|
|
271
253
|
"""
|
|
272
254
|
...
|
|
273
255
|
|
|
274
256
|
@typing.overload
|
|
275
|
-
def
|
|
257
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
276
258
|
...
|
|
277
259
|
|
|
278
260
|
@typing.overload
|
|
279
|
-
def
|
|
261
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
280
262
|
...
|
|
281
263
|
|
|
282
|
-
def
|
|
264
|
+
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):
|
|
283
265
|
"""
|
|
284
|
-
|
|
266
|
+
Specifies that the step will success under all circumstances.
|
|
285
267
|
|
|
286
|
-
|
|
268
|
+
The decorator will create an optional artifact, specified by `var`, which
|
|
269
|
+
contains the exception raised. You can use it to detect the presence
|
|
270
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
|
271
|
+
are missing.
|
|
287
272
|
|
|
288
273
|
|
|
289
274
|
Parameters
|
|
290
275
|
----------
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
timeout : int, default 45
|
|
298
|
-
Interrupt reporting if it takes more than this many seconds.
|
|
276
|
+
var : str, optional, default None
|
|
277
|
+
Name of the artifact in which to store the caught exception.
|
|
278
|
+
If not specified, the exception is not stored.
|
|
279
|
+
print_exception : bool, default True
|
|
280
|
+
Determines whether or not the exception is printed to
|
|
281
|
+
stdout when caught.
|
|
299
282
|
"""
|
|
300
283
|
...
|
|
301
284
|
|
|
302
285
|
@typing.overload
|
|
303
|
-
def
|
|
286
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
304
287
|
"""
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
Information in this decorator will augment any
|
|
308
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
|
309
|
-
you can use `@pypi_base` to set packages required by all
|
|
310
|
-
steps and use `@pypi` to specify step-specific overrides.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
Parameters
|
|
314
|
-
----------
|
|
315
|
-
packages : Dict[str, str], default: {}
|
|
316
|
-
Packages to use for this step. The key is the name of the package
|
|
317
|
-
and the value is the version to use.
|
|
318
|
-
python : str, optional, default: None
|
|
319
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
320
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
288
|
+
Decorator prototype for all step decorators. This function gets specialized
|
|
289
|
+
and imported for all decorators types by _import_plugin_decorators().
|
|
321
290
|
"""
|
|
322
291
|
...
|
|
323
292
|
|
|
324
293
|
@typing.overload
|
|
325
|
-
def
|
|
326
|
-
...
|
|
327
|
-
|
|
328
|
-
@typing.overload
|
|
329
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
294
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
330
295
|
...
|
|
331
296
|
|
|
332
|
-
def
|
|
297
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
|
333
298
|
"""
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
Information in this decorator will augment any
|
|
337
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
|
338
|
-
you can use `@pypi_base` to set packages required by all
|
|
339
|
-
steps and use `@pypi` to specify step-specific overrides.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
Parameters
|
|
343
|
-
----------
|
|
344
|
-
packages : Dict[str, str], default: {}
|
|
345
|
-
Packages to use for this step. The key is the name of the package
|
|
346
|
-
and the value is the version to use.
|
|
347
|
-
python : str, optional, default: None
|
|
348
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
349
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
299
|
+
Decorator prototype for all step decorators. This function gets specialized
|
|
300
|
+
and imported for all decorators types by _import_plugin_decorators().
|
|
350
301
|
"""
|
|
351
302
|
...
|
|
352
303
|
|
|
353
304
|
@typing.overload
|
|
354
|
-
def
|
|
305
|
+
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]]]:
|
|
355
306
|
"""
|
|
356
|
-
Specifies
|
|
307
|
+
Specifies environment variables to be set prior to the execution of a step.
|
|
357
308
|
|
|
358
309
|
|
|
359
310
|
Parameters
|
|
360
311
|
----------
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
also present, the maximum value from all decorators is used.
|
|
364
|
-
gpu : int, default 0
|
|
365
|
-
Number of GPUs required for this step. If `@resources` is
|
|
366
|
-
also present, the maximum value from all decorators is used.
|
|
367
|
-
memory : int, default 4096
|
|
368
|
-
Memory size (in MB) required for this step. If
|
|
369
|
-
`@resources` is also present, the maximum value from all decorators is
|
|
370
|
-
used.
|
|
371
|
-
image : str, optional, default None
|
|
372
|
-
Docker image to use when launching on AWS Batch. If not specified, and
|
|
373
|
-
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
|
374
|
-
not, a default Docker image mapping to the current version of Python is used.
|
|
375
|
-
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
|
376
|
-
AWS Batch Job Queue to submit the job to.
|
|
377
|
-
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
|
378
|
-
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
|
379
|
-
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
|
380
|
-
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
|
381
|
-
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
|
382
|
-
shared_memory : int, optional, default None
|
|
383
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
384
|
-
This parameter maps to the `--shm-size` option in Docker.
|
|
385
|
-
max_swap : int, optional, default None
|
|
386
|
-
The total amount of swap memory (in MiB) a container can use for this
|
|
387
|
-
step. This parameter is translated to the `--memory-swap` option in
|
|
388
|
-
Docker where the value is the sum of the container memory plus the
|
|
389
|
-
`max_swap` value.
|
|
390
|
-
swappiness : int, optional, default None
|
|
391
|
-
This allows you to tune memory swappiness behavior for this step.
|
|
392
|
-
A swappiness value of 0 causes swapping not to happen unless absolutely
|
|
393
|
-
necessary. A swappiness value of 100 causes pages to be swapped very
|
|
394
|
-
aggressively. Accepted values are whole numbers between 0 and 100.
|
|
395
|
-
use_tmpfs : bool, default False
|
|
396
|
-
This enables an explicit tmpfs mount for this step. Note that tmpfs is
|
|
397
|
-
not available on Fargate compute environments
|
|
398
|
-
tmpfs_tempdir : bool, default True
|
|
399
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
|
400
|
-
tmpfs_size : int, optional, default None
|
|
401
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
|
402
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
|
403
|
-
memory allocated for this step.
|
|
404
|
-
tmpfs_path : str, optional, default None
|
|
405
|
-
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
|
406
|
-
inferentia : int, default 0
|
|
407
|
-
Number of Inferentia chips required for this step.
|
|
408
|
-
trainium : int, default None
|
|
409
|
-
Alias for inferentia. Use only one of the two.
|
|
410
|
-
efa : int, default 0
|
|
411
|
-
Number of elastic fabric adapter network devices to attach to container
|
|
412
|
-
ephemeral_storage : int, default None
|
|
413
|
-
The total amount, in GiB, of ephemeral storage to set for the task, 21-200GiB.
|
|
414
|
-
This is only relevant for Fargate compute environments
|
|
415
|
-
log_driver: str, optional, default None
|
|
416
|
-
The log driver to use for the Amazon ECS container.
|
|
417
|
-
log_options: List[str], optional, default None
|
|
418
|
-
List of strings containing options for the chosen log driver. The configurable values
|
|
419
|
-
depend on the `log driver` chosen. Validation of these options is not supported yet.
|
|
420
|
-
Example: [`awslogs-group:aws/batch/job`]
|
|
312
|
+
vars : Dict[str, str], default {}
|
|
313
|
+
Dictionary of environment variables to set.
|
|
421
314
|
"""
|
|
422
315
|
...
|
|
423
316
|
|
|
424
317
|
@typing.overload
|
|
425
|
-
def
|
|
318
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
426
319
|
...
|
|
427
320
|
|
|
428
321
|
@typing.overload
|
|
429
|
-
def
|
|
322
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
430
323
|
...
|
|
431
324
|
|
|
432
|
-
def
|
|
325
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
|
433
326
|
"""
|
|
434
|
-
Specifies
|
|
327
|
+
Specifies environment variables to be set prior to the execution of a step.
|
|
435
328
|
|
|
436
329
|
|
|
437
330
|
Parameters
|
|
438
331
|
----------
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
also present, the maximum value from all decorators is used.
|
|
442
|
-
gpu : int, default 0
|
|
443
|
-
Number of GPUs required for this step. If `@resources` is
|
|
444
|
-
also present, the maximum value from all decorators is used.
|
|
445
|
-
memory : int, default 4096
|
|
446
|
-
Memory size (in MB) required for this step. If
|
|
447
|
-
`@resources` is also present, the maximum value from all decorators is
|
|
448
|
-
used.
|
|
449
|
-
image : str, optional, default None
|
|
450
|
-
Docker image to use when launching on AWS Batch. If not specified, and
|
|
451
|
-
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
|
452
|
-
not, a default Docker image mapping to the current version of Python is used.
|
|
453
|
-
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
|
454
|
-
AWS Batch Job Queue to submit the job to.
|
|
455
|
-
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
|
456
|
-
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
|
457
|
-
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
|
458
|
-
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
|
459
|
-
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
|
460
|
-
shared_memory : int, optional, default None
|
|
461
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
462
|
-
This parameter maps to the `--shm-size` option in Docker.
|
|
463
|
-
max_swap : int, optional, default None
|
|
464
|
-
The total amount of swap memory (in MiB) a container can use for this
|
|
465
|
-
step. This parameter is translated to the `--memory-swap` option in
|
|
466
|
-
Docker where the value is the sum of the container memory plus the
|
|
467
|
-
`max_swap` value.
|
|
468
|
-
swappiness : int, optional, default None
|
|
469
|
-
This allows you to tune memory swappiness behavior for this step.
|
|
470
|
-
A swappiness value of 0 causes swapping not to happen unless absolutely
|
|
471
|
-
necessary. A swappiness value of 100 causes pages to be swapped very
|
|
472
|
-
aggressively. Accepted values are whole numbers between 0 and 100.
|
|
473
|
-
use_tmpfs : bool, default False
|
|
474
|
-
This enables an explicit tmpfs mount for this step. Note that tmpfs is
|
|
475
|
-
not available on Fargate compute environments
|
|
476
|
-
tmpfs_tempdir : bool, default True
|
|
477
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
|
478
|
-
tmpfs_size : int, optional, default None
|
|
479
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
|
480
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
|
481
|
-
memory allocated for this step.
|
|
482
|
-
tmpfs_path : str, optional, default None
|
|
483
|
-
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
|
484
|
-
inferentia : int, default 0
|
|
485
|
-
Number of Inferentia chips required for this step.
|
|
486
|
-
trainium : int, default None
|
|
487
|
-
Alias for inferentia. Use only one of the two.
|
|
488
|
-
efa : int, default 0
|
|
489
|
-
Number of elastic fabric adapter network devices to attach to container
|
|
490
|
-
ephemeral_storage : int, default None
|
|
491
|
-
The total amount, in GiB, of ephemeral storage to set for the task, 21-200GiB.
|
|
492
|
-
This is only relevant for Fargate compute environments
|
|
493
|
-
log_driver: str, optional, default None
|
|
494
|
-
The log driver to use for the Amazon ECS container.
|
|
495
|
-
log_options: List[str], optional, default None
|
|
496
|
-
List of strings containing options for the chosen log driver. The configurable values
|
|
497
|
-
depend on the `log driver` chosen. Validation of these options is not supported yet.
|
|
498
|
-
Example: [`awslogs-group:aws/batch/job`]
|
|
332
|
+
vars : Dict[str, str], default {}
|
|
333
|
+
Dictionary of environment variables to set.
|
|
499
334
|
"""
|
|
500
335
|
...
|
|
501
336
|
|
|
@@ -555,53 +390,90 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
|
555
390
|
...
|
|
556
391
|
|
|
557
392
|
@typing.overload
|
|
558
|
-
def
|
|
393
|
+
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]]]:
|
|
559
394
|
"""
|
|
560
|
-
Specifies
|
|
395
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
|
396
|
+
the execution of a step.
|
|
561
397
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
398
|
+
|
|
399
|
+
Parameters
|
|
400
|
+
----------
|
|
401
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
|
402
|
+
List of secret specs, defining how the secrets are to be retrieved
|
|
403
|
+
role : str, optional, default: None
|
|
404
|
+
Role to use for fetching secrets
|
|
405
|
+
"""
|
|
406
|
+
...
|
|
407
|
+
|
|
408
|
+
@typing.overload
|
|
409
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
410
|
+
...
|
|
411
|
+
|
|
412
|
+
@typing.overload
|
|
413
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
414
|
+
...
|
|
415
|
+
|
|
416
|
+
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):
|
|
417
|
+
"""
|
|
418
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
|
419
|
+
the execution of a step.
|
|
566
420
|
|
|
567
421
|
|
|
568
422
|
Parameters
|
|
569
423
|
----------
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
Determines whether or not the exception is printed to
|
|
575
|
-
stdout when caught.
|
|
424
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
|
425
|
+
List of secret specs, defining how the secrets are to be retrieved
|
|
426
|
+
role : str, optional, default: None
|
|
427
|
+
Role to use for fetching secrets
|
|
576
428
|
"""
|
|
577
429
|
...
|
|
578
430
|
|
|
579
431
|
@typing.overload
|
|
580
|
-
def
|
|
432
|
+
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]]]:
|
|
433
|
+
"""
|
|
434
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
|
435
|
+
|
|
436
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
Parameters
|
|
440
|
+
----------
|
|
441
|
+
type : str, default 'default'
|
|
442
|
+
Card type.
|
|
443
|
+
id : str, optional, default None
|
|
444
|
+
If multiple cards are present, use this id to identify this card.
|
|
445
|
+
options : Dict[str, Any], default {}
|
|
446
|
+
Options passed to the card. The contents depend on the card type.
|
|
447
|
+
timeout : int, default 45
|
|
448
|
+
Interrupt reporting if it takes more than this many seconds.
|
|
449
|
+
"""
|
|
581
450
|
...
|
|
582
451
|
|
|
583
452
|
@typing.overload
|
|
584
|
-
def
|
|
453
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
585
454
|
...
|
|
586
455
|
|
|
587
|
-
|
|
456
|
+
@typing.overload
|
|
457
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
458
|
+
...
|
|
459
|
+
|
|
460
|
+
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):
|
|
588
461
|
"""
|
|
589
|
-
|
|
462
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
|
590
463
|
|
|
591
|
-
|
|
592
|
-
contains the exception raised. You can use it to detect the presence
|
|
593
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
|
594
|
-
are missing.
|
|
464
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
|
595
465
|
|
|
596
466
|
|
|
597
467
|
Parameters
|
|
598
468
|
----------
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
469
|
+
type : str, default 'default'
|
|
470
|
+
Card type.
|
|
471
|
+
id : str, optional, default None
|
|
472
|
+
If multiple cards are present, use this id to identify this card.
|
|
473
|
+
options : Dict[str, Any], default {}
|
|
474
|
+
Options passed to the card. The contents depend on the card type.
|
|
475
|
+
timeout : int, default 45
|
|
476
|
+
Interrupt reporting if it takes more than this many seconds.
|
|
605
477
|
"""
|
|
606
478
|
...
|
|
607
479
|
|
|
@@ -694,45 +566,6 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
|
|
|
694
566
|
"""
|
|
695
567
|
...
|
|
696
568
|
|
|
697
|
-
@typing.overload
|
|
698
|
-
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]]]:
|
|
699
|
-
"""
|
|
700
|
-
Specifies secrets to be retrieved and injected as environment variables prior to
|
|
701
|
-
the execution of a step.
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
Parameters
|
|
705
|
-
----------
|
|
706
|
-
sources : List[Union[str, Dict[str, Any]]], default: []
|
|
707
|
-
List of secret specs, defining how the secrets are to be retrieved
|
|
708
|
-
role : str, optional, default: None
|
|
709
|
-
Role to use for fetching secrets
|
|
710
|
-
"""
|
|
711
|
-
...
|
|
712
|
-
|
|
713
|
-
@typing.overload
|
|
714
|
-
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
715
|
-
...
|
|
716
|
-
|
|
717
|
-
@typing.overload
|
|
718
|
-
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
719
|
-
...
|
|
720
|
-
|
|
721
|
-
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):
|
|
722
|
-
"""
|
|
723
|
-
Specifies secrets to be retrieved and injected as environment variables prior to
|
|
724
|
-
the execution of a step.
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
Parameters
|
|
728
|
-
----------
|
|
729
|
-
sources : List[Union[str, Dict[str, Any]]], default: []
|
|
730
|
-
List of secret specs, defining how the secrets are to be retrieved
|
|
731
|
-
role : str, optional, default: None
|
|
732
|
-
Role to use for fetching secrets
|
|
733
|
-
"""
|
|
734
|
-
...
|
|
735
|
-
|
|
736
569
|
@typing.overload
|
|
737
570
|
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]]]:
|
|
738
571
|
"""
|
|
@@ -852,35 +685,202 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
|
852
685
|
...
|
|
853
686
|
|
|
854
687
|
@typing.overload
|
|
855
|
-
def
|
|
688
|
+
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]]]:
|
|
856
689
|
"""
|
|
857
|
-
Specifies
|
|
690
|
+
Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
|
|
858
691
|
|
|
859
692
|
|
|
860
693
|
Parameters
|
|
861
694
|
----------
|
|
862
|
-
|
|
863
|
-
|
|
695
|
+
cpu : int, default 1
|
|
696
|
+
Number of CPUs required for this step. If `@resources` is
|
|
697
|
+
also present, the maximum value from all decorators is used.
|
|
698
|
+
gpu : int, default 0
|
|
699
|
+
Number of GPUs required for this step. If `@resources` is
|
|
700
|
+
also present, the maximum value from all decorators is used.
|
|
701
|
+
memory : int, default 4096
|
|
702
|
+
Memory size (in MB) required for this step. If
|
|
703
|
+
`@resources` is also present, the maximum value from all decorators is
|
|
704
|
+
used.
|
|
705
|
+
image : str, optional, default None
|
|
706
|
+
Docker image to use when launching on AWS Batch. If not specified, and
|
|
707
|
+
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
|
708
|
+
not, a default Docker image mapping to the current version of Python is used.
|
|
709
|
+
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
|
710
|
+
AWS Batch Job Queue to submit the job to.
|
|
711
|
+
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
|
712
|
+
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
|
713
|
+
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
|
714
|
+
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
|
715
|
+
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
|
716
|
+
shared_memory : int, optional, default None
|
|
717
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
718
|
+
This parameter maps to the `--shm-size` option in Docker.
|
|
719
|
+
max_swap : int, optional, default None
|
|
720
|
+
The total amount of swap memory (in MiB) a container can use for this
|
|
721
|
+
step. This parameter is translated to the `--memory-swap` option in
|
|
722
|
+
Docker where the value is the sum of the container memory plus the
|
|
723
|
+
`max_swap` value.
|
|
724
|
+
swappiness : int, optional, default None
|
|
725
|
+
This allows you to tune memory swappiness behavior for this step.
|
|
726
|
+
A swappiness value of 0 causes swapping not to happen unless absolutely
|
|
727
|
+
necessary. A swappiness value of 100 causes pages to be swapped very
|
|
728
|
+
aggressively. Accepted values are whole numbers between 0 and 100.
|
|
729
|
+
use_tmpfs : bool, default False
|
|
730
|
+
This enables an explicit tmpfs mount for this step. Note that tmpfs is
|
|
731
|
+
not available on Fargate compute environments
|
|
732
|
+
tmpfs_tempdir : bool, default True
|
|
733
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
|
734
|
+
tmpfs_size : int, optional, default None
|
|
735
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
|
736
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
|
737
|
+
memory allocated for this step.
|
|
738
|
+
tmpfs_path : str, optional, default None
|
|
739
|
+
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
|
740
|
+
inferentia : int, default 0
|
|
741
|
+
Number of Inferentia chips required for this step.
|
|
742
|
+
trainium : int, default None
|
|
743
|
+
Alias for inferentia. Use only one of the two.
|
|
744
|
+
efa : int, default 0
|
|
745
|
+
Number of elastic fabric adapter network devices to attach to container
|
|
746
|
+
ephemeral_storage : int, default None
|
|
747
|
+
The total amount, in GiB, of ephemeral storage to set for the task, 21-200GiB.
|
|
748
|
+
This is only relevant for Fargate compute environments
|
|
749
|
+
log_driver: str, optional, default None
|
|
750
|
+
The log driver to use for the Amazon ECS container.
|
|
751
|
+
log_options: List[str], optional, default None
|
|
752
|
+
List of strings containing options for the chosen log driver. The configurable values
|
|
753
|
+
depend on the `log driver` chosen. Validation of these options is not supported yet.
|
|
754
|
+
Example: [`awslogs-group:aws/batch/job`]
|
|
864
755
|
"""
|
|
865
756
|
...
|
|
866
757
|
|
|
867
758
|
@typing.overload
|
|
868
|
-
def
|
|
759
|
+
def batch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
869
760
|
...
|
|
870
761
|
|
|
871
762
|
@typing.overload
|
|
872
|
-
def
|
|
763
|
+
def batch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
873
764
|
...
|
|
874
765
|
|
|
875
|
-
def
|
|
766
|
+
def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = 'METAFLOW_BATCH_JOB_QUEUE', iam_role: str = 'METAFLOW_ECS_S3_ACCESS_IAM_ROLE', execution_role: str = 'METAFLOW_ECS_FARGATE_EXECUTION_ROLE', shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[str]] = None):
|
|
876
767
|
"""
|
|
877
|
-
Specifies
|
|
768
|
+
Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
|
|
878
769
|
|
|
879
770
|
|
|
880
771
|
Parameters
|
|
881
772
|
----------
|
|
882
|
-
|
|
883
|
-
|
|
773
|
+
cpu : int, default 1
|
|
774
|
+
Number of CPUs required for this step. If `@resources` is
|
|
775
|
+
also present, the maximum value from all decorators is used.
|
|
776
|
+
gpu : int, default 0
|
|
777
|
+
Number of GPUs required for this step. If `@resources` is
|
|
778
|
+
also present, the maximum value from all decorators is used.
|
|
779
|
+
memory : int, default 4096
|
|
780
|
+
Memory size (in MB) required for this step. If
|
|
781
|
+
`@resources` is also present, the maximum value from all decorators is
|
|
782
|
+
used.
|
|
783
|
+
image : str, optional, default None
|
|
784
|
+
Docker image to use when launching on AWS Batch. If not specified, and
|
|
785
|
+
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
|
786
|
+
not, a default Docker image mapping to the current version of Python is used.
|
|
787
|
+
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
|
788
|
+
AWS Batch Job Queue to submit the job to.
|
|
789
|
+
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
|
790
|
+
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
|
791
|
+
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
|
792
|
+
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
|
793
|
+
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
|
794
|
+
shared_memory : int, optional, default None
|
|
795
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
|
796
|
+
This parameter maps to the `--shm-size` option in Docker.
|
|
797
|
+
max_swap : int, optional, default None
|
|
798
|
+
The total amount of swap memory (in MiB) a container can use for this
|
|
799
|
+
step. This parameter is translated to the `--memory-swap` option in
|
|
800
|
+
Docker where the value is the sum of the container memory plus the
|
|
801
|
+
`max_swap` value.
|
|
802
|
+
swappiness : int, optional, default None
|
|
803
|
+
This allows you to tune memory swappiness behavior for this step.
|
|
804
|
+
A swappiness value of 0 causes swapping not to happen unless absolutely
|
|
805
|
+
necessary. A swappiness value of 100 causes pages to be swapped very
|
|
806
|
+
aggressively. Accepted values are whole numbers between 0 and 100.
|
|
807
|
+
use_tmpfs : bool, default False
|
|
808
|
+
This enables an explicit tmpfs mount for this step. Note that tmpfs is
|
|
809
|
+
not available on Fargate compute environments
|
|
810
|
+
tmpfs_tempdir : bool, default True
|
|
811
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
|
812
|
+
tmpfs_size : int, optional, default None
|
|
813
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
|
814
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
|
815
|
+
memory allocated for this step.
|
|
816
|
+
tmpfs_path : str, optional, default None
|
|
817
|
+
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
|
818
|
+
inferentia : int, default 0
|
|
819
|
+
Number of Inferentia chips required for this step.
|
|
820
|
+
trainium : int, default None
|
|
821
|
+
Alias for inferentia. Use only one of the two.
|
|
822
|
+
efa : int, default 0
|
|
823
|
+
Number of elastic fabric adapter network devices to attach to container
|
|
824
|
+
ephemeral_storage : int, default None
|
|
825
|
+
The total amount, in GiB, of ephemeral storage to set for the task, 21-200GiB.
|
|
826
|
+
This is only relevant for Fargate compute environments
|
|
827
|
+
log_driver: str, optional, default None
|
|
828
|
+
The log driver to use for the Amazon ECS container.
|
|
829
|
+
log_options: List[str], optional, default None
|
|
830
|
+
List of strings containing options for the chosen log driver. The configurable values
|
|
831
|
+
depend on the `log driver` chosen. Validation of these options is not supported yet.
|
|
832
|
+
Example: [`awslogs-group:aws/batch/job`]
|
|
833
|
+
"""
|
|
834
|
+
...
|
|
835
|
+
|
|
836
|
+
@typing.overload
|
|
837
|
+
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]]]:
|
|
838
|
+
"""
|
|
839
|
+
Specifies the PyPI packages for the step.
|
|
840
|
+
|
|
841
|
+
Information in this decorator will augment any
|
|
842
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
|
843
|
+
you can use `@pypi_base` to set packages required by all
|
|
844
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
Parameters
|
|
848
|
+
----------
|
|
849
|
+
packages : Dict[str, str], default: {}
|
|
850
|
+
Packages to use for this step. The key is the name of the package
|
|
851
|
+
and the value is the version to use.
|
|
852
|
+
python : str, optional, default: None
|
|
853
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
854
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
855
|
+
"""
|
|
856
|
+
...
|
|
857
|
+
|
|
858
|
+
@typing.overload
|
|
859
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
|
860
|
+
...
|
|
861
|
+
|
|
862
|
+
@typing.overload
|
|
863
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
|
864
|
+
...
|
|
865
|
+
|
|
866
|
+
def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
|
867
|
+
"""
|
|
868
|
+
Specifies the PyPI packages for the step.
|
|
869
|
+
|
|
870
|
+
Information in this decorator will augment any
|
|
871
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
|
872
|
+
you can use `@pypi_base` to set packages required by all
|
|
873
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
Parameters
|
|
877
|
+
----------
|
|
878
|
+
packages : Dict[str, str], default: {}
|
|
879
|
+
Packages to use for this step. The key is the name of the package
|
|
880
|
+
and the value is the version to use.
|
|
881
|
+
python : str, optional, default: None
|
|
882
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
883
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
884
884
|
"""
|
|
885
885
|
...
|
|
886
886
|
|
|
@@ -927,6 +927,57 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
|
|
|
927
927
|
"""
|
|
928
928
|
...
|
|
929
929
|
|
|
930
|
+
@typing.overload
|
|
931
|
+
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]]:
|
|
932
|
+
"""
|
|
933
|
+
Specifies the Conda environment for all steps of the flow.
|
|
934
|
+
|
|
935
|
+
Use `@conda_base` to set common libraries required by all
|
|
936
|
+
steps and use `@conda` to specify step-specific additions.
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
Parameters
|
|
940
|
+
----------
|
|
941
|
+
packages : Dict[str, str], default {}
|
|
942
|
+
Packages to use for this flow. The key is the name of the package
|
|
943
|
+
and the value is the version to use.
|
|
944
|
+
libraries : Dict[str, str], default {}
|
|
945
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
946
|
+
python : str, optional, default None
|
|
947
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
948
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
949
|
+
disabled : bool, default False
|
|
950
|
+
If set to True, disables Conda.
|
|
951
|
+
"""
|
|
952
|
+
...
|
|
953
|
+
|
|
954
|
+
@typing.overload
|
|
955
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
956
|
+
...
|
|
957
|
+
|
|
958
|
+
def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
|
|
959
|
+
"""
|
|
960
|
+
Specifies the Conda environment for all steps of the flow.
|
|
961
|
+
|
|
962
|
+
Use `@conda_base` to set common libraries required by all
|
|
963
|
+
steps and use `@conda` to specify step-specific additions.
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
Parameters
|
|
967
|
+
----------
|
|
968
|
+
packages : Dict[str, str], default {}
|
|
969
|
+
Packages to use for this flow. The key is the name of the package
|
|
970
|
+
and the value is the version to use.
|
|
971
|
+
libraries : Dict[str, str], default {}
|
|
972
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
973
|
+
python : str, optional, default None
|
|
974
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
975
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
976
|
+
disabled : bool, default False
|
|
977
|
+
If set to True, disables Conda.
|
|
978
|
+
"""
|
|
979
|
+
...
|
|
980
|
+
|
|
930
981
|
@typing.overload
|
|
931
982
|
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]]:
|
|
932
983
|
"""
|
|
@@ -1079,6 +1130,90 @@ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly:
|
|
|
1079
1130
|
"""
|
|
1080
1131
|
...
|
|
1081
1132
|
|
|
1133
|
+
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]]:
|
|
1134
|
+
"""
|
|
1135
|
+
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)
|
|
1136
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
|
1137
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
|
1138
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
|
1139
|
+
starts only after all sensors finish.
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
Parameters
|
|
1143
|
+
----------
|
|
1144
|
+
timeout : int
|
|
1145
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
|
1146
|
+
poke_interval : int
|
|
1147
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
|
1148
|
+
mode : str
|
|
1149
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
|
1150
|
+
exponential_backoff : bool
|
|
1151
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
|
1152
|
+
pool : str
|
|
1153
|
+
the slot pool this task should run in,
|
|
1154
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
|
1155
|
+
soft_fail : bool
|
|
1156
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
|
1157
|
+
name : str
|
|
1158
|
+
Name of the sensor on Airflow
|
|
1159
|
+
description : str
|
|
1160
|
+
Description of sensor in the Airflow UI
|
|
1161
|
+
bucket_key : Union[str, List[str]]
|
|
1162
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
|
1163
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
|
1164
|
+
bucket_name : str
|
|
1165
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
|
1166
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
|
1167
|
+
wildcard_match : bool
|
|
1168
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
|
1169
|
+
aws_conn_id : str
|
|
1170
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
|
1171
|
+
verify : bool
|
|
1172
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
|
1173
|
+
"""
|
|
1174
|
+
...
|
|
1175
|
+
|
|
1176
|
+
@typing.overload
|
|
1177
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
1178
|
+
"""
|
|
1179
|
+
Specifies the PyPI packages for all steps of the flow.
|
|
1180
|
+
|
|
1181
|
+
Use `@pypi_base` to set common packages required by all
|
|
1182
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
1183
|
+
|
|
1184
|
+
Parameters
|
|
1185
|
+
----------
|
|
1186
|
+
packages : Dict[str, str], default: {}
|
|
1187
|
+
Packages to use for this flow. The key is the name of the package
|
|
1188
|
+
and the value is the version to use.
|
|
1189
|
+
python : str, optional, default: None
|
|
1190
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
1191
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
1192
|
+
"""
|
|
1193
|
+
...
|
|
1194
|
+
|
|
1195
|
+
@typing.overload
|
|
1196
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
1197
|
+
...
|
|
1198
|
+
|
|
1199
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
|
1200
|
+
"""
|
|
1201
|
+
Specifies the PyPI packages for all steps of the flow.
|
|
1202
|
+
|
|
1203
|
+
Use `@pypi_base` to set common packages required by all
|
|
1204
|
+
steps and use `@pypi` to specify step-specific overrides.
|
|
1205
|
+
|
|
1206
|
+
Parameters
|
|
1207
|
+
----------
|
|
1208
|
+
packages : Dict[str, str], default: {}
|
|
1209
|
+
Packages to use for this flow. The key is the name of the package
|
|
1210
|
+
and the value is the version to use.
|
|
1211
|
+
python : str, optional, default: None
|
|
1212
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
1213
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
1214
|
+
"""
|
|
1215
|
+
...
|
|
1216
|
+
|
|
1082
1217
|
def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
1083
1218
|
"""
|
|
1084
1219
|
Specifies what flows belong to the same project.
|
|
@@ -1207,138 +1342,3 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
|
1207
1342
|
"""
|
|
1208
1343
|
...
|
|
1209
1344
|
|
|
1210
|
-
@typing.overload
|
|
1211
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
|
1212
|
-
"""
|
|
1213
|
-
Specifies the PyPI packages for all steps of the flow.
|
|
1214
|
-
|
|
1215
|
-
Use `@pypi_base` to set common packages required by all
|
|
1216
|
-
steps and use `@pypi` to specify step-specific overrides.
|
|
1217
|
-
|
|
1218
|
-
Parameters
|
|
1219
|
-
----------
|
|
1220
|
-
packages : Dict[str, str], default: {}
|
|
1221
|
-
Packages to use for this flow. The key is the name of the package
|
|
1222
|
-
and the value is the version to use.
|
|
1223
|
-
python : str, optional, default: None
|
|
1224
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
1225
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
1226
|
-
"""
|
|
1227
|
-
...
|
|
1228
|
-
|
|
1229
|
-
@typing.overload
|
|
1230
|
-
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
1231
|
-
...
|
|
1232
|
-
|
|
1233
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
|
1234
|
-
"""
|
|
1235
|
-
Specifies the PyPI packages for all steps of the flow.
|
|
1236
|
-
|
|
1237
|
-
Use `@pypi_base` to set common packages required by all
|
|
1238
|
-
steps and use `@pypi` to specify step-specific overrides.
|
|
1239
|
-
|
|
1240
|
-
Parameters
|
|
1241
|
-
----------
|
|
1242
|
-
packages : Dict[str, str], default: {}
|
|
1243
|
-
Packages to use for this flow. The key is the name of the package
|
|
1244
|
-
and the value is the version to use.
|
|
1245
|
-
python : str, optional, default: None
|
|
1246
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
1247
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
1248
|
-
"""
|
|
1249
|
-
...
|
|
1250
|
-
|
|
1251
|
-
@typing.overload
|
|
1252
|
-
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]]:
|
|
1253
|
-
"""
|
|
1254
|
-
Specifies the Conda environment for all steps of the flow.
|
|
1255
|
-
|
|
1256
|
-
Use `@conda_base` to set common libraries required by all
|
|
1257
|
-
steps and use `@conda` to specify step-specific additions.
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
Parameters
|
|
1261
|
-
----------
|
|
1262
|
-
packages : Dict[str, str], default {}
|
|
1263
|
-
Packages to use for this flow. The key is the name of the package
|
|
1264
|
-
and the value is the version to use.
|
|
1265
|
-
libraries : Dict[str, str], default {}
|
|
1266
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
1267
|
-
python : str, optional, default None
|
|
1268
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
1269
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
1270
|
-
disabled : bool, default False
|
|
1271
|
-
If set to True, disables Conda.
|
|
1272
|
-
"""
|
|
1273
|
-
...
|
|
1274
|
-
|
|
1275
|
-
@typing.overload
|
|
1276
|
-
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
|
1277
|
-
...
|
|
1278
|
-
|
|
1279
|
-
def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
|
|
1280
|
-
"""
|
|
1281
|
-
Specifies the Conda environment for all steps of the flow.
|
|
1282
|
-
|
|
1283
|
-
Use `@conda_base` to set common libraries required by all
|
|
1284
|
-
steps and use `@conda` to specify step-specific additions.
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
Parameters
|
|
1288
|
-
----------
|
|
1289
|
-
packages : Dict[str, str], default {}
|
|
1290
|
-
Packages to use for this flow. The key is the name of the package
|
|
1291
|
-
and the value is the version to use.
|
|
1292
|
-
libraries : Dict[str, str], default {}
|
|
1293
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
|
1294
|
-
python : str, optional, default None
|
|
1295
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
|
1296
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
|
1297
|
-
disabled : bool, default False
|
|
1298
|
-
If set to True, disables Conda.
|
|
1299
|
-
"""
|
|
1300
|
-
...
|
|
1301
|
-
|
|
1302
|
-
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]]:
|
|
1303
|
-
"""
|
|
1304
|
-
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)
|
|
1305
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
|
1306
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
|
1307
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
|
1308
|
-
starts only after all sensors finish.
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
Parameters
|
|
1312
|
-
----------
|
|
1313
|
-
timeout : int
|
|
1314
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
|
1315
|
-
poke_interval : int
|
|
1316
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
|
1317
|
-
mode : str
|
|
1318
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
|
1319
|
-
exponential_backoff : bool
|
|
1320
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
|
1321
|
-
pool : str
|
|
1322
|
-
the slot pool this task should run in,
|
|
1323
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
|
1324
|
-
soft_fail : bool
|
|
1325
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
|
1326
|
-
name : str
|
|
1327
|
-
Name of the sensor on Airflow
|
|
1328
|
-
description : str
|
|
1329
|
-
Description of sensor in the Airflow UI
|
|
1330
|
-
bucket_key : Union[str, List[str]]
|
|
1331
|
-
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
|
1332
|
-
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
|
1333
|
-
bucket_name : str
|
|
1334
|
-
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
|
1335
|
-
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
|
1336
|
-
wildcard_match : bool
|
|
1337
|
-
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
|
1338
|
-
aws_conn_id : str
|
|
1339
|
-
a reference to the s3 connection on Airflow. (Default: None)
|
|
1340
|
-
verify : bool
|
|
1341
|
-
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
|
1342
|
-
"""
|
|
1343
|
-
...
|
|
1344
|
-
|