ob-metaflow-stubs 6.0.3.126__py2.py3-none-any.whl → 6.0.3.127__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- metaflow-stubs/__init__.pyi +197 -191
- metaflow-stubs/cards.pyi +1 -1
- metaflow-stubs/cli.pyi +1 -1
- metaflow-stubs/cli_components/__init__.pyi +1 -1
- metaflow-stubs/cli_components/utils.pyi +1 -1
- metaflow-stubs/client/__init__.pyi +1 -1
- metaflow-stubs/client/core.pyi +3 -3
- metaflow-stubs/client/filecache.pyi +1 -1
- metaflow-stubs/events.pyi +1 -1
- metaflow-stubs/exception.pyi +1 -1
- metaflow-stubs/flowspec.pyi +5 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +3 -3
- metaflow-stubs/info_file.pyi +1 -1
- metaflow-stubs/metadata_provider/__init__.pyi +1 -1
- metaflow-stubs/metadata_provider/heartbeat.pyi +1 -1
- metaflow-stubs/metadata_provider/metadata.pyi +1 -1
- metaflow-stubs/metadata_provider/util.pyi +1 -1
- metaflow-stubs/metaflow_config.pyi +1 -1
- metaflow-stubs/metaflow_current.pyi +110 -110
- metaflow-stubs/mf_extensions/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +1 -1
- metaflow-stubs/multicore_utils.pyi +1 -1
- metaflow-stubs/parameters.pyi +3 -3
- metaflow-stubs/plugins/__init__.pyi +11 -11
- metaflow-stubs/plugins/airflow/__init__.pyi +1 -1
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +1 -1
- metaflow-stubs/plugins/airflow/exception.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +1 -1
- metaflow-stubs/plugins/argo/__init__.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_client.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_events.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_workflows.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +2 -2
- metaflow-stubs/plugins/aws/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_client.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_utils.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +1 -1
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
- metaflow-stubs/plugins/azure/__init__.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_credential.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/azure/azure_utils.pyi +1 -1
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +1 -1
- metaflow-stubs/plugins/azure/includefile_support.pyi +1 -1
- metaflow-stubs/plugins/cards/__init__.pyi +5 -5
- metaflow-stubs/plugins/cards/card_client.pyi +1 -1
- metaflow-stubs/plugins/cards/card_creator.pyi +1 -1
- metaflow-stubs/plugins/cards/card_datastore.pyi +1 -1
- metaflow-stubs/plugins/cards/card_decorator.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/card.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/components.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +1 -1
- metaflow-stubs/plugins/cards/card_resolver.pyi +1 -1
- metaflow-stubs/plugins/cards/component_serializer.pyi +1 -1
- metaflow-stubs/plugins/cards/exception.pyi +1 -1
- metaflow-stubs/plugins/catch_decorator.pyi +2 -2
- metaflow-stubs/plugins/datatools/__init__.pyi +1 -1
- metaflow-stubs/plugins/datatools/local.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/s3.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +1 -1
- metaflow-stubs/plugins/debug_logger.pyi +1 -1
- metaflow-stubs/plugins/debug_monitor.pyi +1 -1
- metaflow-stubs/plugins/environment_decorator.pyi +1 -1
- metaflow-stubs/plugins/events_decorator.pyi +1 -1
- metaflow-stubs/plugins/frameworks/__init__.pyi +1 -1
- metaflow-stubs/plugins/frameworks/pytorch.pyi +1 -1
- metaflow-stubs/plugins/gcp/__init__.pyi +1 -1
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +1 -1
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +1 -1
- metaflow-stubs/plugins/gcp/gs_utils.pyi +1 -1
- metaflow-stubs/plugins/gcp/includefile_support.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/__init__.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +1 -1
- metaflow-stubs/plugins/parallel_decorator.pyi +1 -1
- metaflow-stubs/plugins/perimeters.pyi +1 -1
- metaflow-stubs/plugins/project_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +1 -1
- metaflow-stubs/plugins/pypi/utils.pyi +1 -1
- metaflow-stubs/plugins/resources_decorator.pyi +1 -1
- metaflow-stubs/plugins/retry_decorator.pyi +1 -1
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +1 -1
- metaflow-stubs/plugins/snowflake/__init__.pyi +1 -1
- metaflow-stubs/plugins/storage_executor.pyi +1 -1
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +1 -1
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/profilers/__init__.pyi +1 -1
- metaflow-stubs/pylint_wrapper.pyi +1 -1
- metaflow-stubs/runner/__init__.pyi +1 -1
- metaflow-stubs/runner/deployer.pyi +4 -4
- metaflow-stubs/runner/deployer_impl.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +1 -1
- metaflow-stubs/runner/nbdeploy.pyi +1 -1
- metaflow-stubs/runner/nbrun.pyi +1 -1
- metaflow-stubs/runner/subprocess_manager.pyi +1 -1
- metaflow-stubs/runner/utils.pyi +3 -3
- metaflow-stubs/system/__init__.pyi +1 -1
- metaflow-stubs/system/system_logger.pyi +2 -2
- metaflow-stubs/system/system_monitor.pyi +1 -1
- metaflow-stubs/tagging_util.pyi +1 -1
- metaflow-stubs/tuple_util.pyi +1 -1
- metaflow-stubs/user_configs/__init__.pyi +1 -1
- metaflow-stubs/user_configs/config_decorators.pyi +5 -5
- metaflow-stubs/user_configs/config_options.pyi +3 -3
- metaflow-stubs/user_configs/config_parameters.pyi +6 -6
- {ob_metaflow_stubs-6.0.3.126.dist-info → ob_metaflow_stubs-6.0.3.127.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.127.dist-info/RECORD +173 -0
- ob_metaflow_stubs-6.0.3.126.dist-info/RECORD +0 -173
- {ob_metaflow_stubs-6.0.3.126.dist-info → ob_metaflow_stubs-6.0.3.127.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.126.dist-info → ob_metaflow_stubs-6.0.3.127.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
3
|
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
-
# Generated on 2024-12-
|
4
|
+
# Generated on 2024-12-17T21:56:51.044544 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -34,9 +34,9 @@ from .user_configs.config_parameters import Config as Config
|
|
34
34
|
from .user_configs.config_parameters import config_expr as config_expr
|
35
35
|
from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
|
36
36
|
from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
|
37
|
-
from . import events as events
|
38
37
|
from . import tuple_util as tuple_util
|
39
38
|
from . import cards as cards
|
39
|
+
from . import events as events
|
40
40
|
from . import runner as runner
|
41
41
|
from . import plugins as plugins
|
42
42
|
from .mf_extensions.outerbounds.toplevel.global_aliases_for_metaflow_package import S3 as S3
|
@@ -146,135 +146,129 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
146
146
|
...
|
147
147
|
|
148
148
|
@typing.overload
|
149
|
-
def
|
149
|
+
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]]]:
|
150
150
|
"""
|
151
|
-
|
151
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
152
152
|
|
153
|
-
|
154
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
155
|
-
you can use `@conda_base` to set packages required by all
|
156
|
-
steps and use `@conda` to specify step-specific overrides.
|
153
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
157
154
|
"""
|
158
155
|
...
|
159
156
|
|
160
157
|
@typing.overload
|
161
|
-
def
|
158
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
162
159
|
...
|
163
160
|
|
164
161
|
@typing.overload
|
165
|
-
def
|
162
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
166
163
|
...
|
167
164
|
|
168
|
-
def
|
165
|
+
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):
|
169
166
|
"""
|
170
|
-
|
167
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
171
168
|
|
172
|
-
|
173
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
174
|
-
you can use `@conda_base` to set packages required by all
|
175
|
-
steps and use `@conda` to specify step-specific overrides.
|
169
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
176
170
|
"""
|
177
171
|
...
|
178
172
|
|
179
173
|
@typing.overload
|
180
|
-
def
|
174
|
+
def checkpoint(*, load_policy: str = 'fresh', temp_dir_root: 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]]]:
|
181
175
|
"""
|
182
|
-
|
183
|
-
and imported for all decorators types by _import_plugin_decorators().
|
176
|
+
Enables checkpointing for a step.
|
184
177
|
"""
|
185
178
|
...
|
186
179
|
|
187
180
|
@typing.overload
|
188
|
-
def
|
181
|
+
def checkpoint(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
189
182
|
...
|
190
183
|
|
191
|
-
|
192
|
-
|
193
|
-
Decorator prototype for all step decorators. This function gets specialized
|
194
|
-
and imported for all decorators types by _import_plugin_decorators().
|
195
|
-
"""
|
184
|
+
@typing.overload
|
185
|
+
def checkpoint(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
196
186
|
...
|
197
187
|
|
198
|
-
|
199
|
-
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]]]:
|
188
|
+
def checkpoint(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load_policy: str = 'fresh', temp_dir_root: str = None):
|
200
189
|
"""
|
201
|
-
|
202
|
-
the execution of a step.
|
190
|
+
Enables checkpointing for a step.
|
203
191
|
"""
|
204
192
|
...
|
205
193
|
|
206
194
|
@typing.overload
|
207
|
-
def
|
195
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
196
|
+
"""
|
197
|
+
Decorator prototype for all step decorators. This function gets specialized
|
198
|
+
and imported for all decorators types by _import_plugin_decorators().
|
199
|
+
"""
|
208
200
|
...
|
209
201
|
|
210
202
|
@typing.overload
|
211
|
-
def
|
203
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
212
204
|
...
|
213
205
|
|
214
|
-
def
|
206
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
215
207
|
"""
|
216
|
-
|
217
|
-
|
208
|
+
Decorator prototype for all step decorators. This function gets specialized
|
209
|
+
and imported for all decorators types by _import_plugin_decorators().
|
218
210
|
"""
|
219
211
|
...
|
220
212
|
|
221
213
|
@typing.overload
|
222
|
-
def
|
214
|
+
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]]]:
|
223
215
|
"""
|
224
|
-
Specifies
|
225
|
-
|
226
|
-
This decorator is useful if this step may hang indefinitely.
|
216
|
+
Specifies the number of times the task corresponding
|
217
|
+
to a step needs to be retried.
|
227
218
|
|
228
|
-
This
|
229
|
-
|
230
|
-
|
219
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
220
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
221
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
231
222
|
|
232
|
-
|
233
|
-
|
223
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
224
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
225
|
+
ensuring that the flow execution can continue.
|
234
226
|
"""
|
235
227
|
...
|
236
228
|
|
237
229
|
@typing.overload
|
238
|
-
def
|
230
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
239
231
|
...
|
240
232
|
|
241
233
|
@typing.overload
|
242
|
-
def
|
234
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
243
235
|
...
|
244
236
|
|
245
|
-
def
|
237
|
+
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):
|
246
238
|
"""
|
247
|
-
Specifies
|
248
|
-
|
249
|
-
This decorator is useful if this step may hang indefinitely.
|
239
|
+
Specifies the number of times the task corresponding
|
240
|
+
to a step needs to be retried.
|
250
241
|
|
251
|
-
This
|
252
|
-
|
253
|
-
|
242
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
243
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
244
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
254
245
|
|
255
|
-
|
256
|
-
|
246
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
247
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
248
|
+
ensuring that the flow execution can continue.
|
257
249
|
"""
|
258
250
|
...
|
259
251
|
|
260
252
|
@typing.overload
|
261
|
-
def
|
253
|
+
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]]]:
|
262
254
|
"""
|
263
|
-
|
255
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
256
|
+
the execution of a step.
|
264
257
|
"""
|
265
258
|
...
|
266
259
|
|
267
260
|
@typing.overload
|
268
|
-
def
|
261
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
269
262
|
...
|
270
263
|
|
271
264
|
@typing.overload
|
272
|
-
def
|
265
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
273
266
|
...
|
274
267
|
|
275
|
-
def
|
268
|
+
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]]] = []):
|
276
269
|
"""
|
277
|
-
|
270
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
271
|
+
the execution of a step.
|
278
272
|
"""
|
279
273
|
...
|
280
274
|
|
@@ -358,12 +352,6 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
358
352
|
"""
|
359
353
|
...
|
360
354
|
|
361
|
-
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, qos: str = 'Burstable') -> 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]]]:
|
362
|
-
"""
|
363
|
-
Specifies that this step should execute on Kubernetes.
|
364
|
-
"""
|
365
|
-
...
|
366
|
-
|
367
355
|
@typing.overload
|
368
356
|
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]]]:
|
369
357
|
"""
|
@@ -395,9 +383,34 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
|
|
395
383
|
"""
|
396
384
|
...
|
397
385
|
|
398
|
-
|
386
|
+
@typing.overload
|
387
|
+
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]]]:
|
399
388
|
"""
|
400
|
-
|
389
|
+
Specifies the Conda environment for the step.
|
390
|
+
|
391
|
+
Information in this decorator will augment any
|
392
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
393
|
+
you can use `@conda_base` to set packages required by all
|
394
|
+
steps and use `@conda` to specify step-specific overrides.
|
395
|
+
"""
|
396
|
+
...
|
397
|
+
|
398
|
+
@typing.overload
|
399
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
400
|
+
...
|
401
|
+
|
402
|
+
@typing.overload
|
403
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
404
|
+
...
|
405
|
+
|
406
|
+
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):
|
407
|
+
"""
|
408
|
+
Specifies the Conda environment for the step.
|
409
|
+
|
410
|
+
Information in this decorator will augment any
|
411
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
412
|
+
you can use `@conda_base` to set packages required by all
|
413
|
+
steps and use `@conda` to specify step-specific overrides.
|
401
414
|
"""
|
402
415
|
...
|
403
416
|
|
@@ -443,160 +456,77 @@ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], Non
|
|
443
456
|
"""
|
444
457
|
...
|
445
458
|
|
446
|
-
|
447
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
448
|
-
"""
|
449
|
-
Internal decorator to support Fast bakery
|
450
|
-
"""
|
451
|
-
...
|
452
|
-
|
453
|
-
@typing.overload
|
454
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
455
|
-
...
|
456
|
-
|
457
|
-
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
459
|
+
def nvidia(*, gpu: int, gpu_type: 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]]]:
|
458
460
|
"""
|
459
|
-
|
461
|
+
Specifies that this step should execute on DGX cloud.
|
460
462
|
"""
|
461
463
|
...
|
462
464
|
|
463
|
-
|
464
|
-
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]]]:
|
465
|
+
def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.Union[typing.List[str], typing.List[typing.Tuple[typing.Dict, str]], typing.List[typing.Tuple[str, str]], typing.List[typing.Dict], 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]]]:
|
465
466
|
"""
|
466
|
-
|
467
|
-
to a step needs to be retried.
|
468
|
-
|
469
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
470
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
471
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
472
|
-
|
473
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
474
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
475
|
-
ensuring that the flow execution can continue.
|
467
|
+
Decorator that helps cache, version and store models/datasets from huggingface hub.
|
476
468
|
"""
|
477
469
|
...
|
478
470
|
|
479
|
-
|
480
|
-
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
481
|
-
...
|
482
|
-
|
483
|
-
@typing.overload
|
484
|
-
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
485
|
-
...
|
486
|
-
|
487
|
-
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):
|
471
|
+
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, qos: str = 'Burstable') -> 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]]]:
|
488
472
|
"""
|
489
|
-
Specifies
|
490
|
-
to a step needs to be retried.
|
491
|
-
|
492
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
493
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
494
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
495
|
-
|
496
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
497
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
498
|
-
ensuring that the flow execution can continue.
|
473
|
+
Specifies that this step should execute on Kubernetes.
|
499
474
|
"""
|
500
475
|
...
|
501
476
|
|
502
477
|
@typing.overload
|
503
|
-
def
|
478
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
504
479
|
"""
|
505
|
-
|
506
|
-
|
507
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
480
|
+
Internal decorator to support Fast bakery
|
508
481
|
"""
|
509
482
|
...
|
510
483
|
|
511
484
|
@typing.overload
|
512
|
-
def
|
513
|
-
...
|
514
|
-
|
515
|
-
@typing.overload
|
516
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
517
|
-
...
|
518
|
-
|
519
|
-
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):
|
520
|
-
"""
|
521
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
522
|
-
|
523
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
524
|
-
"""
|
525
|
-
...
|
526
|
-
|
527
|
-
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]]:
|
528
|
-
"""
|
529
|
-
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)
|
530
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
531
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
532
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
533
|
-
starts only after all sensors finish.
|
534
|
-
"""
|
485
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
535
486
|
...
|
536
487
|
|
537
|
-
|
538
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
488
|
+
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
539
489
|
"""
|
540
|
-
|
541
|
-
|
542
|
-
Use `@pypi_base` to set common packages required by all
|
543
|
-
steps and use `@pypi` to specify step-specific overrides.
|
490
|
+
Internal decorator to support Fast bakery
|
544
491
|
"""
|
545
492
|
...
|
546
493
|
|
547
494
|
@typing.overload
|
548
|
-
def
|
549
|
-
...
|
550
|
-
|
551
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
552
|
-
"""
|
553
|
-
Specifies the PyPI packages for all steps of the flow.
|
554
|
-
|
555
|
-
Use `@pypi_base` to set common packages required by all
|
556
|
-
steps and use `@pypi` to specify step-specific overrides.
|
557
|
-
"""
|
558
|
-
...
|
559
|
-
|
560
|
-
def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
495
|
+
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]]]:
|
561
496
|
"""
|
562
|
-
|
497
|
+
Specifies a timeout for your step.
|
563
498
|
|
564
|
-
|
565
|
-
-----------
|
566
|
-
@nim(
|
567
|
-
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
568
|
-
backend='managed'
|
569
|
-
)
|
499
|
+
This decorator is useful if this step may hang indefinitely.
|
570
500
|
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
- 🚧 'dataplane': Run in your account.
|
501
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
502
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
503
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
575
504
|
|
576
|
-
|
577
|
-
|
578
|
-
- 'meta/llama3-8b-instruct': 8B parameter model
|
579
|
-
- 'meta/llama3-70b-instruct': 70B parameter model
|
580
|
-
- Upon request, any model here: https://nvcf.ngc.nvidia.com/functions?filter=nvidia-functions
|
505
|
+
Note that all the values specified in parameters are added together so if you specify
|
506
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
581
507
|
"""
|
582
508
|
...
|
583
509
|
|
584
510
|
@typing.overload
|
585
|
-
def
|
586
|
-
"""
|
587
|
-
Specifies the times when the flow should be run when running on a
|
588
|
-
production scheduler.
|
589
|
-
"""
|
511
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
590
512
|
...
|
591
513
|
|
592
514
|
@typing.overload
|
593
|
-
def
|
515
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
594
516
|
...
|
595
517
|
|
596
|
-
def
|
518
|
+
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):
|
597
519
|
"""
|
598
|
-
Specifies
|
599
|
-
|
520
|
+
Specifies a timeout for your step.
|
521
|
+
|
522
|
+
This decorator is useful if this step may hang indefinitely.
|
523
|
+
|
524
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
525
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
526
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
527
|
+
|
528
|
+
Note that all the values specified in parameters are added together so if you specify
|
529
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
600
530
|
"""
|
601
531
|
...
|
602
532
|
|
@@ -623,12 +553,10 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
|
|
623
553
|
"""
|
624
554
|
...
|
625
555
|
|
626
|
-
def
|
556
|
+
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]]:
|
627
557
|
"""
|
628
|
-
|
629
|
-
|
630
|
-
A project-specific namespace is created for all flows that
|
631
|
-
use the same `@project(name)`.
|
558
|
+
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.
|
559
|
+
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.
|
632
560
|
"""
|
633
561
|
...
|
634
562
|
|
@@ -786,10 +714,88 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
786
714
|
"""
|
787
715
|
...
|
788
716
|
|
789
|
-
|
717
|
+
@typing.overload
|
718
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
790
719
|
"""
|
791
|
-
|
792
|
-
|
720
|
+
Specifies the PyPI packages for all steps of the flow.
|
721
|
+
|
722
|
+
Use `@pypi_base` to set common packages required by all
|
723
|
+
steps and use `@pypi` to specify step-specific overrides.
|
724
|
+
"""
|
725
|
+
...
|
726
|
+
|
727
|
+
@typing.overload
|
728
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
729
|
+
...
|
730
|
+
|
731
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
732
|
+
"""
|
733
|
+
Specifies the PyPI packages for all steps of the flow.
|
734
|
+
|
735
|
+
Use `@pypi_base` to set common packages required by all
|
736
|
+
steps and use `@pypi` to specify step-specific overrides.
|
737
|
+
"""
|
738
|
+
...
|
739
|
+
|
740
|
+
def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
741
|
+
"""
|
742
|
+
This decorator is used to run NIM containers in Metaflow tasks as sidecars.
|
743
|
+
|
744
|
+
User code call
|
745
|
+
-----------
|
746
|
+
@nim(
|
747
|
+
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
748
|
+
backend='managed'
|
749
|
+
)
|
750
|
+
|
751
|
+
Valid backend options
|
752
|
+
---------------------
|
753
|
+
- 'managed': Outerbounds selects a compute provider based on the model.
|
754
|
+
- 🚧 'dataplane': Run in your account.
|
755
|
+
|
756
|
+
Valid model options
|
757
|
+
----------------
|
758
|
+
- 'meta/llama3-8b-instruct': 8B parameter model
|
759
|
+
- 'meta/llama3-70b-instruct': 70B parameter model
|
760
|
+
- Upon request, any model here: https://nvcf.ngc.nvidia.com/functions?filter=nvidia-functions
|
761
|
+
"""
|
762
|
+
...
|
763
|
+
|
764
|
+
@typing.overload
|
765
|
+
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]]:
|
766
|
+
"""
|
767
|
+
Specifies the times when the flow should be run when running on a
|
768
|
+
production scheduler.
|
769
|
+
"""
|
770
|
+
...
|
771
|
+
|
772
|
+
@typing.overload
|
773
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
774
|
+
...
|
775
|
+
|
776
|
+
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):
|
777
|
+
"""
|
778
|
+
Specifies the times when the flow should be run when running on a
|
779
|
+
production scheduler.
|
780
|
+
"""
|
781
|
+
...
|
782
|
+
|
783
|
+
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]]:
|
784
|
+
"""
|
785
|
+
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)
|
786
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
787
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
788
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
789
|
+
starts only after all sensors finish.
|
790
|
+
"""
|
791
|
+
...
|
792
|
+
|
793
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
794
|
+
"""
|
795
|
+
Specifies what flows belong to the same project.
|
796
|
+
|
797
|
+
A project-specific namespace is created for all flows that
|
798
|
+
use the same `@project(name)`.
|
793
799
|
"""
|
794
800
|
...
|
795
801
|
|
metaflow-stubs/cards.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
-
# Generated on 2024-12-
|
4
|
+
# Generated on 2024-12-17T21:56:50.916400 #
|
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
3
|
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
-
# Generated on 2024-12-
|
4
|
+
# Generated on 2024-12-17T21:56:50.930394 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
-
# Generated on 2024-12-
|
4
|
+
# Generated on 2024-12-17T21:56:50.929141 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
-
# Generated on 2024-12-
|
4
|
+
# Generated on 2024-12-17T21:56:50.951933 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
-
# Generated on 2024-12-
|
4
|
+
# Generated on 2024-12-17T21:56:50.919646 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|