metaflow-stubs 2.12.21__py2.py3-none-any.whl → 2.12.23__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 +1047 -656
  2. metaflow-stubs/cards.pyi +209 -3
  3. metaflow-stubs/cli.pyi +23 -3
  4. metaflow-stubs/client/__init__.pyi +128 -3
  5. metaflow-stubs/client/core.pyi +225 -5
  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 +70 -4
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +157 -4
  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 +8 -5
  18. metaflow-stubs/mflog/mflog.pyi +2 -2
  19. metaflow-stubs/multicore_utils.pyi +2 -2
  20. metaflow-stubs/parameters.pyi +69 -3
  21. metaflow-stubs/plugins/__init__.pyi +13 -2
  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 +5 -2
  30. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +45 -3
  31. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +45 -3
  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 +6 -4
  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 +62 -4
  68. metaflow-stubs/plugins/cards/card_client.pyi +33 -2
  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 +53 -3
  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 +36 -3
  84. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  85. metaflow-stubs/plugins/cards/component_serializer.pyi +56 -3
  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 +72 -3
  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 +107 -3
  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 +2 -2
  115. metaflow-stubs/plugins/package_cli.pyi +2 -2
  116. metaflow-stubs/plugins/parallel_decorator.pyi +30 -3
  117. metaflow-stubs/plugins/project_decorator.pyi +60 -3
  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 +35 -4
  131. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +9 -2
  132. metaflow-stubs/plugins/timeout_decorator.pyi +23 -2
  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 +116 -8
  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 +2 -2
  143. metaflow-stubs/system/system_logger.pyi +2 -2
  144. metaflow-stubs/system/system_monitor.pyi +2 -2
  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.21.dist-info → metaflow_stubs-2.12.23.dist-info}/METADATA +2 -2
  149. metaflow_stubs-2.12.23.dist-info/RECORD +152 -0
  150. metaflow_stubs-2.12.21.dist-info/RECORD +0 -152
  151. {metaflow_stubs-2.12.21.dist-info → metaflow_stubs-2.12.23.dist-info}/WHEEL +0 -0
  152. {metaflow_stubs-2.12.21.dist-info → metaflow_stubs-2.12.23.dist-info}/top_level.txt +0 -0
@@ -1,16 +1,16 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.21 #
4
- # Generated on 2024-09-19T17:04:54.942503 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.061757 #
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.plugins.secrets
12
- import metaflow.exception
13
11
  import abc
12
+ import metaflow.exception
13
+ import metaflow.plugins.secrets
14
14
 
15
15
  class MetaflowException(Exception, metaclass=type):
16
16
  def __init__(self, msg = "", lineno = None):
@@ -34,15 +34,27 @@ def get_credentials(scopes, *args, **kwargs):
34
34
  GCP_SECRET_MANAGER_PREFIX: None
35
35
 
36
36
  class MetaflowGcpSecretsManagerBadResponse(metaflow.exception.MetaflowException, metaclass=type):
37
+ """
38
+ Raised when the response from GCP Secrets Manager is not valid in some way
39
+ """
37
40
  ...
38
41
 
39
42
  class MetaflowGcpSecretsManagerDuplicateKey(metaflow.exception.MetaflowException, metaclass=type):
43
+ """
44
+ Raised when the response from GCP Secrets Manager contains duplicate keys
45
+ """
40
46
  ...
41
47
 
42
48
  class MetaflowGcpSecretsManagerJSONParseError(metaflow.exception.MetaflowException, metaclass=type):
49
+ """
50
+ Raised when the SecretString response from GCP Secrets Manager is not valid JSON
51
+ """
43
52
  ...
44
53
 
45
54
  class MetaflowGcpSecretsManagerNotJSONObject(metaflow.exception.MetaflowException, metaclass=type):
55
+ """
56
+ Raised when the SecretString response from GCP Secrets Manager is not valid JSON dictionary
57
+ """
46
58
  ...
47
59
 
