metaflow-stubs 2.12.22__py2.py3-none-any.whl → 2.12.24__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.
Files changed (152) hide show
  1. metaflow-stubs/__init__.pyi +805 -414
  2. metaflow-stubs/cards.pyi +211 -5
  3. metaflow-stubs/cli.pyi +23 -3
  4. metaflow-stubs/client/__init__.pyi +128 -3
  5. metaflow-stubs/client/core.pyi +226 -6
  6. metaflow-stubs/client/filecache.pyi +3 -3
  7. metaflow-stubs/clone_util.pyi +5 -2
  8. metaflow-stubs/events.pyi +21 -3
  9. metaflow-stubs/exception.pyi +2 -2
  10. metaflow-stubs/flowspec.pyi +71 -5
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +158 -5
  13. metaflow-stubs/info_file.pyi +2 -2
  14. metaflow-stubs/metadata/metadata.pyi +9 -3
  15. metaflow-stubs/metadata/util.pyi +2 -2
  16. metaflow-stubs/metaflow_config.pyi +2 -2
  17. metaflow-stubs/metaflow_current.pyi +26 -23
  18. metaflow-stubs/mflog/mflog.pyi +2 -2
  19. metaflow-stubs/multicore_utils.pyi +2 -2
  20. metaflow-stubs/parameters.pyi +70 -4
  21. metaflow-stubs/plugins/__init__.pyi +14 -3
  22. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  23. metaflow-stubs/plugins/airflow/airflow.pyi +15 -3
  24. metaflow-stubs/plugins/airflow/airflow_cli.pyi +66 -3
  25. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +5 -2
  26. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  27. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  28. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +80 -2
  29. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +6 -3
  30. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +46 -4
  31. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +46 -4
  32. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  33. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  34. metaflow-stubs/plugins/argo/argo_events.pyi +16 -2
  35. metaflow-stubs/plugins/argo/argo_workflows.pyi +9 -5
  36. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +98 -7
  37. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +34 -6
  38. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +49 -4
  39. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  40. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  41. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  42. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  43. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  44. metaflow-stubs/plugins/aws/batch/batch_cli.pyi +2 -2
  45. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  46. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +103 -3
  47. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  48. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +16 -4
  49. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  50. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
  51. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  52. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
  53. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +21 -2
  54. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  55. metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +70 -4
  56. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  57. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +5 -2
  58. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +49 -4
  59. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  60. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  61. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  62. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +22 -4
  63. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  64. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  65. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  66. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  67. metaflow-stubs/plugins/cards/card_cli.pyi +61 -3
  68. metaflow-stubs/plugins/cards/card_client.pyi +34 -3
  69. metaflow-stubs/plugins/cards/card_creator.pyi +5 -2
  70. metaflow-stubs/plugins/cards/card_datastore.pyi +8 -2
  71. metaflow-stubs/plugins/cards/card_decorator.pyi +52 -2
  72. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +28 -2
  73. metaflow-stubs/plugins/cards/card_modules/basic.pyi +42 -3
  74. metaflow-stubs/plugins/cards/card_modules/card.pyi +28 -2
  75. metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +2 -2
  76. metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +2 -2
  77. metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +2 -2
  78. metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +2 -2
  79. metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +2 -2
  80. metaflow-stubs/plugins/cards/card_modules/components.pyi +183 -3
  81. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +5 -2
  82. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  83. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +35 -2
  84. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  85. metaflow-stubs/plugins/cards/component_serializer.pyi +57 -4
  86. metaflow-stubs/plugins/cards/exception.pyi +8 -2
  87. metaflow-stubs/plugins/catch_decorator.pyi +20 -3
  88. metaflow-stubs/plugins/datatools/__init__.pyi +63 -3
  89. metaflow-stubs/plugins/datatools/local.pyi +16 -2
  90. metaflow-stubs/plugins/datatools/s3/__init__.pyi +73 -4
  91. metaflow-stubs/plugins/datatools/s3/s3.pyi +82 -5
  92. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  93. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  94. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  95. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  96. metaflow-stubs/plugins/environment_decorator.pyi +10 -2
  97. metaflow-stubs/plugins/events_decorator.pyi +106 -2
  98. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  99. metaflow-stubs/plugins/frameworks/pytorch.pyi +24 -3
  100. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  101. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +16 -4
  102. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  103. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  104. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  105. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  106. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  107. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  108. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +3 -3
  109. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +66 -3
  110. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  111. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +100 -3
  112. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
  113. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +5 -2
  114. metaflow-stubs/plugins/logs_cli.pyi +3 -3
  115. metaflow-stubs/plugins/package_cli.pyi +2 -2
  116. metaflow-stubs/plugins/parallel_decorator.pyi +29 -2
  117. metaflow-stubs/plugins/project_decorator.pyi +59 -2
  118. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  119. metaflow-stubs/plugins/pypi/conda_decorator.pyi +45 -2
  120. metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
  121. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +33 -2
  122. metaflow-stubs/plugins/pypi/pypi_environment.pyi +3 -3
  123. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  124. metaflow-stubs/plugins/resources_decorator.pyi +33 -2
  125. metaflow-stubs/plugins/retry_decorator.pyi +21 -2
  126. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  127. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
  128. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +11 -2
  129. metaflow-stubs/plugins/storage_executor.pyi +6 -2
  130. metaflow-stubs/plugins/tag_cli.pyi +36 -5
  131. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +10 -3
  132. metaflow-stubs/plugins/timeout_decorator.pyi +24 -3
  133. metaflow-stubs/procpoll.pyi +2 -2
  134. metaflow-stubs/pylint_wrapper.pyi +2 -2
  135. metaflow-stubs/runner/__init__.pyi +2 -2
  136. metaflow-stubs/runner/deployer.pyi +70 -131
  137. metaflow-stubs/runner/metaflow_runner.pyi +118 -10
  138. metaflow-stubs/runner/nbdeploy.pyi +66 -2
  139. metaflow-stubs/runner/nbrun.pyi +79 -2
  140. metaflow-stubs/runner/subprocess_manager.pyi +16 -4
  141. metaflow-stubs/runner/utils.pyi +32 -2
  142. metaflow-stubs/system/__init__.pyi +3 -3
  143. metaflow-stubs/system/system_logger.pyi +3 -3
  144. metaflow-stubs/system/system_monitor.pyi +3 -3
  145. metaflow-stubs/tagging_util.pyi +2 -2
  146. metaflow-stubs/tuple_util.pyi +2 -2
  147. metaflow-stubs/version.pyi +2 -2
  148. {metaflow_stubs-2.12.22.dist-info → metaflow_stubs-2.12.24.dist-info}/METADATA +2 -2
  149. metaflow_stubs-2.12.24.dist-info/RECORD +152 -0
  150. metaflow_stubs-2.12.22.dist-info/RECORD +0 -152
  151. {metaflow_stubs-2.12.22.dist-info → metaflow_stubs-2.12.24.dist-info}/WHEEL +0 -0
  152. {metaflow_stubs-2.12.22.dist-info → metaflow_stubs-2.12.24.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.674603 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.048296 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -9,9 +9,9 @@ from __future__ import annotations
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
11
  import metaflow.metaflow_environment
12
- import metaflow.exception
13
- import abc
14
12
  import io
13
+ import abc
14
+ import metaflow.exception
15
15
 
16
16
  class MetaflowException(Exception, metaclass=type):
17
17
  def __init__(self, msg = "", lineno = None):
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.672564 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.046210 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -11,6 +11,23 @@ if typing.TYPE_CHECKING:
11
11
  import metaflow.decorators
12
12
 
13
13
  class PyPIStepDecorator(metaflow.decorators.StepDecorator, metaclass=type):
14
+ """
15
+ Specifies the PyPI packages for the step.
16
+
17
+ Information in this decorator will augment any
18
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
19
+ you can use `@pypi_base` to set packages required by all
20
+ steps and use `@pypi` to specify step-specific overrides.
21
+
22
+ Parameters
23
+ ----------
24
+ packages : Dict[str, str], default: {}
25
+ Packages to use for this step. The key is the name of the package
26
+ and the value is the version to use.
27
+ python : str, optional, default: None
28
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
29
+ that the version used will correspond to the version of the Python interpreter used to start the run.
30
+ """
14
31
  def __init__(self, attributes = None, statically_defined = False):
15
32
  ...
16
33
  def step_init(self, flow, graph, step, decos, environment, flow_datastore, logger):
@@ -20,6 +37,20 @@ class PyPIStepDecorator(metaflow.decorators.StepDecorator, metaclass=type):
20
37
  ...
21
38
 
22
39
  class PyPIFlowDecorator(metaflow.decorators.FlowDecorator, metaclass=type):
40
+ """
41
+ Specifies the PyPI packages for all steps of the flow.
42
+
43
+ Use `@pypi_base` to set common packages required by all
44
+ steps and use `@pypi` to specify step-specific overrides.
45
+ Parameters
46
+ ----------
47
+ packages : Dict[str, str], default: {}
48
+ Packages to use for this flow. The key is the name of the package
49
+ and the value is the version to use.
50
+ python : str, optional, default: None
51
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
52
+ that the version used will correspond to the version of the Python interpreter used to start the run.
53
+ """
23
54
  def __init__(self, attributes = None, statically_defined = False):
24
55
  ...
25
56
  def flow_init(self, flow, graph, environment, flow_datastore, metadata, logger, echo, options):
@@ -1,15 +1,15 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.675093 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.048870 #
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.metaflow_environment
12
11
  import metaflow.plugins.pypi.conda_environment
12
+ import metaflow.metaflow_environment
13
13
 
14
14
  class CondaEnvironment(metaflow.metaflow_environment.MetaflowEnvironment, metaclass=type):
15
15
  def __init__(self, flow):
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.673635 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.047323 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.630318 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:46.995864 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -11,5 +11,36 @@ if typing.TYPE_CHECKING:
11
11
  import metaflow.decorators
12
12
 
13
13
  class ResourcesDecorator(metaflow.decorators.StepDecorator, metaclass=type):
14
+ """
15
+ Specifies the resources needed when executing this step.
16
+
17
+ Use `@resources` to specify the resource requirements
18
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
19
+
20
+ You can choose the compute layer on the command line by executing e.g.
21
+ ```
22
+ python myflow.py run --with batch
23
+ ```
24
+ or
25
+ ```
26
+ python myflow.py run --with kubernetes
27
+ ```
28
+ which executes the flow on the desired system using the
29
+ requirements specified in `@resources`.
30
+
31
+ Parameters
32
+ ----------
33
+ cpu : int, default 1
34
+ Number of CPUs required for this step.
35
+ gpu : int, default 0
36
+ Number of GPUs required for this step.
37
+ disk : int, optional, default None
38
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
39
+ memory : int, default 4096
40
+ Memory size (in MB) required for this step.
41
+ shared_memory : int, optional, default None
42
+ The value for the size (in MiB) of the /dev/shm volume for this step.
43
+ This parameter maps to the `--shm-size` option in Docker.
44
+ """
14
45
  ...
15
46
 
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.631361 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.001136 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -20,6 +20,25 @@ class MetaflowException(Exception, metaclass=type):
20
20
  MAX_ATTEMPTS: int
21
21
 
22
22
  class RetryDecorator(metaflow.decorators.StepDecorator, metaclass=type):
23
+ """
24
+ Specifies the number of times the task corresponding
25
+ to a step needs to be retried.
26
+
27
+ This decorator is useful for handling transient errors, such as networking issues.
28
+ If your task contains operations that can't be retried safely, e.g. database updates,
29
+ it is advisable to annotate it with `@retry(times=0)`.
30
+
31
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
32
+ decorator will execute a no-op task after all retries have been exhausted,
33
+ ensuring that the flow execution can continue.
34
+
35
+ Parameters
36
+ ----------
37
+ times : int, default 3
38
+ Number of times to retry this task.
39
+ minutes_between_retries : int, default 2
40
+ Number of minutes between retries.
41
+ """
23
42
  def step_init(self, flow, graph, step, decos, environment, flow_datastore, logger):
24
43
  ...
25
44
  def step_task_retry_count(self):
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.631726 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.000690 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -1,15 +1,15 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.666608 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.054141 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
- import abc
12
11
  import metaflow.plugins.secrets
12
+ import abc
13
13
 
14
14
  class SecretsProvider(abc.ABC, metaclass=abc.ABCMeta):
15
15
  def get_secret_as_dict(self, secret_id, options = {}, role = None) -> typing.Dict[str, str]:
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.666331 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.053865 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -69,6 +69,15 @@ def get_secrets_backend_provider(secrets_backend_type):
69
69
  ...
70
70
 
71
71
  class SecretsDecorator(metaflow.decorators.StepDecorator, metaclass=type):
72
+ """
73
+ Specifies secrets to be retrieved and injected as environment variables prior to
74
+ the execution of a step.
75
+
76
+ Parameters
77
+ ----------
78
+ sources : List[Union[str, Dict[str, Any]]], default: []
79
+ List of secret specs, defining how the secrets are to be retrieved
80
+ """
72
81
  def task_pre_step(self, step_name, task_datastore, metadata, run_id, task_id, flow, graph, retry_count, max_user_code_retries, ubf_context, inputs):
73
82
  ...
74
83
  ...
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.636554 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.002694 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -15,6 +15,10 @@ class MetaflowException(Exception, metaclass=type):
15
15
  ...
16
16
 
17
17
  class StorageExecutor(object, metaclass=type):
18
+ """
19
+ Thin wrapper around a ProcessPoolExecutor, or a ThreadPoolExecutor where
20
+ the former may be unsafe.
21
+ """
18
22
  def __init__(self, use_processes = False):
19
23
  ...
20
24
  def warm_up(self):
@@ -1,18 +1,18 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.642906 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:47.008997 #
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.events
12
- import metaflow.client.core
13
- import metaflow.exception
14
11
  import metaflow.metaflow_current
12
+ import metaflow.client.core
15
13
  import datetime
14
+ import metaflow.exception
15
+ import metaflow.events
16
16
 
17
17
  def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
18
18
  """
@@ -35,6 +35,17 @@ def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
35
35
  ...
36
36
 
37
37
  class Flow(metaflow.client.core.MetaflowObject, metaclass=type):
38
+ """
39
+ A Flow represents all existing flows with a certain name, in other words,
40
+ classes derived from `FlowSpec`. A container of `Run` objects.
41
+
42
+ Attributes
43
+ ----------
44
+ latest_run : Run
45
+ Latest `Run` (in progress or completed, successfully or not) of this flow.
46
+ latest_successful_run : Run
47
+ Latest successfully completed `Run` of this flow.
48
+ """
38
49
  def __init__(self, *args, **kwargs):
39
50
  ...
40
51
  @property
@@ -121,6 +132,26 @@ class Flow(metaflow.client.core.MetaflowObject, metaclass=type):
121
132
  ...
122
133
 
123
134
  class Run(metaflow.client.core.MetaflowObject, metaclass=type):
135
+ """
136
+ A `Run` represents an execution of a `Flow`. It is a container of `Step`s.
137
+
138
+ Attributes
139
+ ----------
140
+ data : MetaflowData
141
+ a shortcut to run['end'].task.data, i.e. data produced by this run.
142
+ successful : bool
143
+ True if the run completed successfully.
144
+ finished : bool
145
+ True if the run completed.
146
+ finished_at : datetime
147
+ Time this run finished.
148
+ code : MetaflowCode
149
+ Code package for this run (if present). See `MetaflowCode`.
150
+ trigger : MetaflowTrigger
151
+ Information about event(s) that triggered this run (if present). See `MetaflowTrigger`.
152
+ end_task : Task
153
+ `Task` for the end step (if it is present already).
154
+ """
124
155
  def steps(self, *tags: str) -> typing.Iterator[metaflow.client.core.Step]:
125
156
  """
126
157
  [Legacy function - do not use]
@@ -1,15 +1,15 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.630172 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:46.995687 #
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.unbounded_foreach
12
11
  import metaflow.decorators
12
+ import metaflow.unbounded_foreach
13
13
 
14
14
  class MetaflowException(Exception, metaclass=type):
15
15
  def __init__(self, msg = "", lineno = None):
@@ -25,6 +25,9 @@ UBF_TASK: str
25
25
  CONTROL_TASK_TAG: str
26
26
 
27
27
  class MetaDatum(tuple, metaclass=type):
28
+ """
29
+ MetaDatum(field, value, type, tags)
30
+ """
28
31
  @staticmethod
29
32
  def __new__(_cls, field, value, type, tags):
30
33
  """
@@ -44,6 +47,10 @@ class MetaDatum(tuple, metaclass=type):
44
47
  ...
45
48
 
46
49
  class InternalTestUnboundedForeachInput(metaflow.unbounded_foreach.UnboundedForeachInput, metaclass=type):
50
+ """
51
+ Test class that wraps around values (any iterator) and simulates an
52
+ unbounded-foreach instead of a bounded foreach.
53
+ """
47
54
  def __init__(self, iterable):
48
55
  ...
49
56
  def __iter__(self):
@@ -1,15 +1,15 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.632549 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:46.996348 #
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.exception
12
11
  import metaflow.decorators
12
+ import metaflow.exception
13
13
 
14
14
  class MetaflowException(Exception, metaclass=type):
15
15
  def __init__(self, msg = "", lineno = None):
@@ -26,6 +26,27 @@ class TimeoutException(metaflow.exception.MetaflowException, metaclass=type):
26
26
  ...
27
27
 
28
28
  class TimeoutDecorator(metaflow.decorators.StepDecorator, metaclass=type):
29
+ """
30
+ Specifies a timeout for your step.
31
+
32
+ This decorator is useful if this step may hang indefinitely.
33
+
34
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
35
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
36
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
37
+
38
+ Note that all the values specified in parameters are added together so if you specify
39
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
40
+
41
+ Parameters
42
+ ----------
43
+ seconds : int, default 0
44
+ Number of seconds to wait prior to timing out.
45
+ minutes : int, default 0
46
+ Number of minutes to wait prior to timing out.
47
+ hours : int, default 0
48
+ Number of hours to wait prior to timing out.
49
+ """
29
50
  def __init__(self, *args, **kwargs):
30
51
  ...
31
52
  def step_init(self, flow, graph, step, decos, environment, flow_datastore, logger):
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.623089 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:46.988338 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.622590 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:46.987833 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.22 #
4
- # Generated on 2024-09-20T00:45:49.603201 #
3
+ # MF version: 2.12.24 #
4
+ # Generated on 2024-10-04T11:37:46.967807 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations