metaflow-stubs 2.12.29__py2.py3-none-any.whl → 2.12.30__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 +185 -185
- metaflow-stubs/cards.pyi +2 -2
- 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 +3 -3
- metaflow-stubs/clone_util.pyi +2 -2
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +5 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +3 -3
- metaflow-stubs/info_file.pyi +2 -2
- metaflow-stubs/metadata_provider/__init__.pyi +2 -2
- metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
- metaflow-stubs/metadata_provider/metadata.pyi +2 -2
- metaflow-stubs/metadata_provider/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -2
- metaflow-stubs/metaflow_current.pyi +27 -27
- metaflow-stubs/mflog/__init__.pyi +2 -2
- metaflow-stubs/mflog/mflog.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +3 -3
- metaflow-stubs/plugins/__init__.pyi +13 -13
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_cli.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
- metaflow-stubs/plugins/airflow/exception.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +4 -4
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +4 -4
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
- metaflow-stubs/plugins/aws/__init__.pyi +3 -3
- metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_cli.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +3 -3
- metaflow-stubs/plugins/azure/__init__.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
- metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/cards/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_cli.pyi +2 -2
- metaflow-stubs/plugins/cards/card_client.pyi +3 -3
- metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
- metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
- metaflow-stubs/plugins/debug_logger.pyi +2 -2
- metaflow-stubs/plugins/debug_monitor.pyi +2 -2
- metaflow-stubs/plugins/environment_decorator.pyi +2 -2
- metaflow-stubs/plugins/events_decorator.pyi +2 -2
- metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
- metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
- metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
- metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +3 -3
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
- metaflow-stubs/plugins/logs_cli.pyi +3 -3
- metaflow-stubs/plugins/package_cli.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
- metaflow-stubs/plugins/project_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/tag_cli.pyi +2 -2
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
- metaflow-stubs/procpoll.pyi +2 -2
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/deployer.pyi +30 -30
- metaflow-stubs/runner/deployer_impl.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +3 -3
- metaflow-stubs/runner/nbdeploy.pyi +2 -2
- metaflow-stubs/runner/nbrun.pyi +2 -2
- metaflow-stubs/runner/subprocess_manager.pyi +2 -2
- metaflow-stubs/runner/utils.pyi +3 -3
- metaflow-stubs/system/__init__.pyi +2 -2
- metaflow-stubs/system/system_logger.pyi +2 -2
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- metaflow-stubs/version.pyi +2 -2
- {metaflow_stubs-2.12.29.dist-info → metaflow_stubs-2.12.30.dist-info}/METADATA +2 -2
- metaflow_stubs-2.12.30.dist-info/RECORD +158 -0
- {metaflow_stubs-2.12.29.dist-info → metaflow_stubs-2.12.30.dist-info}/WHEEL +1 -1
- metaflow_stubs-2.12.29.dist-info/RECORD +0 -158
- {metaflow_stubs-2.12.29.dist-info → metaflow_stubs-2.12.30.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
3
|
+
# MF version: 2.12.30 #
|
4
|
+
# Generated on 2024-11-13T13:50:31.391188 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import datetime
|
12
11
|
import typing
|
12
|
+
import datetime
|
13
13
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
14
14
|
StepFlag = typing.NewType("StepFlag", bool)
|
15
15
|
|
@@ -29,8 +29,8 @@ from .flowspec import FlowSpec as FlowSpec
|
|
29
29
|
from .parameters import Parameter as Parameter
|
30
30
|
from .parameters import JSONTypeClass as JSONTypeClass
|
31
31
|
from .parameters import JSONType as JSONType
|
32
|
-
from . import events as events
|
33
32
|
from . import tuple_util as tuple_util
|
33
|
+
from . import events as events
|
34
34
|
from . import runner as runner
|
35
35
|
from . import plugins as plugins
|
36
36
|
from .plugins.datatools.s3.s3 import S3 as S3
|
@@ -138,135 +138,126 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
138
138
|
...
|
139
139
|
|
140
140
|
@typing.overload
|
141
|
-
def
|
141
|
+
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]]]:
|
142
142
|
"""
|
143
|
-
Specifies the
|
143
|
+
Specifies that the step will success under all circumstances.
|
144
144
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
145
|
+
The decorator will create an optional artifact, specified by `var`, which
|
146
|
+
contains the exception raised. You can use it to detect the presence
|
147
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
148
|
+
are missing.
|
149
149
|
"""
|
150
150
|
...
|
151
151
|
|
152
152
|
@typing.overload
|
153
|
-
def
|
153
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
154
154
|
...
|
155
155
|
|
156
156
|
@typing.overload
|
157
|
-
def
|
157
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
158
158
|
...
|
159
159
|
|
160
|
-
def
|
160
|
+
def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
|
161
161
|
"""
|
162
|
-
Specifies the
|
162
|
+
Specifies that the step will success under all circumstances.
|
163
163
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
"""
|
169
|
-
...
|
170
|
-
|
171
|
-
@typing.overload
|
172
|
-
def environment(*, vars: typing.Dict[str, str] = {}) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
173
|
-
"""
|
174
|
-
Specifies environment variables to be set prior to the execution of a step.
|
164
|
+
The decorator will create an optional artifact, specified by `var`, which
|
165
|
+
contains the exception raised. You can use it to detect the presence
|
166
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
167
|
+
are missing.
|
175
168
|
"""
|
176
169
|
...
|
177
170
|
|
178
171
|
@typing.overload
|
179
|
-
def
|
180
|
-
...
|
181
|
-
|
182
|
-
@typing.overload
|
183
|
-
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
184
|
-
...
|
185
|
-
|
186
|
-
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
172
|
+
def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
187
173
|
"""
|
188
|
-
Specifies
|
174
|
+
Specifies the number of times the task corresponding
|
175
|
+
to a step needs to be retried.
|
176
|
+
|
177
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
178
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
179
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
180
|
+
|
181
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
182
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
183
|
+
ensuring that the flow execution can continue.
|
189
184
|
"""
|
190
185
|
...
|
191
186
|
|
192
187
|
@typing.overload
|
193
|
-
def
|
194
|
-
"""
|
195
|
-
Decorator prototype for all step decorators. This function gets specialized
|
196
|
-
and imported for all decorators types by _import_plugin_decorators().
|
197
|
-
"""
|
188
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
198
189
|
...
|
199
190
|
|
200
191
|
@typing.overload
|
201
|
-
def
|
192
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
202
193
|
...
|
203
194
|
|
204
|
-
def
|
195
|
+
def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
|
205
196
|
"""
|
206
|
-
|
207
|
-
|
197
|
+
Specifies the number of times the task corresponding
|
198
|
+
to a step needs to be retried.
|
199
|
+
|
200
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
201
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
202
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
203
|
+
|
204
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
205
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
206
|
+
ensuring that the flow execution can continue.
|
208
207
|
"""
|
209
208
|
...
|
210
209
|
|
211
210
|
@typing.overload
|
212
|
-
def
|
211
|
+
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]]]:
|
213
212
|
"""
|
214
|
-
|
213
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
215
214
|
|
216
|
-
|
217
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
218
|
-
you can use `@pypi_base` to set packages required by all
|
219
|
-
steps and use `@pypi` to specify step-specific overrides.
|
215
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
220
216
|
"""
|
221
217
|
...
|
222
218
|
|
223
219
|
@typing.overload
|
224
|
-
def
|
220
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
225
221
|
...
|
226
222
|
|
227
223
|
@typing.overload
|
228
|
-
def
|
224
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
229
225
|
...
|
230
226
|
|
231
|
-
def
|
227
|
+
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):
|
232
228
|
"""
|
233
|
-
|
229
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
234
230
|
|
235
|
-
|
236
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
237
|
-
you can use `@pypi_base` to set packages required by all
|
238
|
-
steps and use `@pypi` to specify step-specific overrides.
|
231
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
239
232
|
"""
|
240
233
|
...
|
241
234
|
|
242
235
|
@typing.overload
|
243
|
-
def
|
236
|
+
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]]]:
|
244
237
|
"""
|
245
|
-
Specifies
|
246
|
-
|
247
|
-
The decorator will create an optional artifact, specified by `var`, which
|
248
|
-
contains the exception raised. You can use it to detect the presence
|
249
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
250
|
-
are missing.
|
238
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
239
|
+
the execution of a step.
|
251
240
|
"""
|
252
241
|
...
|
253
242
|
|
254
243
|
@typing.overload
|
255
|
-
def
|
244
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
256
245
|
...
|
257
246
|
|
258
247
|
@typing.overload
|
259
|
-
def
|
248
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
260
249
|
...
|
261
250
|
|
262
|
-
def
|
251
|
+
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]]] = []):
|
263
252
|
"""
|
264
|
-
Specifies
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
253
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
254
|
+
the execution of a step.
|
255
|
+
"""
|
256
|
+
...
|
257
|
+
|
258
|
+
def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = 'KUBERNETES_IMAGE_PULL_POLICY', service_account: str = 'METAFLOW_KUBERNETES_SERVICE_ACCOUNT', secrets: typing.Optional[typing.List[str]] = None, node_selector: typing.Union[typing.Dict[str, str], str, None] = None, namespace: str = 'METAFLOW_KUBERNETES_NAMESPACE', gpu: typing.Optional[int] = None, gpu_vendor: str = 'KUBERNETES_GPU_VENDOR', tolerations: typing.List[str] = [], use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = '/metaflow_temp', persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None, compute_pool: typing.Optional[str] = None, hostname_resolution_timeout: int = 600) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
259
|
+
"""
|
260
|
+
Specifies that this step should execute on Kubernetes.
|
270
261
|
"""
|
271
262
|
...
|
272
263
|
|
@@ -319,6 +310,58 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
319
310
|
"""
|
320
311
|
...
|
321
312
|
|
313
|
+
@typing.overload
|
314
|
+
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]]]:
|
315
|
+
"""
|
316
|
+
Specifies the Conda environment for the step.
|
317
|
+
|
318
|
+
Information in this decorator will augment any
|
319
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
320
|
+
you can use `@conda_base` to set packages required by all
|
321
|
+
steps and use `@conda` to specify step-specific overrides.
|
322
|
+
"""
|
323
|
+
...
|
324
|
+
|
325
|
+
@typing.overload
|
326
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
327
|
+
...
|
328
|
+
|
329
|
+
@typing.overload
|
330
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
331
|
+
...
|
332
|
+
|
333
|
+
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):
|
334
|
+
"""
|
335
|
+
Specifies the Conda environment for the step.
|
336
|
+
|
337
|
+
Information in this decorator will augment any
|
338
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
339
|
+
you can use `@conda_base` to set packages required by all
|
340
|
+
steps and use `@conda` to specify step-specific overrides.
|
341
|
+
"""
|
342
|
+
...
|
343
|
+
|
344
|
+
@typing.overload
|
345
|
+
def environment(*, vars: typing.Dict[str, str] = {}) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
346
|
+
"""
|
347
|
+
Specifies environment variables to be set prior to the execution of a step.
|
348
|
+
"""
|
349
|
+
...
|
350
|
+
|
351
|
+
@typing.overload
|
352
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
353
|
+
...
|
354
|
+
|
355
|
+
@typing.overload
|
356
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
357
|
+
...
|
358
|
+
|
359
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
360
|
+
"""
|
361
|
+
Specifies environment variables to be set prior to the execution of a step.
|
362
|
+
"""
|
363
|
+
...
|
364
|
+
|
322
365
|
@typing.overload
|
323
366
|
def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = 'METAFLOW_BATCH_JOB_QUEUE', iam_role: str = 'METAFLOW_ECS_S3_ACCESS_IAM_ROLE', execution_role: str = 'METAFLOW_ECS_FARGATE_EXECUTION_ROLE', shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[str]] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
324
367
|
"""
|
@@ -341,27 +384,52 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
341
384
|
...
|
342
385
|
|
343
386
|
@typing.overload
|
344
|
-
def
|
387
|
+
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]]]:
|
345
388
|
"""
|
346
|
-
|
389
|
+
Specifies the PyPI packages for the step.
|
347
390
|
|
348
|
-
|
391
|
+
Information in this decorator will augment any
|
392
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
393
|
+
you can use `@pypi_base` to set packages required by all
|
394
|
+
steps and use `@pypi` to specify step-specific overrides.
|
349
395
|
"""
|
350
396
|
...
|
351
397
|
|
352
398
|
@typing.overload
|
353
|
-
def
|
399
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
354
400
|
...
|
355
401
|
|
356
402
|
@typing.overload
|
357
|
-
def
|
403
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
358
404
|
...
|
359
405
|
|
360
|
-
def
|
406
|
+
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):
|
361
407
|
"""
|
362
|
-
|
408
|
+
Specifies the PyPI packages for the step.
|
363
409
|
|
364
|
-
|
410
|
+
Information in this decorator will augment any
|
411
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
412
|
+
you can use `@pypi_base` to set packages required by all
|
413
|
+
steps and use `@pypi` to specify step-specific overrides.
|
414
|
+
"""
|
415
|
+
...
|
416
|
+
|
417
|
+
@typing.overload
|
418
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
419
|
+
"""
|
420
|
+
Decorator prototype for all step decorators. This function gets specialized
|
421
|
+
and imported for all decorators types by _import_plugin_decorators().
|
422
|
+
"""
|
423
|
+
...
|
424
|
+
|
425
|
+
@typing.overload
|
426
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
427
|
+
...
|
428
|
+
|
429
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
430
|
+
"""
|
431
|
+
Decorator prototype for all step decorators. This function gets specialized
|
432
|
+
and imported for all decorators types by _import_plugin_decorators().
|
365
433
|
"""
|
366
434
|
...
|
367
435
|
|
@@ -404,90 +472,55 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
404
472
|
"""
|
405
473
|
...
|
406
474
|
|
407
|
-
|
408
|
-
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]]]:
|
475
|
+
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]]:
|
409
476
|
"""
|
410
|
-
|
411
|
-
the
|
477
|
+
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)
|
478
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
479
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
480
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
481
|
+
starts only after all sensors finish.
|
412
482
|
"""
|
413
483
|
...
|
414
484
|
|
415
485
|
@typing.overload
|
416
|
-
def
|
417
|
-
...
|
418
|
-
|
419
|
-
@typing.overload
|
420
|
-
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
421
|
-
...
|
422
|
-
|
423
|
-
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]]] = []):
|
486
|
+
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]]:
|
424
487
|
"""
|
425
|
-
Specifies
|
426
|
-
|
488
|
+
Specifies the times when the flow should be run when running on a
|
489
|
+
production scheduler.
|
427
490
|
"""
|
428
491
|
...
|
429
492
|
|
430
|
-
|
431
|
-
|
432
|
-
Specifies that this step should execute on Kubernetes.
|
433
|
-
"""
|
493
|
+
@typing.overload
|
494
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
434
495
|
...
|
435
496
|
|
436
|
-
|
437
|
-
def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
497
|
+
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):
|
438
498
|
"""
|
439
|
-
Specifies the
|
440
|
-
|
441
|
-
|
442
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
443
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
444
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
445
|
-
|
446
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
447
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
448
|
-
ensuring that the flow execution can continue.
|
499
|
+
Specifies the times when the flow should be run when running on a
|
500
|
+
production scheduler.
|
449
501
|
"""
|
450
502
|
...
|
451
503
|
|
452
504
|
@typing.overload
|
453
|
-
def
|
454
|
-
...
|
455
|
-
|
456
|
-
@typing.overload
|
457
|
-
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
458
|
-
...
|
459
|
-
|
460
|
-
def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
|
505
|
+
def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
461
506
|
"""
|
462
|
-
Specifies the
|
463
|
-
to a step needs to be retried.
|
464
|
-
|
465
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
466
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
467
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
507
|
+
Specifies the Conda environment for all steps of the flow.
|
468
508
|
|
469
|
-
|
470
|
-
|
471
|
-
ensuring that the flow execution can continue.
|
509
|
+
Use `@conda_base` to set common libraries required by all
|
510
|
+
steps and use `@conda` to specify step-specific additions.
|
472
511
|
"""
|
473
512
|
...
|
474
513
|
|
475
|
-
|
476
|
-
|
477
|
-
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)
|
478
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
479
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
480
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
481
|
-
starts only after all sensors finish.
|
482
|
-
"""
|
514
|
+
@typing.overload
|
515
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
483
516
|
...
|
484
517
|
|
485
|
-
def
|
518
|
+
def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
|
486
519
|
"""
|
487
|
-
Specifies
|
520
|
+
Specifies the Conda environment for all steps of the flow.
|
488
521
|
|
489
|
-
|
490
|
-
use
|
522
|
+
Use `@conda_base` to set common libraries required by all
|
523
|
+
steps and use `@conda` to specify step-specific additions.
|
491
524
|
"""
|
492
525
|
...
|
493
526
|
|
@@ -564,32 +597,6 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
564
597
|
"""
|
565
598
|
...
|
566
599
|
|
567
|
-
@typing.overload
|
568
|
-
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]]:
|
569
|
-
"""
|
570
|
-
Specifies the times when the flow should be run when running on a
|
571
|
-
production scheduler.
|
572
|
-
"""
|
573
|
-
...
|
574
|
-
|
575
|
-
@typing.overload
|
576
|
-
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
577
|
-
...
|
578
|
-
|
579
|
-
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):
|
580
|
-
"""
|
581
|
-
Specifies the times when the flow should be run when running on a
|
582
|
-
production scheduler.
|
583
|
-
"""
|
584
|
-
...
|
585
|
-
|
586
|
-
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]]:
|
587
|
-
"""
|
588
|
-
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.
|
589
|
-
This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
|
590
|
-
"""
|
591
|
-
...
|
592
|
-
|
593
600
|
@typing.overload
|
594
601
|
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
595
602
|
"""
|
@@ -613,6 +620,15 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
|
|
613
620
|
"""
|
614
621
|
...
|
615
622
|
|
623
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
624
|
+
"""
|
625
|
+
Specifies what flows belong to the same project.
|
626
|
+
|
627
|
+
A project-specific namespace is created for all flows that
|
628
|
+
use the same `@project(name)`.
|
629
|
+
"""
|
630
|
+
...
|
631
|
+
|
616
632
|
@typing.overload
|
617
633
|
def trigger_on_finish(*, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
618
634
|
"""
|
@@ -694,26 +710,10 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
|
|
694
710
|
"""
|
695
711
|
...
|
696
712
|
|
697
|
-
|
698
|
-
def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
699
|
-
"""
|
700
|
-
Specifies the Conda environment for all steps of the flow.
|
701
|
-
|
702
|
-
Use `@conda_base` to set common libraries required by all
|
703
|
-
steps and use `@conda` to specify step-specific additions.
|
704
|
-
"""
|
705
|
-
...
|
706
|
-
|
707
|
-
@typing.overload
|
708
|
-
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
709
|
-
...
|
710
|
-
|
711
|
-
def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
|
713
|
+
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]]:
|
712
714
|
"""
|
713
|
-
|
714
|
-
|
715
|
-
Use `@conda_base` to set common libraries required by all
|
716
|
-
steps and use `@conda` to specify step-specific additions.
|
715
|
+
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.
|
716
|
+
This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
|
717
717
|
"""
|
718
718
|
...
|
719
719
|
|
metaflow-stubs/cards.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
3
|
+
# MF version: 2.12.30 #
|
4
|
+
# Generated on 2024-11-13T13:50:31.296403 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/cli.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
3
|
+
# MF version: 2.12.30 #
|
4
|
+
# Generated on 2024-11-13T13:50:31.306719 #
|
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.
|
4
|
-
# Generated on 2024-11-
|
3
|
+
# MF version: 2.12.30 #
|
4
|
+
# Generated on 2024-11-13T13:50:31.296741 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/client/core.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
3
|
+
# MF version: 2.12.30 #
|
4
|
+
# Generated on 2024-11-13T13:50:31.301906 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -9,11 +9,11 @@ from __future__ import annotations
|
|
9
9
|
import metaflow
|
10
10
|
import typing
|
11
11
|
if typing.TYPE_CHECKING:
|
12
|
-
import metaflow.client.core
|
13
12
|
import metaflow.events
|
14
|
-
import datetime
|
15
|
-
import tarfile
|
16
13
|
import typing
|
14
|
+
import tarfile
|
15
|
+
import datetime
|
16
|
+
import metaflow.client.core
|
17
17
|
|
18
18
|
from ..metaflow_current import current as current
|
19
19
|
from ..events import Trigger as Trigger
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-11-
|
3
|
+
# MF version: 2.12.30 #
|
4
|
+
# Generated on 2024-11-13T13:50:31.327966 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -9,8 +9,8 @@ from __future__ import annotations
|
|
9
9
|
import metaflow
|
10
10
|
import typing
|
11
11
|
if typing.TYPE_CHECKING:
|
12
|
-
import metaflow.exception
|
13
12
|
import metaflow.datastore.content_addressed_store
|
13
|
+
import metaflow.exception
|
14
14
|
|
15
15
|
from ..exception import MetaflowException as MetaflowException
|
16
16
|
|