48
60
  class GcpSecretManagerSecretsProvider(metaflow.plugins.secrets.SecretsProvider, metaclass=abc.ABCMeta):
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.21 #
4
- # Generated on 2024-09-19T17:04:54.941630 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.060845 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.941412 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.060634 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.941975 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.061224 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.866341 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:39.990780 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.873926 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:39.994613 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.937758 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.027960 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.936378 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.026286 #
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.metaflow_current
12
+ import metaflow.exception
13
13
 
14
14
  current: metaflow.metaflow_current.Current
15
15
 
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.21 #
4
- # Generated on 2024-09-19T17:04:54.939138 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.029412 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -9,8 +9,8 @@ from __future__ import annotations
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
11
  import metaflow.exception
12
- import metaflow.decorators
13
12
  import metaflow._vendor.click.types
13
+ import metaflow.decorators
14
14
 
15
15
  def parse_cli_options(flow_name, run_id, user, my_runs, echo):
16
16
  ...
@@ -86,6 +86,69 @@ def parse_kube_keyvalue_list(items: typing.List[str], requires_both: bool = True
86
86
  ...
87
87
 
88
88
  class KubernetesDecorator(metaflow.decorators.StepDecorator, metaclass=type):
89
+ """
90
+ Specifies that this step should execute on Kubernetes.
91
+
92
+ Parameters
93
+ ----------
94
+ cpu : int, default 1
95
+ Number of CPUs required for this step. If `@resources` is
96
+ also present, the maximum value from all decorators is used.
97
+ memory : int, default 4096
98
+ Memory size (in MB) required for this step. If
99
+ `@resources` is also present, the maximum value from all decorators is
100
+ used.
101
+ disk : int, default 10240
102
+ Disk size (in MB) required for this step. If
103
+ `@resources` is also present, the maximum value from all decorators is
104
+ used.
105
+ image : str, optional, default None
106
+ Docker image to use when launching on Kubernetes. If not specified, and
107
+ METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
108
+ not, a default Docker image mapping to the current version of Python is used.
109
+ image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
110
+ If given, the imagePullPolicy to be applied to the Docker image of the step.
111
+ service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
112
+ Kubernetes service account to use when launching pod in Kubernetes.
113
+ secrets : List[str], optional, default None
114
+ Kubernetes secrets to use when launching pod in Kubernetes. These
115
+ secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
116
+ in Metaflow configuration.
117
+ node_selector: Union[Dict[str,str], str], optional, default None
118
+ Kubernetes node selector(s) to apply to the pod running the task.
119
+ Can be passed in as a comma separated string of values e.g. "kubernetes.io/os=linux,kubernetes.io/arch=amd64"
120
+ or as a dictionary {"kubernetes.io/os": "linux", "kubernetes.io/arch": "amd64"}
121
+ namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
122
+ Kubernetes namespace to use when launching pod in Kubernetes.
123
+ gpu : int, optional, default None
124
+ Number of GPUs required for this step. A value of zero implies that
125
+ the scheduled node should not have GPUs.
126
+ gpu_vendor : str, default KUBERNETES_GPU_VENDOR
127
+ The vendor of the GPUs to be used for this step.
128
+ tolerations : List[str], default []
129
+ The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
130
+ Kubernetes tolerations to use when launching pod in Kubernetes.
131
+ use_tmpfs : bool, default False
132
+ This enables an explicit tmpfs mount for this step.
133
+ tmpfs_tempdir : bool, default True
134
+ sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
135
+ tmpfs_size : int, optional, default: None
136
+ The value for the size (in MiB) of the tmpfs mount for this step.
137
+ This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
138
+ memory allocated for this step.
139
+ tmpfs_path : str, optional, default /metaflow_temp
140
+ Path to tmpfs mount for this step.
141
+ persistent_volume_claims : Dict[str, str], optional, default None
142
+ A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
143
+ volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
144
+ shared_memory: int, optional
145
+ Shared memory size (in MiB) required for this step
146
+ port: int, optional
147
+ Port number to specify in the Kubernetes job object
148
+ compute_pool : str, optional, default None
149
+ Compute pool to be used for for this step.
150
+ If not specified, any accessible compute pool within the perimeter is used.
151
+ """
89
152
  def __init__(self, attributes = None, statically_defined = False):
90
153
  ...
91
154
  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.21 #
4
- # Generated on 2024-09-19T17:04:54.934983 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.024858 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -1,16 +1,16 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.21 #
4
- # Generated on 2024-09-19T17:04:54.937538 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.027734 #
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_current
11
12
  import metaflow.exception
12
13
  import metaflow.decorators
13
- import metaflow.metaflow_current
14
14
 
15
15
  current: metaflow.metaflow_current.Current
16
16
 
@@ -22,6 +22,9 @@ class MetaflowException(Exception, metaclass=type):
22
22
  ...
23
23
 
24
24
  class MetaDatum(tuple, metaclass=type):
25
+ """
26
+ MetaDatum(field, value, type, tags)
27
+ """
25
28
  @staticmethod
26
29
  def __new__(_cls, field, value, type, tags):
27
30
  """
@@ -76,6 +79,37 @@ KUBERNETES_SHARED_MEMORY: None
76
79
  KUBERNETES_TOLERATIONS: str
77
80
 
78
81
  class ResourcesDecorator(metaflow.decorators.StepDecorator, metaclass=type):
82
+ """
83
+ Specifies the resources needed when executing this step.
84
+
85
+ Use `@resources` to specify the resource requirements
86
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
87
+
88
+ You can choose the compute layer on the command line by executing e.g.
89
+ ```
90
+ python myflow.py run --with batch
91
+ ```
92
+ or
93
+ ```
94
+ python myflow.py run --with kubernetes
95
+ ```
96
+ which executes the flow on the desired system using the
97
+ requirements specified in `@resources`.
98
+
99
+ Parameters
100
+ ----------
101
+ cpu : int, default 1
102
+ Number of CPUs required for this step.
103
+ gpu : int, default 0
104
+ Number of GPUs required for this step.
105
+ disk : int, optional, default None
106
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
107
+ memory : int, default 4096
108
+ Memory size (in MB) required for this step.
109
+ shared_memory : int, optional, default None
110
+ The value for the size (in MiB) of the /dev/shm volume for this step.
111
+ This parameter maps to the `--shm-size` option in Docker.
112
+ """
79
113
  ...
80
114
 
81
115
  def get_run_time_limit_for_task(step_decos):
@@ -147,6 +181,69 @@ def parse_kube_keyvalue_list(items: typing.List[str], requires_both: bool = True
147
181
  ...
148
182
 
149
183
  class KubernetesDecorator(metaflow.decorators.StepDecorator, metaclass=type):
184
+ """
185
+ Specifies that this step should execute on Kubernetes.
186
+
187
+ Parameters
188
+ ----------
189
+ cpu : int, default 1
190
+ Number of CPUs required for this step. If `@resources` is
191
+ also present, the maximum value from all decorators is used.
192
+ memory : int, default 4096
193
+ Memory size (in MB) required for this step. If
194
+ `@resources` is also present, the maximum value from all decorators is
195
+ used.
196
+ disk : int, default 10240
197
+ Disk size (in MB) required for this step. If
198
+ `@resources` is also present, the maximum value from all decorators is
199
+ used.
200
+ image : str, optional, default None
201
+ Docker image to use when launching on Kubernetes. If not specified, and
202
+ METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
203
+ not, a default Docker image mapping to the current version of Python is used.
204
+ image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
205
+ If given, the imagePullPolicy to be applied to the Docker image of the step.
206
+ service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
207
+ Kubernetes service account to use when launching pod in Kubernetes.
208
+ secrets : List[str], optional, default None
209
+ Kubernetes secrets to use when launching pod in Kubernetes. These
210
+ secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
211
+ in Metaflow configuration.
212
+ node_selector: Union[Dict[str,str], str], optional, default None
213
+ Kubernetes node selector(s) to apply to the pod running the task.
214
+ Can be passed in as a comma separated string of values e.g. "kubernetes.io/os=linux,kubernetes.io/arch=amd64"
215
+ or as a dictionary {"kubernetes.io/os": "linux", "kubernetes.io/arch": "amd64"}
216
+ namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
217
+ Kubernetes namespace to use when launching pod in Kubernetes.
218
+ gpu : int, optional, default None
219
+ Number of GPUs required for this step. A value of zero implies that
220
+ the scheduled node should not have GPUs.
221
+ gpu_vendor : str, default KUBERNETES_GPU_VENDOR
222
+ The vendor of the GPUs to be used for this step.
223
+ tolerations : List[str], default []
224
+ The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
225
+ Kubernetes tolerations to use when launching pod in Kubernetes.
226
+ use_tmpfs : bool, default False
227
+ This enables an explicit tmpfs mount for this step.
228
+ tmpfs_tempdir : bool, default True
229
+ sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
230
+ tmpfs_size : int, optional, default: None
231
+ The value for the size (in MiB) of the tmpfs mount for this step.
232
+ This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
233
+ memory allocated for this step.
234
+ tmpfs_path : str, optional, default /metaflow_temp
235
+ Path to tmpfs mount for this step.
236
+ persistent_volume_claims : Dict[str, str], optional, default None
237
+ A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
238
+ volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
239
+ shared_memory: int, optional
240
+ Shared memory size (in MiB) required for this step
241
+ port: int, optional
242
+ Port number to specify in the Kubernetes job object
243
+ compute_pool : str, optional, default None
244
+ Compute pool to be used for for this step.
245
+ If not specified, any accessible compute pool within the perimeter is used.
246
+ """
150
247
  def __init__(self, attributes = None, statically_defined = False):
151
248
  ...
152
249
  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.21 #
4
- # Generated on 2024-09-19T17:04:54.933853 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.023876 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.932647 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.022691 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -30,6 +30,9 @@ def k8s_retry(deadline_seconds = 60, max_backoff = 32):
30
30
  ...
31
31
 
32
32
  class JobsetStatus(tuple, metaclass=type):
33
+ """
34
+ JobsetStatus(control_pod_failed, control_exit_code, control_pod_status, control_started, control_completed, worker_pods_failed, workers_are_suspended, workers_have_started, all_jobs_are_suspended, jobset_finished, jobset_failed, status_unknown, jobset_was_terminated, some_jobs_are_running)
35
+ """
33
36
  @staticmethod
34
37
  def __new__(_cls, control_pod_failed, control_exit_code, control_pod_status, control_started, control_completed, worker_pods_failed, workers_are_suspended, workers_have_started, all_jobs_are_suspended, jobset_finished, jobset_failed, status_unknown, jobset_was_terminated, some_jobs_are_running):
35
38
  """
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.21 #
4
- # Generated on 2024-09-19T17:04:54.880324 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.005484 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.880526 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:40.005673 #
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.21 #
4
- # Generated on 2024-09-19T17:04:54.870521 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:39.995599 #
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.decorators
12
11
  import metaflow.metaflow_current
12
+ import metaflow.decorators
13
13
 
14
14
  UBF_CONTROL: str
15
15
 
@@ -23,6 +23,9 @@ class MetaflowException(Exception, metaclass=type):
23
23
  ...
24
24
 
25
25
  class MetaDatum(tuple, metaclass=type):
26
+ """
27
+ MetaDatum(field, value, type, tags)
28
+ """
26
29
  @staticmethod
27
30
  def __new__(_cls, field, value, type, tags):
28
31
  """
@@ -44,6 +47,9 @@ class MetaDatum(tuple, metaclass=type):
44
47
  current: metaflow.metaflow_current.Current
45
48
 
46
49
  class Parallel(tuple, metaclass=type):
50
+ """
51
+ Parallel(main_ip, num_nodes, node_index, control_task_id)
52
+ """
47
53
  @staticmethod
48
54
  def __new__(_cls, main_ip, num_nodes, node_index, control_task_id):
49
55
  """
@@ -63,6 +69,27 @@ class Parallel(tuple, metaclass=type):
63
69
  ...
64
70
 
65
71
  class ParallelDecorator(metaflow.decorators.StepDecorator, metaclass=type):
72
+ """
73
+ MF Add To Current
74
+ -----------------
75
+ parallel -> metaflow.metaflow_current.Parallel
76
+
77
+ @@ Returns
78
+ -------
79
+ Parallel
80
+ `namedtuple` with the following fields:
81
+ - main_ip : str
82
+ The IP address of the control task.
83
+ - num_nodes : int
84
+ The total number of tasks created by @parallel
85
+ - node_index : int
86
+ The index of the current task in all the @parallel tasks.
87
+ - control_task_id : Optional[str]
88
+ The task ID of the control task. Available to all tasks.
89
+
90
+ is_parallel -> bool
91
+ True if the current step is a @parallel step.
92
+ """
66
93
  def __init__(self, attributes = None, statically_defined = False):
67
94
  ...
68
95
  def runtime_step_cli(self, cli_args, retry_count, max_user_code_retries, ubf_context):
@@ -1,15 +1,15 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.21 #
4
- # Generated on 2024-09-19T17:04:54.874725 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:39.998007 #
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.decorators
12
11
  import metaflow.metaflow_current
12
+ import metaflow.decorators
13
13
 
14
14
  class MetaflowException(Exception, metaclass=type):
15
15
  def __init__(self, msg = "", lineno = None):
@@ -25,6 +25,63 @@ VALID_NAME_RE: str
25
25
  VALID_NAME_LEN: int
26
26
 
27
27
  class ProjectDecorator(metaflow.decorators.FlowDecorator, metaclass=type):
28
+ """
29
+ Specifies what flows belong to the same project.
30
+
31
+ A project-specific namespace is created for all flows that
32
+ use the same `@project(name)`.
33
+
34
+ Parameters
35
+ ----------
36
+ name : str
37
+ Project name. Make sure that the name is unique amongst all
38
+ projects that use the same production scheduler. The name may
39
+ contain only lowercase alphanumeric characters and underscores.
40
+
41
+ MF Add To Current
42
+ -----------------
43
+ project_name -> str
44
+ The name of the project assigned to this flow, i.e. `X` in `@project(name=X)`.
45
+
46
+ @@ Returns
47
+ -------
48
+ str
49
+ Project name.
50
+
51
+ project_flow_name -> str
52
+ The flow name prefixed with the current project and branch. This name identifies
53
+ the deployment on a production scheduler.
54
+
55
+ @@ Returns
56
+ -------
57
+ str
58
+ Flow name prefixed with project information.
59
+
60
+ branch_name -> str
61
+ The current branch, i.e. `X` in `--branch=X` set during deployment or run.
62
+
63
+ @@ Returns
64
+ -------
65
+ str
66
+ Branch name.
67
+
68
+ is_user_branch -> bool
69
+ True if the flow is deployed without a specific `--branch` or a `--production`
70
+ flag.
71
+
72
+ @@ Returns
73
+ -------
74
+ bool
75
+ True if the deployment does not correspond to a specific branch.
76
+
77
+ is_production -> bool
78
+ True if the flow is deployed with the `--production` flag
79
+
80
+ @@ Returns
81
+ -------
82
+ bool
83
+ True if the flow is deployed with `--production`.
84
+ """
28
85
  def flow_init(self, flow, graph, environment, flow_datastore, metadata, logger, echo, options):
29
86
  ...
30
87
  def get_top_level_options(self):
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.21 #
4
- # Generated on 2024-09-19T17:04:54.873684 #
3
+ # MF version: 2.12.23 #
4
+ # Generated on 2024-10-01T14:32:39.994290 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations