ob-metaflow-stubs 5.7__py2.py3-none-any.whl → 5.7.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- metaflow-stubs/__init__.pyi +364 -654
- metaflow-stubs/cards.pyi +3 -3
- metaflow-stubs/cli.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +2 -2
- metaflow-stubs/client/core.pyi +5 -5
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/clone_util.pyi +1 -1
- metaflow-stubs/events.pyi +1 -1
- metaflow-stubs/exception.pyi +1 -1
- metaflow-stubs/flowspec.pyi +4 -4
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +4 -4
- metaflow-stubs/metadata/metadata.pyi +2 -2
- metaflow-stubs/metadata/util.pyi +1 -1
- metaflow-stubs/metaflow_config.pyi +3 -1
- metaflow-stubs/metaflow_current.pyi +33 -33
- metaflow-stubs/mflog/mflog.pyi +1 -1
- metaflow-stubs/multicore_utils.pyi +1 -1
- metaflow-stubs/parameters.pyi +2 -2
- metaflow-stubs/plugins/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/__init__.pyi +1 -1
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +1 -1
- metaflow-stubs/plugins/airflow/exception.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +1 -1
- 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 +1 -1
- metaflow-stubs/plugins/argo/argo_client.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_events.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +5 -5
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +5 -5
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +1 -1
- metaflow-stubs/plugins/aws/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_client.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_utils.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/production_token.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +2 -2
- metaflow-stubs/plugins/azure/__init__.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_credential.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/azure/azure_utils.pyi +1 -1
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +1 -1
- metaflow-stubs/plugins/azure/includefile_support.pyi +1 -1
- metaflow-stubs/plugins/cards/__init__.pyi +1 -1
- metaflow-stubs/plugins/cards/card_cli.pyi +4 -4
- metaflow-stubs/plugins/cards/card_client.pyi +2 -2
- metaflow-stubs/plugins/cards/card_creator.pyi +1 -1
- metaflow-stubs/plugins/cards/card_datastore.pyi +1 -1
- metaflow-stubs/plugins/cards/card_decorator.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/card.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +1 -1
- metaflow-stubs/plugins/cards/component_serializer.pyi +3 -3
- metaflow-stubs/plugins/cards/exception.pyi +1 -1
- metaflow-stubs/plugins/catch_decorator.pyi +2 -2
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/s3.pyi +4 -4
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +1 -1
- metaflow-stubs/plugins/debug_logger.pyi +1 -1
- metaflow-stubs/plugins/debug_monitor.pyi +1 -1
- metaflow-stubs/plugins/environment_decorator.pyi +1 -1
- metaflow-stubs/plugins/events_decorator.pyi +1 -1
- metaflow-stubs/plugins/frameworks/__init__.pyi +1 -1
- metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
- metaflow-stubs/plugins/gcp/__init__.pyi +1 -1
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +1 -1
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +1 -1
- metaflow-stubs/plugins/gcp/gs_utils.pyi +1 -1
- metaflow-stubs/plugins/gcp/includefile_support.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/__init__.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +3 -3
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +1 -1
- metaflow-stubs/plugins/logs_cli.pyi +2 -2
- metaflow-stubs/plugins/package_cli.pyi +1 -1
- metaflow-stubs/plugins/parallel_decorator.pyi +1 -1
- metaflow-stubs/plugins/perimeters.pyi +1 -1
- metaflow-stubs/plugins/project_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/__init__.pyi +1 -1
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +1 -1
- metaflow-stubs/plugins/pypi/utils.pyi +1 -1
- metaflow-stubs/plugins/resources_decorator.pyi +1 -1
- metaflow-stubs/plugins/retry_decorator.pyi +1 -1
- metaflow-stubs/plugins/secrets/__init__.pyi +1 -1
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +1 -1
- metaflow-stubs/plugins/storage_executor.pyi +1 -1
- metaflow-stubs/plugins/tag_cli.pyi +3 -3
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/procpoll.pyi +1 -1
- metaflow-stubs/profilers/__init__.pyi +1 -1
- metaflow-stubs/pylint_wrapper.pyi +1 -1
- metaflow-stubs/runner/__init__.pyi +1 -1
- metaflow-stubs/runner/deployer.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +3 -3
- metaflow-stubs/runner/nbdeploy.pyi +1 -1
- metaflow-stubs/runner/nbrun.pyi +1 -1
- metaflow-stubs/runner/subprocess_manager.pyi +1 -1
- metaflow-stubs/runner/utils.pyi +1 -1
- 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 +1 -1
- metaflow-stubs/tuple_util.pyi +1 -1
- {ob_metaflow_stubs-5.7.dist-info → ob_metaflow_stubs-5.7.1.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-5.7.1.dist-info/RECORD +138 -0
- ob_metaflow_stubs-5.7.dist-info/RECORD +0 -138
- {ob_metaflow_stubs-5.7.dist-info → ob_metaflow_stubs-5.7.1.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-5.7.dist-info → ob_metaflow_stubs-5.7.1.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
@@ -1,25 +1,23 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.12.18.2+ob(v1) #
|
4
|
-
# Generated on 2024-08-
|
4
|
+
# Generated on 2024-08-30T00:31:57.693984 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.
|
11
|
+
import metaflow._vendor.click.types
|
12
12
|
import metaflow.datastore.inputs
|
13
|
-
import metaflow.
|
13
|
+
import metaflow.metaflow_current
|
14
|
+
import metaflow.events
|
15
|
+
import datetime
|
16
|
+
import metaflow.parameters
|
14
17
|
import metaflow.flowspec
|
15
|
-
import
|
18
|
+
import metaflow.client.core
|
16
19
|
import typing
|
17
20
|
import metaflow.runner.metaflow_runner
|
18
|
-
import datetime
|
19
|
-
import metaflow.client.core
|
20
|
-
import metaflow.events
|
21
|
-
import metaflow._vendor.click.types
|
22
|
-
import metaflow.parameters
|
23
21
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
24
22
|
StepFlag = typing.NewType("StepFlag", bool)
|
25
23
|
|
@@ -356,295 +354,7 @@ class JSONTypeClass(metaflow._vendor.click.types.ParamType, metaclass=type):
|
|
356
354
|
|
357
355
|
JSONType: metaflow.parameters.JSONTypeClass
|
358
356
|
|
359
|
-
|
360
|
-
@classmethod
|
361
|
-
def get_root_from_config(cls, echo, create_on_absent = True):
|
362
|
-
...
|
363
|
-
def __enter__(self) -> metaflow.plugins.datatools.s3.s3.S3:
|
364
|
-
...
|
365
|
-
def __exit__(self, *args):
|
366
|
-
...
|
367
|
-
def close(self):
|
368
|
-
"""
|
369
|
-
Delete all temporary files downloaded in this context.
|
370
|
-
"""
|
371
|
-
...
|
372
|
-
def list_paths(self, keys: typing.Optional[typing.Iterable[str]] = None) -> typing.List[metaflow.plugins.datatools.s3.s3.S3Object]:
|
373
|
-
"""
|
374
|
-
List the next level of paths in S3.
|
375
|
-
|
376
|
-
If multiple keys are specified, listings are done in parallel. The returned
|
377
|
-
S3Objects have `.exists == False` if the path refers to a prefix, not an
|
378
|
-
existing S3 object.
|
379
|
-
|
380
|
-
For instance, if the directory hierarchy is
|
381
|
-
```
|
382
|
-
a/0.txt
|
383
|
-
a/b/1.txt
|
384
|
-
a/c/2.txt
|
385
|
-
a/d/e/3.txt
|
386
|
-
f/4.txt
|
387
|
-
```
|
388
|
-
The `list_paths(['a', 'f'])` call returns
|
389
|
-
```
|
390
|
-
a/0.txt (exists == True)
|
391
|
-
a/b/ (exists == False)
|
392
|
-
a/c/ (exists == False)
|
393
|
-
a/d/ (exists == False)
|
394
|
-
f/4.txt (exists == True)
|
395
|
-
```
|
396
|
-
|
397
|
-
Parameters
|
398
|
-
----------
|
399
|
-
keys : Iterable[str], optional, default None
|
400
|
-
List of paths.
|
401
|
-
|
402
|
-
Returns
|
403
|
-
-------
|
404
|
-
List[S3Object]
|
405
|
-
S3Objects under the given paths, including prefixes (directories) that
|
406
|
-
do not correspond to leaf objects.
|
407
|
-
"""
|
408
|
-
...
|
409
|
-
def list_recursive(self, keys: typing.Optional[typing.Iterable[str]] = None) -> typing.List[metaflow.plugins.datatools.s3.s3.S3Object]:
|
410
|
-
"""
|
411
|
-
List all objects recursively under the given prefixes.
|
412
|
-
|
413
|
-
If multiple keys are specified, listings are done in parallel. All objects
|
414
|
-
returned have `.exists == True` as this call always returns leaf objects.
|
415
|
-
|
416
|
-
For instance, if the directory hierarchy is
|
417
|
-
```
|
418
|
-
a/0.txt
|
419
|
-
a/b/1.txt
|
420
|
-
a/c/2.txt
|
421
|
-
a/d/e/3.txt
|
422
|
-
f/4.txt
|
423
|
-
```
|
424
|
-
The `list_paths(['a', 'f'])` call returns
|
425
|
-
```
|
426
|
-
a/0.txt (exists == True)
|
427
|
-
a/b/1.txt (exists == True)
|
428
|
-
a/c/2.txt (exists == True)
|
429
|
-
a/d/e/3.txt (exists == True)
|
430
|
-
f/4.txt (exists == True)
|
431
|
-
```
|
432
|
-
|
433
|
-
Parameters
|
434
|
-
----------
|
435
|
-
keys : Iterable[str], optional, default None
|
436
|
-
List of paths.
|
437
|
-
|
438
|
-
Returns
|
439
|
-
-------
|
440
|
-
List[S3Object]
|
441
|
-
S3Objects under the given paths.
|
442
|
-
"""
|
443
|
-
...
|
444
|
-
def info(self, key: typing.Optional[str] = None, return_missing: bool = False) -> metaflow.plugins.datatools.s3.s3.S3Object:
|
445
|
-
"""
|
446
|
-
Get metadata about a single object in S3.
|
447
|
-
|
448
|
-
This call makes a single `HEAD` request to S3 which can be
|
449
|
-
much faster than downloading all data with `get`.
|
450
|
-
|
451
|
-
Parameters
|
452
|
-
----------
|
453
|
-
key : str, optional, default None
|
454
|
-
Object to query. It can be an S3 url or a path suffix.
|
455
|
-
return_missing : bool, default False
|
456
|
-
If set to True, do not raise an exception for a missing key but
|
457
|
-
return it as an `S3Object` with `.exists == False`.
|
458
|
-
|
459
|
-
Returns
|
460
|
-
-------
|
461
|
-
S3Object
|
462
|
-
An S3Object corresponding to the object requested. The object
|
463
|
-
will have `.downloaded == False`.
|
464
|
-
"""
|
465
|
-
...
|
466
|
-
def info_many(self, keys: typing.Iterable[str], return_missing: bool = False) -> typing.List[metaflow.plugins.datatools.s3.s3.S3Object]:
|
467
|
-
"""
|
468
|
-
Get metadata about many objects in S3 in parallel.
|
469
|
-
|
470
|
-
This call makes a single `HEAD` request to S3 which can be
|
471
|
-
much faster than downloading all data with `get`.
|
472
|
-
|
473
|
-
Parameters
|
474
|
-
----------
|
475
|
-
keys : Iterable[str]
|
476
|
-
Objects to query. Each key can be an S3 url or a path suffix.
|
477
|
-
return_missing : bool, default False
|
478
|
-
If set to True, do not raise an exception for a missing key but
|
479
|
-
return it as an `S3Object` with `.exists == False`.
|
480
|
-
|
481
|
-
Returns
|
482
|
-
-------
|
483
|
-
List[S3Object]
|
484
|
-
A list of S3Objects corresponding to the paths requested. The
|
485
|
-
objects will have `.downloaded == False`.
|
486
|
-
"""
|
487
|
-
...
|
488
|
-
def get(self, key: typing.Union[str, metaflow.plugins.datatools.s3.s3.S3GetObject, None] = None, return_missing: bool = False, return_info: bool = True) -> metaflow.plugins.datatools.s3.s3.S3Object:
|
489
|
-
"""
|
490
|
-
Get a single object from S3.
|
491
|
-
|
492
|
-
Parameters
|
493
|
-
----------
|
494
|
-
key : Union[str, S3GetObject], optional, default None
|
495
|
-
Object to download. It can be an S3 url, a path suffix, or
|
496
|
-
an S3GetObject that defines a range of data to download. If None, or
|
497
|
-
not provided, gets the S3 root.
|
498
|
-
return_missing : bool, default False
|
499
|
-
If set to True, do not raise an exception for a missing key but
|
500
|
-
return it as an `S3Object` with `.exists == False`.
|
501
|
-
return_info : bool, default True
|
502
|
-
If set to True, fetch the content-type and user metadata associated
|
503
|
-
with the object at no extra cost, included for symmetry with `get_many`
|
504
|
-
|
505
|
-
Returns
|
506
|
-
-------
|
507
|
-
S3Object
|
508
|
-
An S3Object corresponding to the object requested.
|
509
|
-
"""
|
510
|
-
...
|
511
|
-
def get_many(self, keys: typing.Iterable[typing.Union[str, metaflow.plugins.datatools.s3.s3.S3GetObject]], return_missing: bool = False, return_info: bool = True) -> typing.List[metaflow.plugins.datatools.s3.s3.S3Object]:
|
512
|
-
"""
|
513
|
-
Get many objects from S3 in parallel.
|
514
|
-
|
515
|
-
Parameters
|
516
|
-
----------
|
517
|
-
keys : Iterable[Union[str, S3GetObject]]
|
518
|
-
Objects to download. Each object can be an S3 url, a path suffix, or
|
519
|
-
an S3GetObject that defines a range of data to download.
|
520
|
-
return_missing : bool, default False
|
521
|
-
If set to True, do not raise an exception for a missing key but
|
522
|
-
return it as an `S3Object` with `.exists == False`.
|
523
|
-
return_info : bool, default True
|
524
|
-
If set to True, fetch the content-type and user metadata associated
|
525
|
-
with the object at no extra cost, included for symmetry with `get_many`.
|
526
|
-
|
527
|
-
Returns
|
528
|
-
-------
|
529
|
-
List[S3Object]
|
530
|
-
S3Objects corresponding to the objects requested.
|
531
|
-
"""
|
532
|
-
...
|
533
|
-
def get_recursive(self, keys: typing.Iterable[str], return_info: bool = False) -> typing.List[metaflow.plugins.datatools.s3.s3.S3Object]:
|
534
|
-
"""
|
535
|
-
Get many objects from S3 recursively in parallel.
|
536
|
-
|
537
|
-
Parameters
|
538
|
-
----------
|
539
|
-
keys : Iterable[str]
|
540
|
-
Prefixes to download recursively. Each prefix can be an S3 url or a path suffix
|
541
|
-
which define the root prefix under which all objects are downloaded.
|
542
|
-
return_info : bool, default False
|
543
|
-
If set to True, fetch the content-type and user metadata associated
|
544
|
-
with the object.
|
545
|
-
|
546
|
-
Returns
|
547
|
-
-------
|
548
|
-
List[S3Object]
|
549
|
-
S3Objects stored under the given prefixes.
|
550
|
-
"""
|
551
|
-
...
|
552
|
-
def get_all(self, return_info: bool = False) -> typing.List[metaflow.plugins.datatools.s3.s3.S3Object]:
|
553
|
-
"""
|
554
|
-
Get all objects under the prefix set in the `S3` constructor.
|
555
|
-
|
556
|
-
This method requires that the `S3` object is initialized either with `run` or
|
557
|
-
`s3root`.
|
558
|
-
|
559
|
-
Parameters
|
560
|
-
----------
|
561
|
-
return_info : bool, default False
|
562
|
-
If set to True, fetch the content-type and user metadata associated
|
563
|
-
with the object.
|
564
|
-
|
565
|
-
Returns
|
566
|
-
-------
|
567
|
-
Iterable[S3Object]
|
568
|
-
S3Objects stored under the main prefix.
|
569
|
-
"""
|
570
|
-
...
|
571
|
-
def put(self, key: typing.Union[str, metaflow.plugins.datatools.s3.s3.S3PutObject], obj: typing.Union[io.RawIOBase, io.BufferedIOBase, str, bytes], overwrite: bool = True, content_type: typing.Optional[str] = None, metadata: typing.Optional[typing.Dict[str, str]] = None) -> str:
|
572
|
-
"""
|
573
|
-
Upload a single object to S3.
|
574
|
-
|
575
|
-
Parameters
|
576
|
-
----------
|
577
|
-
key : Union[str, S3PutObject]
|
578
|
-
Object path. It can be an S3 url or a path suffix.
|
579
|
-
obj : PutValue
|
580
|
-
An object to store in S3. Strings are converted to UTF-8 encoding.
|
581
|
-
overwrite : bool, default True
|
582
|
-
Overwrite the object if it exists. If set to False, the operation
|
583
|
-
succeeds without uploading anything if the key already exists.
|
584
|
-
content_type : str, optional, default None
|
585
|
-
Optional MIME type for the object.
|
586
|
-
metadata : Dict[str, str], optional, default None
|
587
|
-
A JSON-encodable dictionary of additional headers to be stored
|
588
|
-
as metadata with the object.
|
589
|
-
|
590
|
-
Returns
|
591
|
-
-------
|
592
|
-
str
|
593
|
-
URL of the object stored.
|
594
|
-
"""
|
595
|
-
...
|
596
|
-
def put_many(self, key_objs: typing.List[typing.Union[typing.Tuple[str, typing.Union[io.RawIOBase, io.BufferedIOBase, str, bytes]], metaflow.plugins.datatools.s3.s3.S3PutObject]], overwrite: bool = True) -> typing.List[typing.Tuple[str, str]]:
|
597
|
-
"""
|
598
|
-
Upload many objects to S3.
|
599
|
-
|
600
|
-
Each object to be uploaded can be specified in two ways:
|
601
|
-
|
602
|
-
1. As a `(key, obj)` tuple where `key` is a string specifying
|
603
|
-
the path and `obj` is a string or a bytes object.
|
604
|
-
|
605
|
-
2. As a `S3PutObject` which contains additional metadata to be
|
606
|
-
stored with the object.
|
607
|
-
|
608
|
-
Parameters
|
609
|
-
----------
|
610
|
-
key_objs : List[Union[Tuple[str, PutValue], S3PutObject]]
|
611
|
-
List of key-object pairs to upload.
|
612
|
-
overwrite : bool, default True
|
613
|
-
Overwrite the object if it exists. If set to False, the operation
|
614
|
-
succeeds without uploading anything if the key already exists.
|
615
|
-
|
616
|
-
Returns
|
617
|
-
-------
|
618
|
-
List[Tuple[str, str]]
|
619
|
-
List of `(key, url)` pairs corresponding to the objects uploaded.
|
620
|
-
"""
|
621
|
-
...
|
622
|
-
def put_files(self, key_paths: typing.List[typing.Union[typing.Tuple[str, typing.Union[io.RawIOBase, io.BufferedIOBase, str, bytes]], metaflow.plugins.datatools.s3.s3.S3PutObject]], overwrite: bool = True) -> typing.List[typing.Tuple[str, str]]:
|
623
|
-
"""
|
624
|
-
Upload many local files to S3.
|
625
|
-
|
626
|
-
Each file to be uploaded can be specified in two ways:
|
627
|
-
|
628
|
-
1. As a `(key, path)` tuple where `key` is a string specifying
|
629
|
-
the S3 path and `path` is the path to a local file.
|
630
|
-
|
631
|
-
2. As a `S3PutObject` which contains additional metadata to be
|
632
|
-
stored with the file.
|
633
|
-
|
634
|
-
Parameters
|
635
|
-
----------
|
636
|
-
key_paths : List[Union[Tuple[str, PutValue], S3PutObject]]
|
637
|
-
List of files to upload.
|
638
|
-
overwrite : bool, default True
|
639
|
-
Overwrite the object if it exists. If set to False, the operation
|
640
|
-
succeeds without uploading anything if the key already exists.
|
641
|
-
|
642
|
-
Returns
|
643
|
-
-------
|
644
|
-
List[Tuple[str, str]]
|
645
|
-
List of `(key, url)` pairs corresponding to the files uploaded.
|
646
|
-
"""
|
647
|
-
...
|
357
|
+
def S3(*args, **kwargs):
|
648
358
|
...
|
649
359
|
|
650
360
|
class IncludeFile(metaflow.parameters.Parameter, metaclass=type):
|
@@ -790,53 +500,21 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
|
|
790
500
|
...
|
791
501
|
|
792
502
|
@typing.overload
|
793
|
-
def
|
503
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
794
504
|
"""
|
795
|
-
|
796
|
-
|
797
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
798
|
-
|
799
|
-
Parameters
|
800
|
-
----------
|
801
|
-
type : str, default 'default'
|
802
|
-
Card type.
|
803
|
-
id : str, optional, default None
|
804
|
-
If multiple cards are present, use this id to identify this card.
|
805
|
-
options : Dict[str, Any], default {}
|
806
|
-
Options passed to the card. The contents depend on the card type.
|
807
|
-
timeout : int, default 45
|
808
|
-
Interrupt reporting if it takes more than this many seconds.
|
809
|
-
|
810
|
-
|
505
|
+
Decorator prototype for all step decorators. This function gets specialized
|
506
|
+
and imported for all decorators types by _import_plugin_decorators().
|
811
507
|
"""
|
812
508
|
...
|
813
509
|
|
814
510
|
@typing.overload
|
815
|
-
def
|
816
|
-
...
|
817
|
-
|
818
|
-
@typing.overload
|
819
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
511
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
820
512
|
...
|
821
513
|
|
822
|
-
def
|
514
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
823
515
|
"""
|
824
|
-
|
825
|
-
|
826
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
827
|
-
|
828
|
-
Parameters
|
829
|
-
----------
|
830
|
-
type : str, default 'default'
|
831
|
-
Card type.
|
832
|
-
id : str, optional, default None
|
833
|
-
If multiple cards are present, use this id to identify this card.
|
834
|
-
options : Dict[str, Any], default {}
|
835
|
-
Options passed to the card. The contents depend on the card type.
|
836
|
-
timeout : int, default 45
|
837
|
-
Interrupt reporting if it takes more than this many seconds.
|
838
|
-
|
839
|
-
|
516
|
+
Decorator prototype for all step decorators. This function gets specialized
|
517
|
+
and imported for all decorators types by _import_plugin_decorators().
|
840
518
|
"""
|
841
519
|
...
|
842
520
|
|
@@ -898,59 +576,19 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
898
576
|
...
|
899
577
|
|
900
578
|
@typing.overload
|
901
|
-
def
|
579
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
902
580
|
"""
|
903
|
-
|
904
|
-
|
905
|
-
Information in this decorator will augment any
|
906
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
907
|
-
you can use `@conda_base` to set packages required by all
|
908
|
-
steps and use `@conda` to specify step-specific overrides.
|
909
|
-
|
910
|
-
Parameters
|
911
|
-
----------
|
912
|
-
packages : Dict[str, str], default {}
|
913
|
-
Packages to use for this step. The key is the name of the package
|
914
|
-
and the value is the version to use.
|
915
|
-
libraries : Dict[str, str], default {}
|
916
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
917
|
-
python : str, optional, default None
|
918
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
919
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
920
|
-
disabled : bool, default False
|
921
|
-
If set to True, disables @conda.
|
581
|
+
Internal decorator to support Fast bakery
|
922
582
|
"""
|
923
583
|
...
|
924
584
|
|
925
585
|
@typing.overload
|
926
|
-
def
|
927
|
-
...
|
928
|
-
|
929
|
-
@typing.overload
|
930
|
-
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
586
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
931
587
|
...
|
932
588
|
|
933
|
-
def
|
589
|
+
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
934
590
|
"""
|
935
|
-
|
936
|
-
|
937
|
-
Information in this decorator will augment any
|
938
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
939
|
-
you can use `@conda_base` to set packages required by all
|
940
|
-
steps and use `@conda` to specify step-specific overrides.
|
941
|
-
|
942
|
-
Parameters
|
943
|
-
----------
|
944
|
-
packages : Dict[str, str], default {}
|
945
|
-
Packages to use for this step. The key is the name of the package
|
946
|
-
and the value is the version to use.
|
947
|
-
libraries : Dict[str, str], default {}
|
948
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
949
|
-
python : str, optional, default None
|
950
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
951
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
952
|
-
disabled : bool, default False
|
953
|
-
If set to True, disables @conda.
|
591
|
+
Internal decorator to support Fast bakery
|
954
592
|
"""
|
955
593
|
...
|
956
594
|
|
@@ -1032,35 +670,59 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
1032
670
|
...
|
1033
671
|
|
1034
672
|
@typing.overload
|
1035
|
-
def
|
673
|
+
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]]]:
|
1036
674
|
"""
|
1037
|
-
Specifies
|
1038
|
-
|
675
|
+
Specifies the Conda environment for the step.
|
676
|
+
|
677
|
+
Information in this decorator will augment any
|
678
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
679
|
+
you can use `@conda_base` to set packages required by all
|
680
|
+
steps and use `@conda` to specify step-specific overrides.
|
1039
681
|
|
1040
682
|
Parameters
|
1041
683
|
----------
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
@
|
1052
|
-
|
684
|
+
packages : Dict[str, str], default {}
|
685
|
+
Packages to use for this step. The key is the name of the package
|
686
|
+
and the value is the version to use.
|
687
|
+
libraries : Dict[str, str], default {}
|
688
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
689
|
+
python : str, optional, default None
|
690
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
691
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
692
|
+
disabled : bool, default False
|
693
|
+
If set to True, disables @conda.
|
694
|
+
"""
|
1053
695
|
...
|
1054
696
|
|
1055
|
-
|
697
|
+
@typing.overload
|
698
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
699
|
+
...
|
700
|
+
|
701
|
+
@typing.overload
|
702
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
703
|
+
...
|
704
|
+
|
705
|
+
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):
|
1056
706
|
"""
|
1057
|
-
Specifies
|
1058
|
-
|
707
|
+
Specifies the Conda environment for the step.
|
708
|
+
|
709
|
+
Information in this decorator will augment any
|
710
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
711
|
+
you can use `@conda_base` to set packages required by all
|
712
|
+
steps and use `@conda` to specify step-specific overrides.
|
1059
713
|
|
1060
714
|
Parameters
|
1061
715
|
----------
|
1062
|
-
|
1063
|
-
|
716
|
+
packages : Dict[str, str], default {}
|
717
|
+
Packages to use for this step. The key is the name of the package
|
718
|
+
and the value is the version to use.
|
719
|
+
libraries : Dict[str, str], default {}
|
720
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
721
|
+
python : str, optional, default None
|
722
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
723
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
724
|
+
disabled : bool, default False
|
725
|
+
If set to True, disables @conda.
|
1064
726
|
"""
|
1065
727
|
...
|
1066
728
|
|
@@ -1117,25 +779,6 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
1117
779
|
"""
|
1118
780
|
...
|
1119
781
|
|
1120
|
-
@typing.overload
|
1121
|
-
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1122
|
-
"""
|
1123
|
-
Decorator prototype for all step decorators. This function gets specialized
|
1124
|
-
and imported for all decorators types by _import_plugin_decorators().
|
1125
|
-
"""
|
1126
|
-
...
|
1127
|
-
|
1128
|
-
@typing.overload
|
1129
|
-
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1130
|
-
...
|
1131
|
-
|
1132
|
-
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
1133
|
-
"""
|
1134
|
-
Decorator prototype for all step decorators. This function gets specialized
|
1135
|
-
and imported for all decorators types by _import_plugin_decorators().
|
1136
|
-
"""
|
1137
|
-
...
|
1138
|
-
|
1139
782
|
@typing.overload
|
1140
783
|
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]]]:
|
1141
784
|
"""
|
@@ -1186,51 +829,35 @@ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
1186
829
|
...
|
1187
830
|
|
1188
831
|
@typing.overload
|
1189
|
-
def
|
832
|
+
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]]]:
|
1190
833
|
"""
|
1191
|
-
Specifies
|
1192
|
-
|
1193
|
-
Information in this decorator will augment any
|
1194
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
1195
|
-
you can use `@pypi_base` to set packages required by all
|
1196
|
-
steps and use `@pypi` to specify step-specific overrides.
|
834
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
835
|
+
the execution of a step.
|
1197
836
|
|
1198
837
|
Parameters
|
1199
838
|
----------
|
1200
|
-
|
1201
|
-
|
1202
|
-
and the value is the version to use.
|
1203
|
-
python : str, optional, default: None
|
1204
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1205
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
839
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
840
|
+
List of secret specs, defining how the secrets are to be retrieved
|
1206
841
|
"""
|
1207
842
|
...
|
1208
843
|
|
1209
844
|
@typing.overload
|
1210
|
-
def
|
845
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1211
846
|
...
|
1212
847
|
|
1213
848
|
@typing.overload
|
1214
|
-
def
|
849
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1215
850
|
...
|
1216
851
|
|
1217
|
-
def
|
852
|
+
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]]] = []):
|
1218
853
|
"""
|
1219
|
-
Specifies
|
1220
|
-
|
1221
|
-
Information in this decorator will augment any
|
1222
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
1223
|
-
you can use `@pypi_base` to set packages required by all
|
1224
|
-
steps and use `@pypi` to specify step-specific overrides.
|
854
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
855
|
+
the execution of a step.
|
1225
856
|
|
1226
857
|
Parameters
|
1227
858
|
----------
|
1228
|
-
|
1229
|
-
|
1230
|
-
and the value is the version to use.
|
1231
|
-
python : str, optional, default: None
|
1232
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1233
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
859
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
860
|
+
List of secret specs, defining how the secrets are to be retrieved
|
1234
861
|
"""
|
1235
862
|
...
|
1236
863
|
|
@@ -1266,19 +893,102 @@ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], Non
|
|
1266
893
|
...
|
1267
894
|
|
1268
895
|
@typing.overload
|
1269
|
-
def
|
896
|
+
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]]]:
|
1270
897
|
"""
|
1271
|
-
|
898
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
899
|
+
|
900
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
901
|
+
|
902
|
+
Parameters
|
903
|
+
----------
|
904
|
+
type : str, default 'default'
|
905
|
+
Card type.
|
906
|
+
id : str, optional, default None
|
907
|
+
If multiple cards are present, use this id to identify this card.
|
908
|
+
options : Dict[str, Any], default {}
|
909
|
+
Options passed to the card. The contents depend on the card type.
|
910
|
+
timeout : int, default 45
|
911
|
+
Interrupt reporting if it takes more than this many seconds.
|
912
|
+
|
913
|
+
|
1272
914
|
"""
|
1273
915
|
...
|
1274
916
|
|
1275
917
|
@typing.overload
|
1276
|
-
def
|
918
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1277
919
|
...
|
1278
920
|
|
1279
|
-
|
921
|
+
@typing.overload
|
922
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
923
|
+
...
|
924
|
+
|
925
|
+
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):
|
1280
926
|
"""
|
1281
|
-
|
927
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
928
|
+
|
929
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
930
|
+
|
931
|
+
Parameters
|
932
|
+
----------
|
933
|
+
type : str, default 'default'
|
934
|
+
Card type.
|
935
|
+
id : str, optional, default None
|
936
|
+
If multiple cards are present, use this id to identify this card.
|
937
|
+
options : Dict[str, Any], default {}
|
938
|
+
Options passed to the card. The contents depend on the card type.
|
939
|
+
timeout : int, default 45
|
940
|
+
Interrupt reporting if it takes more than this many seconds.
|
941
|
+
|
942
|
+
|
943
|
+
"""
|
944
|
+
...
|
945
|
+
|
946
|
+
@typing.overload
|
947
|
+
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]]]:
|
948
|
+
"""
|
949
|
+
Specifies the PyPI packages for the step.
|
950
|
+
|
951
|
+
Information in this decorator will augment any
|
952
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
953
|
+
you can use `@pypi_base` to set packages required by all
|
954
|
+
steps and use `@pypi` to specify step-specific overrides.
|
955
|
+
|
956
|
+
Parameters
|
957
|
+
----------
|
958
|
+
packages : Dict[str, str], default: {}
|
959
|
+
Packages to use for this step. The key is the name of the package
|
960
|
+
and the value is the version to use.
|
961
|
+
python : str, optional, default: None
|
962
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
963
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
964
|
+
"""
|
965
|
+
...
|
966
|
+
|
967
|
+
@typing.overload
|
968
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
969
|
+
...
|
970
|
+
|
971
|
+
@typing.overload
|
972
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
973
|
+
...
|
974
|
+
|
975
|
+
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):
|
976
|
+
"""
|
977
|
+
Specifies the PyPI packages for the step.
|
978
|
+
|
979
|
+
Information in this decorator will augment any
|
980
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
981
|
+
you can use `@pypi_base` to set packages required by all
|
982
|
+
steps and use `@pypi` to specify step-specific overrides.
|
983
|
+
|
984
|
+
Parameters
|
985
|
+
----------
|
986
|
+
packages : Dict[str, str], default: {}
|
987
|
+
Packages to use for this step. The key is the name of the package
|
988
|
+
and the value is the version to use.
|
989
|
+
python : str, optional, default: None
|
990
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
991
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1282
992
|
"""
|
1283
993
|
...
|
1284
994
|
|
@@ -1331,34 +1041,119 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
|
|
1331
1041
|
"""
|
1332
1042
|
...
|
1333
1043
|
|
1334
|
-
|
1044
|
+
@typing.overload
|
1045
|
+
def trigger_on_finish(*, flow: typing.Union[str, typing.Dict[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]]:
|
1335
1046
|
"""
|
1336
|
-
Specifies
|
1047
|
+
Specifies the flow(s) that this flow depends on.
|
1337
1048
|
|
1338
|
-
|
1339
|
-
|
1049
|
+
```
|
1050
|
+
@trigger_on_finish(flow='FooFlow')
|
1051
|
+
```
|
1052
|
+
or
|
1053
|
+
```
|
1054
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1055
|
+
```
|
1056
|
+
This decorator respects the @project decorator and triggers the flow
|
1057
|
+
when upstream runs within the same namespace complete successfully
|
1058
|
+
|
1059
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1060
|
+
by specifying the fully qualified project_flow_name.
|
1061
|
+
```
|
1062
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1063
|
+
```
|
1064
|
+
or
|
1065
|
+
```
|
1066
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1067
|
+
```
|
1068
|
+
|
1069
|
+
You can also specify just the project or project branch (other values will be
|
1070
|
+
inferred from the current project or project branch):
|
1071
|
+
```
|
1072
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1073
|
+
```
|
1074
|
+
|
1075
|
+
Note that `branch` is typically one of:
|
1076
|
+
- `prod`
|
1077
|
+
- `user.bob`
|
1078
|
+
- `test.my_experiment`
|
1079
|
+
- `prod.staging`
|
1340
1080
|
|
1341
1081
|
Parameters
|
1342
1082
|
----------
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1083
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1084
|
+
Upstream flow dependency for this flow.
|
1085
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1086
|
+
Upstream flow dependencies for this flow.
|
1087
|
+
options : Dict[str, Any], default {}
|
1088
|
+
Backend-specific configuration for tuning eventing behavior.
|
1347
1089
|
|
1348
1090
|
|
1349
1091
|
"""
|
1350
1092
|
...
|
1351
1093
|
|
1352
|
-
|
1094
|
+
@typing.overload
|
1095
|
+
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1096
|
+
...
|
1097
|
+
|
1098
|
+
def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[str, typing.Dict[str, str], None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
|
1353
1099
|
"""
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
)
|
1100
|
+
Specifies the flow(s) that this flow depends on.
|
1101
|
+
|
1102
|
+
```
|
1103
|
+
@trigger_on_finish(flow='FooFlow')
|
1104
|
+
```
|
1105
|
+
or
|
1106
|
+
```
|
1107
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1108
|
+
```
|
1109
|
+
This decorator respects the @project decorator and triggers the flow
|
1110
|
+
when upstream runs within the same namespace complete successfully
|
1111
|
+
|
1112
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1113
|
+
by specifying the fully qualified project_flow_name.
|
1114
|
+
```
|
1115
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1116
|
+
```
|
1117
|
+
or
|
1118
|
+
```
|
1119
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1120
|
+
```
|
1121
|
+
|
1122
|
+
You can also specify just the project or project branch (other values will be
|
1123
|
+
inferred from the current project or project branch):
|
1124
|
+
```
|
1125
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1126
|
+
```
|
1127
|
+
|
1128
|
+
Note that `branch` is typically one of:
|
1129
|
+
- `prod`
|
1130
|
+
- `user.bob`
|
1131
|
+
- `test.my_experiment`
|
1132
|
+
- `prod.staging`
|
1133
|
+
|
1134
|
+
Parameters
|
1135
|
+
----------
|
1136
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1137
|
+
Upstream flow dependency for this flow.
|
1138
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1139
|
+
Upstream flow dependencies for this flow.
|
1140
|
+
options : Dict[str, Any], default {}
|
1141
|
+
Backend-specific configuration for tuning eventing behavior.
|
1142
|
+
|
1143
|
+
|
1144
|
+
"""
|
1145
|
+
...
|
1146
|
+
|
1147
|
+
def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1148
|
+
"""
|
1149
|
+
This decorator is used to run NIM containers in Metaflow tasks as sidecars.
|
1150
|
+
|
1151
|
+
User code call
|
1152
|
+
-----------
|
1153
|
+
@nim(
|
1154
|
+
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
1155
|
+
backend='managed'
|
1156
|
+
)
|
1362
1157
|
|
1363
1158
|
Valid backend options
|
1364
1159
|
---------------------
|
@@ -1419,97 +1214,6 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
|
|
1419
1214
|
"""
|
1420
1215
|
...
|
1421
1216
|
|
1422
|
-
@typing.overload
|
1423
|
-
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]]:
|
1424
|
-
"""
|
1425
|
-
Specifies the times when the flow should be run when running on a
|
1426
|
-
production scheduler.
|
1427
|
-
|
1428
|
-
Parameters
|
1429
|
-
----------
|
1430
|
-
hourly : bool, default False
|
1431
|
-
Run the workflow hourly.
|
1432
|
-
daily : bool, default True
|
1433
|
-
Run the workflow daily.
|
1434
|
-
weekly : bool, default False
|
1435
|
-
Run the workflow weekly.
|
1436
|
-
cron : str, optional, default None
|
1437
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1438
|
-
specified by this expression.
|
1439
|
-
timezone : str, optional, default None
|
1440
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1441
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1442
|
-
"""
|
1443
|
-
...
|
1444
|
-
|
1445
|
-
@typing.overload
|
1446
|
-
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1447
|
-
...
|
1448
|
-
|
1449
|
-
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):
|
1450
|
-
"""
|
1451
|
-
Specifies the times when the flow should be run when running on a
|
1452
|
-
production scheduler.
|
1453
|
-
|
1454
|
-
Parameters
|
1455
|
-
----------
|
1456
|
-
hourly : bool, default False
|
1457
|
-
Run the workflow hourly.
|
1458
|
-
daily : bool, default True
|
1459
|
-
Run the workflow daily.
|
1460
|
-
weekly : bool, default False
|
1461
|
-
Run the workflow weekly.
|
1462
|
-
cron : str, optional, default None
|
1463
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1464
|
-
specified by this expression.
|
1465
|
-
timezone : str, optional, default None
|
1466
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1467
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1468
|
-
"""
|
1469
|
-
...
|
1470
|
-
|
1471
|
-
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]]:
|
1472
|
-
"""
|
1473
|
-
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)
|
1474
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1475
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1476
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1477
|
-
starts only after all sensors finish.
|
1478
|
-
|
1479
|
-
Parameters
|
1480
|
-
----------
|
1481
|
-
timeout : int
|
1482
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1483
|
-
poke_interval : int
|
1484
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1485
|
-
mode : str
|
1486
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1487
|
-
exponential_backoff : bool
|
1488
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1489
|
-
pool : str
|
1490
|
-
the slot pool this task should run in,
|
1491
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1492
|
-
soft_fail : bool
|
1493
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1494
|
-
name : str
|
1495
|
-
Name of the sensor on Airflow
|
1496
|
-
description : str
|
1497
|
-
Description of sensor in the Airflow UI
|
1498
|
-
bucket_key : Union[str, List[str]]
|
1499
|
-
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1500
|
-
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1501
|
-
bucket_name : str
|
1502
|
-
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1503
|
-
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1504
|
-
wildcard_match : bool
|
1505
|
-
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1506
|
-
aws_conn_id : str
|
1507
|
-
a reference to the s3 connection on Airflow. (Default: None)
|
1508
|
-
verify : bool
|
1509
|
-
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1510
|
-
"""
|
1511
|
-
...
|
1512
|
-
|
1513
1217
|
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]]:
|
1514
1218
|
"""
|
1515
1219
|
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.
|
@@ -1552,104 +1256,19 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
|
|
1552
1256
|
"""
|
1553
1257
|
...
|
1554
1258
|
|
1555
|
-
|
1556
|
-
def trigger_on_finish(*, flow: typing.Union[str, typing.Dict[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]]:
|
1557
|
-
"""
|
1558
|
-
Specifies the flow(s) that this flow depends on.
|
1559
|
-
|
1560
|
-
```
|
1561
|
-
@trigger_on_finish(flow='FooFlow')
|
1562
|
-
```
|
1563
|
-
or
|
1564
|
-
```
|
1565
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1566
|
-
```
|
1567
|
-
This decorator respects the @project decorator and triggers the flow
|
1568
|
-
when upstream runs within the same namespace complete successfully
|
1569
|
-
|
1570
|
-
Additionally, you can specify project aware upstream flow dependencies
|
1571
|
-
by specifying the fully qualified project_flow_name.
|
1572
|
-
```
|
1573
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1574
|
-
```
|
1575
|
-
or
|
1576
|
-
```
|
1577
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1578
|
-
```
|
1579
|
-
|
1580
|
-
You can also specify just the project or project branch (other values will be
|
1581
|
-
inferred from the current project or project branch):
|
1582
|
-
```
|
1583
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1584
|
-
```
|
1585
|
-
|
1586
|
-
Note that `branch` is typically one of:
|
1587
|
-
- `prod`
|
1588
|
-
- `user.bob`
|
1589
|
-
- `test.my_experiment`
|
1590
|
-
- `prod.staging`
|
1591
|
-
|
1592
|
-
Parameters
|
1593
|
-
----------
|
1594
|
-
flow : Union[str, Dict[str, str]], optional, default None
|
1595
|
-
Upstream flow dependency for this flow.
|
1596
|
-
flows : List[Union[str, Dict[str, str]]], default []
|
1597
|
-
Upstream flow dependencies for this flow.
|
1598
|
-
options : Dict[str, Any], default {}
|
1599
|
-
Backend-specific configuration for tuning eventing behavior.
|
1600
|
-
|
1601
|
-
|
1602
|
-
"""
|
1603
|
-
...
|
1604
|
-
|
1605
|
-
@typing.overload
|
1606
|
-
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1607
|
-
...
|
1608
|
-
|
1609
|
-
def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[str, typing.Dict[str, str], None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
|
1259
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1610
1260
|
"""
|
1611
|
-
Specifies
|
1612
|
-
|
1613
|
-
```
|
1614
|
-
@trigger_on_finish(flow='FooFlow')
|
1615
|
-
```
|
1616
|
-
or
|
1617
|
-
```
|
1618
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1619
|
-
```
|
1620
|
-
This decorator respects the @project decorator and triggers the flow
|
1621
|
-
when upstream runs within the same namespace complete successfully
|
1622
|
-
|
1623
|
-
Additionally, you can specify project aware upstream flow dependencies
|
1624
|
-
by specifying the fully qualified project_flow_name.
|
1625
|
-
```
|
1626
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1627
|
-
```
|
1628
|
-
or
|
1629
|
-
```
|
1630
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1631
|
-
```
|
1632
|
-
|
1633
|
-
You can also specify just the project or project branch (other values will be
|
1634
|
-
inferred from the current project or project branch):
|
1635
|
-
```
|
1636
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1637
|
-
```
|
1261
|
+
Specifies what flows belong to the same project.
|
1638
1262
|
|
1639
|
-
|
1640
|
-
|
1641
|
-
- `user.bob`
|
1642
|
-
- `test.my_experiment`
|
1643
|
-
- `prod.staging`
|
1263
|
+
A project-specific namespace is created for all flows that
|
1264
|
+
use the same `@project(name)`.
|
1644
1265
|
|
1645
1266
|
Parameters
|
1646
1267
|
----------
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
options : Dict[str, Any], default {}
|
1652
|
-
Backend-specific configuration for tuning eventing behavior.
|
1268
|
+
name : str
|
1269
|
+
Project name. Make sure that the name is unique amongst all
|
1270
|
+
projects that use the same production scheduler. The name may
|
1271
|
+
contain only lowercase alphanumeric characters and underscores.
|
1653
1272
|
|
1654
1273
|
|
1655
1274
|
"""
|
@@ -1750,6 +1369,97 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1750
1369
|
"""
|
1751
1370
|
...
|
1752
1371
|
|
1372
|
+
@typing.overload
|
1373
|
+
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]]:
|
1374
|
+
"""
|
1375
|
+
Specifies the times when the flow should be run when running on a
|
1376
|
+
production scheduler.
|
1377
|
+
|
1378
|
+
Parameters
|
1379
|
+
----------
|
1380
|
+
hourly : bool, default False
|
1381
|
+
Run the workflow hourly.
|
1382
|
+
daily : bool, default True
|
1383
|
+
Run the workflow daily.
|
1384
|
+
weekly : bool, default False
|
1385
|
+
Run the workflow weekly.
|
1386
|
+
cron : str, optional, default None
|
1387
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1388
|
+
specified by this expression.
|
1389
|
+
timezone : str, optional, default None
|
1390
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1391
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1392
|
+
"""
|
1393
|
+
...
|
1394
|
+
|
1395
|
+
@typing.overload
|
1396
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1397
|
+
...
|
1398
|
+
|
1399
|
+
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):
|
1400
|
+
"""
|
1401
|
+
Specifies the times when the flow should be run when running on a
|
1402
|
+
production scheduler.
|
1403
|
+
|
1404
|
+
Parameters
|
1405
|
+
----------
|
1406
|
+
hourly : bool, default False
|
1407
|
+
Run the workflow hourly.
|
1408
|
+
daily : bool, default True
|
1409
|
+
Run the workflow daily.
|
1410
|
+
weekly : bool, default False
|
1411
|
+
Run the workflow weekly.
|
1412
|
+
cron : str, optional, default None
|
1413
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1414
|
+
specified by this expression.
|
1415
|
+
timezone : str, optional, default None
|
1416
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1417
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1418
|
+
"""
|
1419
|
+
...
|
1420
|
+
|
1421
|
+
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]]:
|
1422
|
+
"""
|
1423
|
+
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)
|
1424
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1425
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1426
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1427
|
+
starts only after all sensors finish.
|
1428
|
+
|
1429
|
+
Parameters
|
1430
|
+
----------
|
1431
|
+
timeout : int
|
1432
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1433
|
+
poke_interval : int
|
1434
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1435
|
+
mode : str
|
1436
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1437
|
+
exponential_backoff : bool
|
1438
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1439
|
+
pool : str
|
1440
|
+
the slot pool this task should run in,
|
1441
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1442
|
+
soft_fail : bool
|
1443
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1444
|
+
name : str
|
1445
|
+
Name of the sensor on Airflow
|
1446
|
+
description : str
|
1447
|
+
Description of sensor in the Airflow UI
|
1448
|
+
bucket_key : Union[str, List[str]]
|
1449
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1450
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1451
|
+
bucket_name : str
|
1452
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1453
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1454
|
+
wildcard_match : bool
|
1455
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1456
|
+
aws_conn_id : str
|
1457
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
1458
|
+
verify : bool
|
1459
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1460
|
+
"""
|
1461
|
+
...
|
1462
|
+
|
1753
1463
|
def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
|
1754
1464
|
"""
|
1755
1465
|
Switch namespace to the one provided.
|