metaflow-stubs 2.14.1__py2.py3-none-any.whl → 2.14.2__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 +439 -439
- metaflow-stubs/cards.pyi +2 -2
- metaflow-stubs/cli.pyi +2 -7
- metaflow-stubs/cli_components/__init__.pyi +2 -2
- metaflow-stubs/cli_components/utils.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +2 -2
- metaflow-stubs/client/core.pyi +6 -6
- metaflow-stubs/client/filecache.pyi +3 -3
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +4 -4
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +2 -2
- 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 +3 -3
- metaflow-stubs/metaflow_current.pyi +27 -27
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +2 -2
- metaflow-stubs/plugins/__init__.pyi +15 -15
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
- metaflow-stubs/plugins/airflow/exception.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
- metaflow-stubs/plugins/aws/__init__.pyi +3 -3
- metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +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/schedule_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +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_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/components.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
- metaflow-stubs/plugins/debug_logger.pyi +2 -2
- metaflow-stubs/plugins/debug_monitor.pyi +2 -2
- metaflow-stubs/plugins/environment_decorator.pyi +2 -2
- metaflow-stubs/plugins/events_decorator.pyi +2 -2
- metaflow-stubs/plugins/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 +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
- metaflow-stubs/plugins/project_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
- 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/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/deployer.pyi +5 -5
- metaflow-stubs/runner/deployer_impl.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +2 -2
- metaflow-stubs/runner/nbdeploy.pyi +2 -2
- metaflow-stubs/runner/nbrun.pyi +2 -2
- metaflow-stubs/runner/subprocess_manager.pyi +2 -2
- metaflow-stubs/runner/utils.pyi +4 -4
- metaflow-stubs/system/__init__.pyi +2 -2
- metaflow-stubs/system/system_logger.pyi +3 -3
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- metaflow-stubs/user_configs/__init__.pyi +2 -2
- metaflow-stubs/user_configs/config_decorators.pyi +5 -5
- metaflow-stubs/user_configs/config_options.pyi +2 -2
- metaflow-stubs/user_configs/config_parameters.pyi +7 -7
- metaflow-stubs/version.pyi +2 -2
- {metaflow_stubs-2.14.1.dist-info → metaflow_stubs-2.14.2.dist-info}/METADATA +2 -2
- metaflow_stubs-2.14.2.dist-info/RECORD +145 -0
- metaflow_stubs-2.14.1.dist-info/RECORD +0 -145
- {metaflow_stubs-2.14.1.dist-info → metaflow_stubs-2.14.2.dist-info}/WHEEL +0 -0
- {metaflow_stubs-2.14.1.dist-info → metaflow_stubs-2.14.2.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.14.
|
4
|
-
# Generated on 2025-02-
|
3
|
+
# MF version: 2.14.2 #
|
4
|
+
# Generated on 2025-02-21T20:07:35.058121 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -35,8 +35,8 @@ from .user_configs.config_parameters import ConfigValue as ConfigValue
|
|
35
35
|
from .user_configs.config_parameters import config_expr as config_expr
|
36
36
|
from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
|
37
37
|
from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
|
38
|
-
from . import events as events
|
39
38
|
from . import tuple_util as tuple_util
|
39
|
+
from . import events as events
|
40
40
|
from . import runner as runner
|
41
41
|
from . import plugins as plugins
|
42
42
|
from .plugins.datatools.s3.s3 import S3 as S3
|
@@ -143,196 +143,90 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
143
143
|
...
|
144
144
|
|
145
145
|
@typing.overload
|
146
|
-
def
|
147
|
-
"""
|
148
|
-
Specifies the PyPI packages for the step.
|
149
|
-
|
150
|
-
Information in this decorator will augment any
|
151
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
152
|
-
you can use `@pypi_base` to set packages required by all
|
153
|
-
steps and use `@pypi` to specify step-specific overrides.
|
154
|
-
|
155
|
-
|
156
|
-
Parameters
|
157
|
-
----------
|
158
|
-
packages : Dict[str, str], default: {}
|
159
|
-
Packages to use for this step. The key is the name of the package
|
160
|
-
and the value is the version to use.
|
161
|
-
python : str, optional, default: None
|
162
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
163
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
164
|
-
"""
|
165
|
-
...
|
166
|
-
|
167
|
-
@typing.overload
|
168
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
169
|
-
...
|
170
|
-
|
171
|
-
@typing.overload
|
172
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
173
|
-
...
|
174
|
-
|
175
|
-
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):
|
176
|
-
"""
|
177
|
-
Specifies the PyPI packages for the step.
|
178
|
-
|
179
|
-
Information in this decorator will augment any
|
180
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
181
|
-
you can use `@pypi_base` to set packages required by all
|
182
|
-
steps and use `@pypi` to specify step-specific overrides.
|
183
|
-
|
184
|
-
|
185
|
-
Parameters
|
186
|
-
----------
|
187
|
-
packages : Dict[str, str], default: {}
|
188
|
-
Packages to use for this step. The key is the name of the package
|
189
|
-
and the value is the version to use.
|
190
|
-
python : str, optional, default: None
|
191
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
192
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
193
|
-
"""
|
194
|
-
...
|
195
|
-
|
196
|
-
@typing.overload
|
197
|
-
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]]]:
|
146
|
+
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]]]:
|
198
147
|
"""
|
199
|
-
|
200
|
-
|
201
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
148
|
+
Specifies environment variables to be set prior to the execution of a step.
|
202
149
|
|
203
150
|
|
204
151
|
Parameters
|
205
152
|
----------
|
206
|
-
|
207
|
-
|
208
|
-
id : str, optional, default None
|
209
|
-
If multiple cards are present, use this id to identify this card.
|
210
|
-
options : Dict[str, Any], default {}
|
211
|
-
Options passed to the card. The contents depend on the card type.
|
212
|
-
timeout : int, default 45
|
213
|
-
Interrupt reporting if it takes more than this many seconds.
|
153
|
+
vars : Dict[str, str], default {}
|
154
|
+
Dictionary of environment variables to set.
|
214
155
|
"""
|
215
156
|
...
|
216
157
|
|
217
158
|
@typing.overload
|
218
|
-
def
|
159
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
219
160
|
...
|
220
161
|
|
221
162
|
@typing.overload
|
222
|
-
def
|
163
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
223
164
|
...
|
224
165
|
|
225
|
-
def
|
166
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
226
167
|
"""
|
227
|
-
|
228
|
-
|
229
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
168
|
+
Specifies environment variables to be set prior to the execution of a step.
|
230
169
|
|
231
170
|
|
232
171
|
Parameters
|
233
172
|
----------
|
234
|
-
|
235
|
-
|
236
|
-
id : str, optional, default None
|
237
|
-
If multiple cards are present, use this id to identify this card.
|
238
|
-
options : Dict[str, Any], default {}
|
239
|
-
Options passed to the card. The contents depend on the card type.
|
240
|
-
timeout : int, default 45
|
241
|
-
Interrupt reporting if it takes more than this many seconds.
|
173
|
+
vars : Dict[str, str], default {}
|
174
|
+
Dictionary of environment variables to set.
|
242
175
|
"""
|
243
176
|
...
|
244
177
|
|
245
178
|
@typing.overload
|
246
|
-
def
|
179
|
+
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]]]:
|
247
180
|
"""
|
248
|
-
Specifies
|
249
|
-
|
250
|
-
This decorator is useful if this step may hang indefinitely.
|
181
|
+
Specifies the number of times the task corresponding
|
182
|
+
to a step needs to be retried.
|
251
183
|
|
252
|
-
This
|
253
|
-
|
254
|
-
|
184
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
185
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
186
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
255
187
|
|
256
|
-
|
257
|
-
|
188
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
189
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
190
|
+
ensuring that the flow execution can continue.
|
258
191
|
|
259
192
|
|
260
193
|
Parameters
|
261
194
|
----------
|
262
|
-
|
263
|
-
Number of
|
264
|
-
|
265
|
-
Number of minutes
|
266
|
-
hours : int, default 0
|
267
|
-
Number of hours to wait prior to timing out.
|
195
|
+
times : int, default 3
|
196
|
+
Number of times to retry this task.
|
197
|
+
minutes_between_retries : int, default 2
|
198
|
+
Number of minutes between retries.
|
268
199
|
"""
|
269
200
|
...
|
270
201
|
|
271
202
|
@typing.overload
|
272
|
-
def
|
203
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
273
204
|
...
|
274
205
|
|
275
206
|
@typing.overload
|
276
|
-
def
|
277
|
-
...
|
278
|
-
|
279
|
-
def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
|
280
|
-
"""
|
281
|
-
Specifies a timeout for your step.
|
282
|
-
|
283
|
-
This decorator is useful if this step may hang indefinitely.
|
284
|
-
|
285
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
286
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
287
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
288
|
-
|
289
|
-
Note that all the values specified in parameters are added together so if you specify
|
290
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
291
|
-
|
292
|
-
|
293
|
-
Parameters
|
294
|
-
----------
|
295
|
-
seconds : int, default 0
|
296
|
-
Number of seconds to wait prior to timing out.
|
297
|
-
minutes : int, default 0
|
298
|
-
Number of minutes to wait prior to timing out.
|
299
|
-
hours : int, default 0
|
300
|
-
Number of hours to wait prior to timing out.
|
301
|
-
"""
|
207
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
302
208
|
...
|
303
209
|
|
304
|
-
|
305
|
-
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]]]:
|
210
|
+
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):
|
306
211
|
"""
|
307
|
-
Specifies
|
308
|
-
|
212
|
+
Specifies the number of times the task corresponding
|
213
|
+
to a step needs to be retried.
|
309
214
|
|
215
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
216
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
217
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
310
218
|
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
List of secret specs, defining how the secrets are to be retrieved
|
315
|
-
"""
|
316
|
-
...
|
317
|
-
|
318
|
-
@typing.overload
|
319
|
-
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
320
|
-
...
|
321
|
-
|
322
|
-
@typing.overload
|
323
|
-
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
324
|
-
...
|
325
|
-
|
326
|
-
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]]] = []):
|
327
|
-
"""
|
328
|
-
Specifies secrets to be retrieved and injected as environment variables prior to
|
329
|
-
the execution of a step.
|
219
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
220
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
221
|
+
ensuring that the flow execution can continue.
|
330
222
|
|
331
223
|
|
332
224
|
Parameters
|
333
225
|
----------
|
334
|
-
|
335
|
-
|
226
|
+
times : int, default 3
|
227
|
+
Number of times to retry this task.
|
228
|
+
minutes_between_retries : int, default 2
|
229
|
+
Number of minutes between retries.
|
336
230
|
"""
|
337
231
|
...
|
338
232
|
|
@@ -413,6 +307,76 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
|
|
413
307
|
"""
|
414
308
|
...
|
415
309
|
|
310
|
+
@typing.overload
|
311
|
+
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]]]:
|
312
|
+
"""
|
313
|
+
Specifies the PyPI packages for the step.
|
314
|
+
|
315
|
+
Information in this decorator will augment any
|
316
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
317
|
+
you can use `@pypi_base` to set packages required by all
|
318
|
+
steps and use `@pypi` to specify step-specific overrides.
|
319
|
+
|
320
|
+
|
321
|
+
Parameters
|
322
|
+
----------
|
323
|
+
packages : Dict[str, str], default: {}
|
324
|
+
Packages to use for this step. The key is the name of the package
|
325
|
+
and the value is the version to use.
|
326
|
+
python : str, optional, default: None
|
327
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
328
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
329
|
+
"""
|
330
|
+
...
|
331
|
+
|
332
|
+
@typing.overload
|
333
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
334
|
+
...
|
335
|
+
|
336
|
+
@typing.overload
|
337
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
338
|
+
...
|
339
|
+
|
340
|
+
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):
|
341
|
+
"""
|
342
|
+
Specifies the PyPI packages for the step.
|
343
|
+
|
344
|
+
Information in this decorator will augment any
|
345
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
346
|
+
you can use `@pypi_base` to set packages required by all
|
347
|
+
steps and use `@pypi` to specify step-specific overrides.
|
348
|
+
|
349
|
+
|
350
|
+
Parameters
|
351
|
+
----------
|
352
|
+
packages : Dict[str, str], default: {}
|
353
|
+
Packages to use for this step. The key is the name of the package
|
354
|
+
and the value is the version to use.
|
355
|
+
python : str, optional, default: None
|
356
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
357
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
358
|
+
"""
|
359
|
+
...
|
360
|
+
|
361
|
+
@typing.overload
|
362
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
363
|
+
"""
|
364
|
+
Parameters
|
365
|
+
----------
|
366
|
+
"""
|
367
|
+
...
|
368
|
+
|
369
|
+
@typing.overload
|
370
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
371
|
+
...
|
372
|
+
|
373
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
374
|
+
"""
|
375
|
+
Parameters
|
376
|
+
----------
|
377
|
+
"""
|
378
|
+
...
|
379
|
+
|
416
380
|
@typing.overload
|
417
381
|
def resources(*, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = 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]]]:
|
418
382
|
"""
|
@@ -544,7 +508,66 @@ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
544
508
|
...
|
545
509
|
|
546
510
|
@typing.overload
|
547
|
-
def
|
511
|
+
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]]]:
|
512
|
+
"""
|
513
|
+
Specifies the Conda environment for the step.
|
514
|
+
|
515
|
+
Information in this decorator will augment any
|
516
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
517
|
+
you can use `@conda_base` to set packages required by all
|
518
|
+
steps and use `@conda` to specify step-specific overrides.
|
519
|
+
|
520
|
+
|
521
|
+
Parameters
|
522
|
+
----------
|
523
|
+
packages : Dict[str, str], default {}
|
524
|
+
Packages to use for this step. The key is the name of the package
|
525
|
+
and the value is the version to use.
|
526
|
+
libraries : Dict[str, str], default {}
|
527
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
528
|
+
python : str, optional, default None
|
529
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
530
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
531
|
+
disabled : bool, default False
|
532
|
+
If set to True, disables @conda.
|
533
|
+
"""
|
534
|
+
...
|
535
|
+
|
536
|
+
@typing.overload
|
537
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
538
|
+
...
|
539
|
+
|
540
|
+
@typing.overload
|
541
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
542
|
+
...
|
543
|
+
|
544
|
+
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):
|
545
|
+
"""
|
546
|
+
Specifies the Conda environment for the step.
|
547
|
+
|
548
|
+
Information in this decorator will augment any
|
549
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
550
|
+
you can use `@conda_base` to set packages required by all
|
551
|
+
steps and use `@conda` to specify step-specific overrides.
|
552
|
+
|
553
|
+
|
554
|
+
Parameters
|
555
|
+
----------
|
556
|
+
packages : Dict[str, str], default {}
|
557
|
+
Packages to use for this step. The key is the name of the package
|
558
|
+
and the value is the version to use.
|
559
|
+
libraries : Dict[str, str], default {}
|
560
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
561
|
+
python : str, optional, default None
|
562
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
563
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
564
|
+
disabled : bool, default False
|
565
|
+
If set to True, disables @conda.
|
566
|
+
"""
|
567
|
+
...
|
568
|
+
|
569
|
+
@typing.overload
|
570
|
+
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]]]:
|
548
571
|
"""
|
549
572
|
Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
|
550
573
|
|
@@ -693,168 +716,231 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
693
716
|
...
|
694
717
|
|
695
718
|
@typing.overload
|
696
|
-
def
|
719
|
+
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]]]:
|
697
720
|
"""
|
721
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
722
|
+
the execution of a step.
|
723
|
+
|
724
|
+
|
698
725
|
Parameters
|
699
726
|
----------
|
727
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
728
|
+
List of secret specs, defining how the secrets are to be retrieved
|
700
729
|
"""
|
701
730
|
...
|
702
731
|
|
703
732
|
@typing.overload
|
704
|
-
def
|
733
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
705
734
|
...
|
706
735
|
|
707
|
-
|
736
|
+
@typing.overload
|
737
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
738
|
+
...
|
739
|
+
|
740
|
+
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]]] = []):
|
708
741
|
"""
|
742
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
743
|
+
the execution of a step.
|
744
|
+
|
745
|
+
|
709
746
|
Parameters
|
710
747
|
----------
|
748
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
749
|
+
List of secret specs, defining how the secrets are to be retrieved
|
711
750
|
"""
|
712
751
|
...
|
713
752
|
|
714
753
|
@typing.overload
|
715
|
-
def
|
754
|
+
def timeout(*, seconds: int = 0, minutes: int = 0, hours: int = 0) -> 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]]]:
|
716
755
|
"""
|
717
|
-
Specifies
|
756
|
+
Specifies a timeout for your step.
|
757
|
+
|
758
|
+
This decorator is useful if this step may hang indefinitely.
|
759
|
+
|
760
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
761
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
762
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
763
|
+
|
764
|
+
Note that all the values specified in parameters are added together so if you specify
|
765
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
718
766
|
|
719
767
|
|
720
768
|
Parameters
|
721
769
|
----------
|
722
|
-
|
723
|
-
|
770
|
+
seconds : int, default 0
|
771
|
+
Number of seconds to wait prior to timing out.
|
772
|
+
minutes : int, default 0
|
773
|
+
Number of minutes to wait prior to timing out.
|
774
|
+
hours : int, default 0
|
775
|
+
Number of hours to wait prior to timing out.
|
724
776
|
"""
|
725
777
|
...
|
726
778
|
|
727
779
|
@typing.overload
|
728
|
-
def
|
780
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
729
781
|
...
|
730
782
|
|
731
783
|
@typing.overload
|
732
|
-
def
|
784
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
733
785
|
...
|
734
786
|
|
735
|
-
def
|
787
|
+
def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
|
736
788
|
"""
|
737
|
-
Specifies
|
789
|
+
Specifies a timeout for your step.
|
790
|
+
|
791
|
+
This decorator is useful if this step may hang indefinitely.
|
792
|
+
|
793
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
794
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
795
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
796
|
+
|
797
|
+
Note that all the values specified in parameters are added together so if you specify
|
798
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
738
799
|
|
739
800
|
|
740
801
|
Parameters
|
741
802
|
----------
|
742
|
-
|
743
|
-
|
803
|
+
seconds : int, default 0
|
804
|
+
Number of seconds to wait prior to timing out.
|
805
|
+
minutes : int, default 0
|
806
|
+
Number of minutes to wait prior to timing out.
|
807
|
+
hours : int, default 0
|
808
|
+
Number of hours to wait prior to timing out.
|
744
809
|
"""
|
745
810
|
...
|
746
811
|
|
747
812
|
@typing.overload
|
748
|
-
def
|
813
|
+
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]]]:
|
749
814
|
"""
|
750
|
-
|
815
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
751
816
|
|
752
|
-
|
753
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
754
|
-
you can use `@conda_base` to set packages required by all
|
755
|
-
steps and use `@conda` to specify step-specific overrides.
|
817
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
756
818
|
|
757
819
|
|
758
820
|
Parameters
|
759
821
|
----------
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
disabled : bool, default False
|
769
|
-
If set to True, disables @conda.
|
822
|
+
type : str, default 'default'
|
823
|
+
Card type.
|
824
|
+
id : str, optional, default None
|
825
|
+
If multiple cards are present, use this id to identify this card.
|
826
|
+
options : Dict[str, Any], default {}
|
827
|
+
Options passed to the card. The contents depend on the card type.
|
828
|
+
timeout : int, default 45
|
829
|
+
Interrupt reporting if it takes more than this many seconds.
|
770
830
|
"""
|
771
831
|
...
|
772
832
|
|
773
833
|
@typing.overload
|
774
|
-
def
|
834
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
775
835
|
...
|
776
836
|
|
777
837
|
@typing.overload
|
778
|
-
def
|
838
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
779
839
|
...
|
780
840
|
|
781
|
-
def
|
841
|
+
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):
|
782
842
|
"""
|
783
|
-
|
843
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
784
844
|
|
785
|
-
|
786
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
787
|
-
you can use `@conda_base` to set packages required by all
|
788
|
-
steps and use `@conda` to specify step-specific overrides.
|
845
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
789
846
|
|
790
847
|
|
791
848
|
Parameters
|
792
849
|
----------
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
disabled : bool, default False
|
802
|
-
If set to True, disables @conda.
|
850
|
+
type : str, default 'default'
|
851
|
+
Card type.
|
852
|
+
id : str, optional, default None
|
853
|
+
If multiple cards are present, use this id to identify this card.
|
854
|
+
options : Dict[str, Any], default {}
|
855
|
+
Options passed to the card. The contents depend on the card type.
|
856
|
+
timeout : int, default 45
|
857
|
+
Interrupt reporting if it takes more than this many seconds.
|
803
858
|
"""
|
804
859
|
...
|
805
860
|
|
806
|
-
|
807
|
-
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]]]:
|
861
|
+
def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
808
862
|
"""
|
809
|
-
Specifies
|
810
|
-
to a step needs to be retried.
|
811
|
-
|
812
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
813
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
814
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
863
|
+
Specifies what flows belong to the same project.
|
815
864
|
|
816
|
-
|
817
|
-
|
818
|
-
ensuring that the flow execution can continue.
|
865
|
+
A project-specific namespace is created for all flows that
|
866
|
+
use the same `@project(name)`.
|
819
867
|
|
820
868
|
|
821
869
|
Parameters
|
822
870
|
----------
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
871
|
+
name : str
|
872
|
+
Project name. Make sure that the name is unique amongst all
|
873
|
+
projects that use the same production scheduler. The name may
|
874
|
+
contain only lowercase alphanumeric characters and underscores.
|
875
|
+
|
876
|
+
branch : Optional[str], default None
|
877
|
+
The branch to use. If not specified, the branch is set to
|
878
|
+
`user.<username>` unless `production` is set to `True`. This can
|
879
|
+
also be set on the command line using `--branch` as a top-level option.
|
880
|
+
It is an error to specify `branch` in the decorator and on the command line.
|
881
|
+
|
882
|
+
production : bool, default False
|
883
|
+
Whether or not the branch is the production branch. This can also be set on the
|
884
|
+
command line using `--production` as a top-level option. It is an error to specify
|
885
|
+
`production` in the decorator and on the command line.
|
886
|
+
The project branch name will be:
|
887
|
+
- if `branch` is specified:
|
888
|
+
- if `production` is True: `prod.<branch>`
|
889
|
+
- if `production` is False: `test.<branch>`
|
890
|
+
- if `branch` is not specified:
|
891
|
+
- if `production` is True: `prod`
|
892
|
+
- if `production` is False: `user.<username>`
|
827
893
|
"""
|
828
894
|
...
|
829
895
|
|
830
896
|
@typing.overload
|
831
|
-
def
|
897
|
+
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]]:
|
898
|
+
"""
|
899
|
+
Specifies the Conda environment for all steps of the flow.
|
900
|
+
|
901
|
+
Use `@conda_base` to set common libraries required by all
|
902
|
+
steps and use `@conda` to specify step-specific additions.
|
903
|
+
|
904
|
+
|
905
|
+
Parameters
|
906
|
+
----------
|
907
|
+
packages : Dict[str, str], default {}
|
908
|
+
Packages to use for this flow. The key is the name of the package
|
909
|
+
and the value is the version to use.
|
910
|
+
libraries : Dict[str, str], default {}
|
911
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
912
|
+
python : str, optional, default None
|
913
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
914
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
915
|
+
disabled : bool, default False
|
916
|
+
If set to True, disables Conda.
|
917
|
+
"""
|
832
918
|
...
|
833
919
|
|
834
920
|
@typing.overload
|
835
|
-
def
|
921
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
836
922
|
...
|
837
923
|
|
838
|
-
def
|
924
|
+
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):
|
839
925
|
"""
|
840
|
-
Specifies the
|
841
|
-
to a step needs to be retried.
|
926
|
+
Specifies the Conda environment for all steps of the flow.
|
842
927
|
|
843
|
-
|
844
|
-
|
845
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
846
|
-
|
847
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
848
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
849
|
-
ensuring that the flow execution can continue.
|
928
|
+
Use `@conda_base` to set common libraries required by all
|
929
|
+
steps and use `@conda` to specify step-specific additions.
|
850
930
|
|
851
931
|
|
852
932
|
Parameters
|
853
933
|
----------
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
934
|
+
packages : Dict[str, str], default {}
|
935
|
+
Packages to use for this flow. The key is the name of the package
|
936
|
+
and the value is the version to use.
|
937
|
+
libraries : Dict[str, str], default {}
|
938
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
939
|
+
python : str, optional, default None
|
940
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
941
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
942
|
+
disabled : bool, default False
|
943
|
+
If set to True, disables Conda.
|
858
944
|
"""
|
859
945
|
...
|
860
946
|
|
@@ -909,6 +995,90 @@ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly:
|
|
909
995
|
"""
|
910
996
|
...
|
911
997
|
|
998
|
+
@typing.overload
|
999
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1000
|
+
"""
|
1001
|
+
Specifies the PyPI packages for all steps of the flow.
|
1002
|
+
|
1003
|
+
Use `@pypi_base` to set common packages required by all
|
1004
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1005
|
+
|
1006
|
+
Parameters
|
1007
|
+
----------
|
1008
|
+
packages : Dict[str, str], default: {}
|
1009
|
+
Packages to use for this flow. The key is the name of the package
|
1010
|
+
and the value is the version to use.
|
1011
|
+
python : str, optional, default: None
|
1012
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1013
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1014
|
+
"""
|
1015
|
+
...
|
1016
|
+
|
1017
|
+
@typing.overload
|
1018
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1019
|
+
...
|
1020
|
+
|
1021
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1022
|
+
"""
|
1023
|
+
Specifies the PyPI packages for all steps of the flow.
|
1024
|
+
|
1025
|
+
Use `@pypi_base` to set common packages required by all
|
1026
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1027
|
+
|
1028
|
+
Parameters
|
1029
|
+
----------
|
1030
|
+
packages : Dict[str, str], default: {}
|
1031
|
+
Packages to use for this flow. The key is the name of the package
|
1032
|
+
and the value is the version to use.
|
1033
|
+
python : str, optional, default: None
|
1034
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1035
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1036
|
+
"""
|
1037
|
+
...
|
1038
|
+
|
1039
|
+
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]]:
|
1040
|
+
"""
|
1041
|
+
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)
|
1042
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1043
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1044
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1045
|
+
starts only after all sensors finish.
|
1046
|
+
|
1047
|
+
|
1048
|
+
Parameters
|
1049
|
+
----------
|
1050
|
+
timeout : int
|
1051
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1052
|
+
poke_interval : int
|
1053
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1054
|
+
mode : str
|
1055
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1056
|
+
exponential_backoff : bool
|
1057
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1058
|
+
pool : str
|
1059
|
+
the slot pool this task should run in,
|
1060
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1061
|
+
soft_fail : bool
|
1062
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1063
|
+
name : str
|
1064
|
+
Name of the sensor on Airflow
|
1065
|
+
description : str
|
1066
|
+
Description of sensor in the Airflow UI
|
1067
|
+
bucket_key : Union[str, List[str]]
|
1068
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1069
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1070
|
+
bucket_name : str
|
1071
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1072
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1073
|
+
wildcard_match : bool
|
1074
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1075
|
+
aws_conn_id : str
|
1076
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
1077
|
+
verify : bool
|
1078
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1079
|
+
"""
|
1080
|
+
...
|
1081
|
+
|
912
1082
|
@typing.overload
|
913
1083
|
def trigger(*, event: typing.Union[str, typing.Dict[str, typing.Any], None] = None, events: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
914
1084
|
"""
|
@@ -1002,6 +1172,49 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1002
1172
|
"""
|
1003
1173
|
...
|
1004
1174
|
|
1175
|
+
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]]:
|
1176
|
+
"""
|
1177
|
+
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.
|
1178
|
+
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.
|
1179
|
+
|
1180
|
+
|
1181
|
+
Parameters
|
1182
|
+
----------
|
1183
|
+
timeout : int
|
1184
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1185
|
+
poke_interval : int
|
1186
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1187
|
+
mode : str
|
1188
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1189
|
+
exponential_backoff : bool
|
1190
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1191
|
+
pool : str
|
1192
|
+
the slot pool this task should run in,
|
1193
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1194
|
+
soft_fail : bool
|
1195
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1196
|
+
name : str
|
1197
|
+
Name of the sensor on Airflow
|
1198
|
+
description : str
|
1199
|
+
Description of sensor in the Airflow UI
|
1200
|
+
external_dag_id : str
|
1201
|
+
The dag_id that contains the task you want to wait for.
|
1202
|
+
external_task_ids : List[str]
|
1203
|
+
The list of task_ids that you want to wait for.
|
1204
|
+
If None (default value) the sensor waits for the DAG. (Default: None)
|
1205
|
+
allowed_states : List[str]
|
1206
|
+
Iterable of allowed states, (Default: ['success'])
|
1207
|
+
failed_states : List[str]
|
1208
|
+
Iterable of failed or dis-allowed states. (Default: None)
|
1209
|
+
execution_delta : datetime.timedelta
|
1210
|
+
time difference with the previous execution to look at,
|
1211
|
+
the default is the same logical date as the current task or DAG. (Default: None)
|
1212
|
+
check_existence: bool
|
1213
|
+
Set to True to check if the external task exists or check if
|
1214
|
+
the DAG to wait for exists. (Default: True)
|
1215
|
+
"""
|
1216
|
+
...
|
1217
|
+
|
1005
1218
|
@typing.overload
|
1006
1219
|
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]]:
|
1007
1220
|
"""
|
@@ -1103,216 +1316,3 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
|
|
1103
1316
|
"""
|
1104
1317
|
...
|
1105
1318
|
|
1106
|
-
@typing.overload
|
1107
|
-
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]]:
|
1108
|
-
"""
|
1109
|
-
Specifies the Conda environment for all steps of the flow.
|
1110
|
-
|
1111
|
-
Use `@conda_base` to set common libraries required by all
|
1112
|
-
steps and use `@conda` to specify step-specific additions.
|
1113
|
-
|
1114
|
-
|
1115
|
-
Parameters
|
1116
|
-
----------
|
1117
|
-
packages : Dict[str, str], default {}
|
1118
|
-
Packages to use for this flow. The key is the name of the package
|
1119
|
-
and the value is the version to use.
|
1120
|
-
libraries : Dict[str, str], default {}
|
1121
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1122
|
-
python : str, optional, default None
|
1123
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1124
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1125
|
-
disabled : bool, default False
|
1126
|
-
If set to True, disables Conda.
|
1127
|
-
"""
|
1128
|
-
...
|
1129
|
-
|
1130
|
-
@typing.overload
|
1131
|
-
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1132
|
-
...
|
1133
|
-
|
1134
|
-
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):
|
1135
|
-
"""
|
1136
|
-
Specifies the Conda environment for all steps of the flow.
|
1137
|
-
|
1138
|
-
Use `@conda_base` to set common libraries required by all
|
1139
|
-
steps and use `@conda` to specify step-specific additions.
|
1140
|
-
|
1141
|
-
|
1142
|
-
Parameters
|
1143
|
-
----------
|
1144
|
-
packages : Dict[str, str], default {}
|
1145
|
-
Packages to use for this flow. The key is the name of the package
|
1146
|
-
and the value is the version to use.
|
1147
|
-
libraries : Dict[str, str], default {}
|
1148
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1149
|
-
python : str, optional, default None
|
1150
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1151
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1152
|
-
disabled : bool, default False
|
1153
|
-
If set to True, disables Conda.
|
1154
|
-
"""
|
1155
|
-
...
|
1156
|
-
|
1157
|
-
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]]:
|
1158
|
-
"""
|
1159
|
-
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)
|
1160
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1161
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1162
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1163
|
-
starts only after all sensors finish.
|
1164
|
-
|
1165
|
-
|
1166
|
-
Parameters
|
1167
|
-
----------
|
1168
|
-
timeout : int
|
1169
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1170
|
-
poke_interval : int
|
1171
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1172
|
-
mode : str
|
1173
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1174
|
-
exponential_backoff : bool
|
1175
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1176
|
-
pool : str
|
1177
|
-
the slot pool this task should run in,
|
1178
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1179
|
-
soft_fail : bool
|
1180
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1181
|
-
name : str
|
1182
|
-
Name of the sensor on Airflow
|
1183
|
-
description : str
|
1184
|
-
Description of sensor in the Airflow UI
|
1185
|
-
bucket_key : Union[str, List[str]]
|
1186
|
-
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1187
|
-
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1188
|
-
bucket_name : str
|
1189
|
-
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1190
|
-
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1191
|
-
wildcard_match : bool
|
1192
|
-
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1193
|
-
aws_conn_id : str
|
1194
|
-
a reference to the s3 connection on Airflow. (Default: None)
|
1195
|
-
verify : bool
|
1196
|
-
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1197
|
-
"""
|
1198
|
-
...
|
1199
|
-
|
1200
|
-
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]]:
|
1201
|
-
"""
|
1202
|
-
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.
|
1203
|
-
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.
|
1204
|
-
|
1205
|
-
|
1206
|
-
Parameters
|
1207
|
-
----------
|
1208
|
-
timeout : int
|
1209
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1210
|
-
poke_interval : int
|
1211
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1212
|
-
mode : str
|
1213
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1214
|
-
exponential_backoff : bool
|
1215
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1216
|
-
pool : str
|
1217
|
-
the slot pool this task should run in,
|
1218
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1219
|
-
soft_fail : bool
|
1220
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1221
|
-
name : str
|
1222
|
-
Name of the sensor on Airflow
|
1223
|
-
description : str
|
1224
|
-
Description of sensor in the Airflow UI
|
1225
|
-
external_dag_id : str
|
1226
|
-
The dag_id that contains the task you want to wait for.
|
1227
|
-
external_task_ids : List[str]
|
1228
|
-
The list of task_ids that you want to wait for.
|
1229
|
-
If None (default value) the sensor waits for the DAG. (Default: None)
|
1230
|
-
allowed_states : List[str]
|
1231
|
-
Iterable of allowed states, (Default: ['success'])
|
1232
|
-
failed_states : List[str]
|
1233
|
-
Iterable of failed or dis-allowed states. (Default: None)
|
1234
|
-
execution_delta : datetime.timedelta
|
1235
|
-
time difference with the previous execution to look at,
|
1236
|
-
the default is the same logical date as the current task or DAG. (Default: None)
|
1237
|
-
check_existence: bool
|
1238
|
-
Set to True to check if the external task exists or check if
|
1239
|
-
the DAG to wait for exists. (Default: True)
|
1240
|
-
"""
|
1241
|
-
...
|
1242
|
-
|
1243
|
-
def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1244
|
-
"""
|
1245
|
-
Specifies what flows belong to the same project.
|
1246
|
-
|
1247
|
-
A project-specific namespace is created for all flows that
|
1248
|
-
use the same `@project(name)`.
|
1249
|
-
|
1250
|
-
|
1251
|
-
Parameters
|
1252
|
-
----------
|
1253
|
-
name : str
|
1254
|
-
Project name. Make sure that the name is unique amongst all
|
1255
|
-
projects that use the same production scheduler. The name may
|
1256
|
-
contain only lowercase alphanumeric characters and underscores.
|
1257
|
-
|
1258
|
-
branch : Optional[str], default None
|
1259
|
-
The branch to use. If not specified, the branch is set to
|
1260
|
-
`user.<username>` unless `production` is set to `True`. This can
|
1261
|
-
also be set on the command line using `--branch` as a top-level option.
|
1262
|
-
It is an error to specify `branch` in the decorator and on the command line.
|
1263
|
-
|
1264
|
-
production : bool, default False
|
1265
|
-
Whether or not the branch is the production branch. This can also be set on the
|
1266
|
-
command line using `--production` as a top-level option. It is an error to specify
|
1267
|
-
`production` in the decorator and on the command line.
|
1268
|
-
The project branch name will be:
|
1269
|
-
- if `branch` is specified:
|
1270
|
-
- if `production` is True: `prod.<branch>`
|
1271
|
-
- if `production` is False: `test.<branch>`
|
1272
|
-
- if `branch` is not specified:
|
1273
|
-
- if `production` is True: `prod`
|
1274
|
-
- if `production` is False: `user.<username>`
|
1275
|
-
"""
|
1276
|
-
...
|
1277
|
-
|
1278
|
-
@typing.overload
|
1279
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1280
|
-
"""
|
1281
|
-
Specifies the PyPI packages for all steps of the flow.
|
1282
|
-
|
1283
|
-
Use `@pypi_base` to set common packages required by all
|
1284
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1285
|
-
|
1286
|
-
Parameters
|
1287
|
-
----------
|
1288
|
-
packages : Dict[str, str], default: {}
|
1289
|
-
Packages to use for this flow. The key is the name of the package
|
1290
|
-
and the value is the version to use.
|
1291
|
-
python : str, optional, default: None
|
1292
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1293
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1294
|
-
"""
|
1295
|
-
...
|
1296
|
-
|
1297
|
-
@typing.overload
|
1298
|
-
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1299
|
-
...
|
1300
|
-
|
1301
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1302
|
-
"""
|
1303
|
-
Specifies the PyPI packages for all steps of the flow.
|
1304
|
-
|
1305
|
-
Use `@pypi_base` to set common packages required by all
|
1306
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1307
|
-
|
1308
|
-
Parameters
|
1309
|
-
----------
|
1310
|
-
packages : Dict[str, str], default: {}
|
1311
|
-
Packages to use for this flow. The key is the name of the package
|
1312
|
-
and the value is the version to use.
|
1313
|
-
python : str, optional, default: None
|
1314
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1315
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1316
|
-
"""
|
1317
|
-
...
|
1318
|
-
|