ob-metaflow-stubs 6.0.3.131__py2.py3-none-any.whl → 6.0.3.133__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 +194 -194
- metaflow-stubs/cards.pyi +3 -2
- metaflow-stubs/cli.pyi +2 -2
- 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 +5 -5
- metaflow-stubs/client/filecache.pyi +2 -2
- 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 +3 -3
- metaflow-stubs/info_file.pyi +2 -2
- metaflow-stubs/metadata_provider/__init__.pyi +2 -2
- metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
- metaflow-stubs/metadata_provider/metadata.pyi +2 -2
- metaflow-stubs/metadata_provider/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -2
- metaflow-stubs/metaflow_current.pyi +119 -119
- metaflow-stubs/mf_extensions/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/async_cards.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/deco_injection_mixin.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/extra_components.pyi +4 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/checkpoint_lister.pyi +5 -5
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/lineage_card.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +4 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +4 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/decorator.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/lineage.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/decorator.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/core.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/model_storage.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/base.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/tar.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +3 -3
- metaflow-stubs/plugins/__init__.pyi +11 -11
- metaflow-stubs/plugins/airflow/__init__.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 +4 -4
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
- metaflow-stubs/plugins/aws/__init__.pyi +2 -2
- 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 +4 -4
- metaflow-stubs/plugins/aws/step_functions/__init__.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_deployer.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
- 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 +4 -4
- 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 +4 -2
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +15 -7
- metaflow-stubs/plugins/cards/card_modules/card.pyi +9 -3
- metaflow-stubs/plugins/cards/card_modules/components.pyi +48 -10
- 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 +6 -6
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +3 -3
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +2 -2
- 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 +4 -4
- 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_jobsets.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
- metaflow-stubs/plugins/perimeters.pyi +2 -2
- metaflow-stubs/plugins/project_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/__init__.pyi +3 -3
- 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 +3 -3
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +4 -4
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/snowflake/__init__.pyi +2 -2
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/profilers/__init__.pyi +2 -2
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/deployer.pyi +6 -6
- metaflow-stubs/runner/deployer_impl.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +3 -3
- metaflow-stubs/runner/nbdeploy.pyi +2 -2
- metaflow-stubs/runner/nbrun.pyi +2 -2
- metaflow-stubs/runner/subprocess_manager.pyi +2 -2
- metaflow-stubs/runner/utils.pyi +3 -3
- metaflow-stubs/system/__init__.pyi +2 -2
- metaflow-stubs/system/system_logger.pyi +2 -2
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- metaflow-stubs/user_configs/__init__.pyi +2 -2
- metaflow-stubs/user_configs/config_decorators.pyi +7 -7
- metaflow-stubs/user_configs/config_options.pyi +2 -2
- metaflow-stubs/user_configs/config_parameters.pyi +5 -5
- {ob_metaflow_stubs-6.0.3.131.dist-info → ob_metaflow_stubs-6.0.3.133.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.133.dist-info/RECORD +191 -0
- ob_metaflow_stubs-6.0.3.131.dist-info/RECORD +0 -191
- {ob_metaflow_stubs-6.0.3.131.dist-info → ob_metaflow_stubs-6.0.3.133.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.131.dist-info → ob_metaflow_stubs-6.0.3.133.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.13.
|
4
|
-
# Generated on 2025-01-
|
3
|
+
# MF version: 2.13.4.1+obcheckpoint(0.1.6);ob(v1) #
|
4
|
+
# Generated on 2025-01-15T20:56:03.760807 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -147,108 +147,150 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
147
147
|
...
|
148
148
|
|
149
149
|
@typing.overload
|
150
|
-
def
|
150
|
+
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]]]:
|
151
151
|
"""
|
152
|
-
|
153
|
-
|
152
|
+
Specifies the PyPI packages for the step.
|
153
|
+
|
154
|
+
Information in this decorator will augment any
|
155
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
156
|
+
you can use `@pypi_base` to set packages required by all
|
157
|
+
steps and use `@pypi` to specify step-specific overrides.
|
154
158
|
"""
|
155
159
|
...
|
156
160
|
|
157
161
|
@typing.overload
|
158
|
-
def
|
162
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
159
163
|
...
|
160
164
|
|
161
|
-
|
165
|
+
@typing.overload
|
166
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
167
|
+
...
|
168
|
+
|
169
|
+
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):
|
162
170
|
"""
|
163
|
-
|
164
|
-
|
171
|
+
Specifies the PyPI packages for the step.
|
172
|
+
|
173
|
+
Information in this decorator will augment any
|
174
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
175
|
+
you can use `@pypi_base` to set packages required by all
|
176
|
+
steps and use `@pypi` to specify step-specific overrides.
|
165
177
|
"""
|
166
178
|
...
|
167
179
|
|
168
180
|
@typing.overload
|
169
|
-
def
|
181
|
+
def model(*, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, 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]]]:
|
170
182
|
"""
|
171
|
-
|
183
|
+
Enables loading / saving of models within a step.
|
172
184
|
"""
|
173
185
|
...
|
174
186
|
|
175
187
|
@typing.overload
|
176
|
-
def
|
188
|
+
def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
177
189
|
...
|
178
190
|
|
179
191
|
@typing.overload
|
180
|
-
def
|
192
|
+
def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
181
193
|
...
|
182
194
|
|
183
|
-
def
|
195
|
+
def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: str = None):
|
184
196
|
"""
|
185
|
-
|
197
|
+
Enables loading / saving of models within a step.
|
186
198
|
"""
|
187
199
|
...
|
188
200
|
|
189
|
-
|
201
|
+
@typing.overload
|
202
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
190
203
|
"""
|
191
|
-
Decorator
|
204
|
+
Decorator prototype for all step decorators. This function gets specialized
|
205
|
+
and imported for all decorators types by _import_plugin_decorators().
|
192
206
|
"""
|
193
207
|
...
|
194
208
|
|
195
209
|
@typing.overload
|
196
|
-
def
|
210
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
211
|
+
...
|
212
|
+
|
213
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
197
214
|
"""
|
198
|
-
|
215
|
+
Decorator prototype for all step decorators. This function gets specialized
|
216
|
+
and imported for all decorators types by _import_plugin_decorators().
|
217
|
+
"""
|
218
|
+
...
|
219
|
+
|
220
|
+
@typing.overload
|
221
|
+
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]]]:
|
222
|
+
"""
|
223
|
+
Specifies the number of times the task corresponding
|
224
|
+
to a step needs to be retried.
|
199
225
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
226
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
227
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
228
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
229
|
+
|
230
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
231
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
232
|
+
ensuring that the flow execution can continue.
|
204
233
|
"""
|
205
234
|
...
|
206
235
|
|
207
236
|
@typing.overload
|
208
|
-
def
|
237
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
209
238
|
...
|
210
239
|
|
211
240
|
@typing.overload
|
212
|
-
def
|
241
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
213
242
|
...
|
214
243
|
|
215
|
-
def
|
244
|
+
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):
|
216
245
|
"""
|
217
|
-
Specifies the
|
246
|
+
Specifies the number of times the task corresponding
|
247
|
+
to a step needs to be retried.
|
218
248
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
249
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
250
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
251
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
252
|
+
|
253
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
254
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
255
|
+
ensuring that the flow execution can continue.
|
223
256
|
"""
|
224
257
|
...
|
225
258
|
|
226
|
-
|
259
|
+
@typing.overload
|
260
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
227
261
|
"""
|
228
|
-
|
262
|
+
Internal decorator to support Fast bakery
|
229
263
|
"""
|
230
264
|
...
|
231
265
|
|
232
266
|
@typing.overload
|
233
|
-
def
|
267
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
268
|
+
...
|
269
|
+
|
270
|
+
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
234
271
|
"""
|
235
|
-
|
236
|
-
the execution of a step.
|
272
|
+
Internal decorator to support Fast bakery
|
237
273
|
"""
|
238
274
|
...
|
239
275
|
|
240
276
|
@typing.overload
|
241
|
-
def
|
277
|
+
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]]]:
|
278
|
+
"""
|
279
|
+
Specifies environment variables to be set prior to the execution of a step.
|
280
|
+
"""
|
242
281
|
...
|
243
282
|
|
244
283
|
@typing.overload
|
245
|
-
def
|
284
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
246
285
|
...
|
247
286
|
|
248
|
-
|
287
|
+
@typing.overload
|
288
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
289
|
+
...
|
290
|
+
|
291
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
249
292
|
"""
|
250
|
-
Specifies
|
251
|
-
the execution of a step.
|
293
|
+
Specifies environment variables to be set prior to the execution of a step.
|
252
294
|
"""
|
253
295
|
...
|
254
296
|
|
@@ -283,45 +325,6 @@ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
283
325
|
"""
|
284
326
|
...
|
285
327
|
|
286
|
-
@typing.overload
|
287
|
-
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]]]:
|
288
|
-
"""
|
289
|
-
Specifies the number of times the task corresponding
|
290
|
-
to a step needs to be retried.
|
291
|
-
|
292
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
293
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
294
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
295
|
-
|
296
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
297
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
298
|
-
ensuring that the flow execution can continue.
|
299
|
-
"""
|
300
|
-
...
|
301
|
-
|
302
|
-
@typing.overload
|
303
|
-
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
304
|
-
...
|
305
|
-
|
306
|
-
@typing.overload
|
307
|
-
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
308
|
-
...
|
309
|
-
|
310
|
-
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):
|
311
|
-
"""
|
312
|
-
Specifies the number of times the task corresponding
|
313
|
-
to a step needs to be retried.
|
314
|
-
|
315
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
316
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
317
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
318
|
-
|
319
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
320
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
321
|
-
ensuring that the flow execution can continue.
|
322
|
-
"""
|
323
|
-
...
|
324
|
-
|
325
328
|
@typing.overload
|
326
329
|
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]]]:
|
327
330
|
"""
|
@@ -371,58 +374,6 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
371
374
|
"""
|
372
375
|
...
|
373
376
|
|
374
|
-
@typing.overload
|
375
|
-
def model(*, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, 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]]]:
|
376
|
-
"""
|
377
|
-
Enables loading / saving of models within a step.
|
378
|
-
"""
|
379
|
-
...
|
380
|
-
|
381
|
-
@typing.overload
|
382
|
-
def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
383
|
-
...
|
384
|
-
|
385
|
-
@typing.overload
|
386
|
-
def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
387
|
-
...
|
388
|
-
|
389
|
-
def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: str = None):
|
390
|
-
"""
|
391
|
-
Enables loading / saving of models within a step.
|
392
|
-
"""
|
393
|
-
...
|
394
|
-
|
395
|
-
@typing.overload
|
396
|
-
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]]]:
|
397
|
-
"""
|
398
|
-
Specifies the PyPI packages for the step.
|
399
|
-
|
400
|
-
Information in this decorator will augment any
|
401
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
402
|
-
you can use `@pypi_base` to set packages required by all
|
403
|
-
steps and use `@pypi` to specify step-specific overrides.
|
404
|
-
"""
|
405
|
-
...
|
406
|
-
|
407
|
-
@typing.overload
|
408
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
409
|
-
...
|
410
|
-
|
411
|
-
@typing.overload
|
412
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
413
|
-
...
|
414
|
-
|
415
|
-
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):
|
416
|
-
"""
|
417
|
-
Specifies the PyPI packages for the step.
|
418
|
-
|
419
|
-
Information in this decorator will augment any
|
420
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
421
|
-
you can use `@pypi_base` to set packages required by all
|
422
|
-
steps and use `@pypi` to specify step-specific overrides.
|
423
|
-
"""
|
424
|
-
...
|
425
|
-
|
426
377
|
@typing.overload
|
427
378
|
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]]]:
|
428
379
|
"""
|
@@ -462,6 +413,35 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
462
413
|
"""
|
463
414
|
...
|
464
415
|
|
416
|
+
@typing.overload
|
417
|
+
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]]]:
|
418
|
+
"""
|
419
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
420
|
+
the execution of a step.
|
421
|
+
"""
|
422
|
+
...
|
423
|
+
|
424
|
+
@typing.overload
|
425
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
426
|
+
...
|
427
|
+
|
428
|
+
@typing.overload
|
429
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
430
|
+
...
|
431
|
+
|
432
|
+
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]]] = []):
|
433
|
+
"""
|
434
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
435
|
+
the execution of a step.
|
436
|
+
"""
|
437
|
+
...
|
438
|
+
|
439
|
+
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] = [], labels: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_LABELS', annotations: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_ANNOTATIONS', 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]]]:
|
440
|
+
"""
|
441
|
+
Specifies that this step should execute on Kubernetes.
|
442
|
+
"""
|
443
|
+
...
|
444
|
+
|
465
445
|
@typing.overload
|
466
446
|
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]]]:
|
467
447
|
"""
|
@@ -483,26 +463,40 @@ def checkpoint(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None
|
|
483
463
|
"""
|
484
464
|
...
|
485
465
|
|
486
|
-
def
|
466
|
+
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]]]:
|
487
467
|
"""
|
488
|
-
|
468
|
+
Decorator that helps cache, version and store models/datasets from huggingface hub.
|
489
469
|
"""
|
490
470
|
...
|
491
471
|
|
492
472
|
@typing.overload
|
493
|
-
def
|
473
|
+
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]]]:
|
494
474
|
"""
|
495
|
-
|
475
|
+
Specifies the Conda environment for the step.
|
476
|
+
|
477
|
+
Information in this decorator will augment any
|
478
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
479
|
+
you can use `@conda_base` to set packages required by all
|
480
|
+
steps and use `@conda` to specify step-specific overrides.
|
496
481
|
"""
|
497
482
|
...
|
498
483
|
|
499
484
|
@typing.overload
|
500
|
-
def
|
485
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
501
486
|
...
|
502
487
|
|
503
|
-
|
488
|
+
@typing.overload
|
489
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
490
|
+
...
|
491
|
+
|
492
|
+
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):
|
504
493
|
"""
|
505
|
-
|
494
|
+
Specifies the Conda environment for the step.
|
495
|
+
|
496
|
+
Information in this decorator will augment any
|
497
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
498
|
+
you can use `@conda_base` to set packages required by all
|
499
|
+
steps and use `@conda` to specify step-specific overrides.
|
506
500
|
"""
|
507
501
|
...
|
508
502
|
|
@@ -531,6 +525,21 @@ def card(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
|
|
531
525
|
"""
|
532
526
|
...
|
533
527
|
|
528
|
+
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]]]:
|
529
|
+
"""
|
530
|
+
Specifies that this step should execute on DGX cloud.
|
531
|
+
"""
|
532
|
+
...
|
533
|
+
|
534
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
535
|
+
"""
|
536
|
+
Specifies what flows belong to the same project.
|
537
|
+
|
538
|
+
A project-specific namespace is created for all flows that
|
539
|
+
use the same `@project(name)`.
|
540
|
+
"""
|
541
|
+
...
|
542
|
+
|
534
543
|
@typing.overload
|
535
544
|
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]]:
|
536
545
|
"""
|
@@ -604,15 +613,6 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
604
613
|
"""
|
605
614
|
...
|
606
615
|
|
607
|
-
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
608
|
-
"""
|
609
|
-
Specifies what flows belong to the same project.
|
610
|
-
|
611
|
-
A project-specific namespace is created for all flows that
|
612
|
-
use the same `@project(name)`.
|
613
|
-
"""
|
614
|
-
...
|
615
|
-
|
616
616
|
@typing.overload
|
617
617
|
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]]:
|
618
618
|
"""
|
@@ -632,50 +632,26 @@ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly:
|
|
632
632
|
"""
|
633
633
|
...
|
634
634
|
|
635
|
-
def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
636
|
-
"""
|
637
|
-
This decorator is used to run NIM containers in Metaflow tasks as sidecars.
|
638
|
-
|
639
|
-
User code call
|
640
|
-
-----------
|
641
|
-
@nim(
|
642
|
-
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
643
|
-
backend='managed'
|
644
|
-
)
|
645
|
-
|
646
|
-
Valid backend options
|
647
|
-
---------------------
|
648
|
-
- 'managed': Outerbounds selects a compute provider based on the model.
|
649
|
-
- 🚧 'dataplane': Run in your account.
|
650
|
-
|
651
|
-
Valid model options
|
652
|
-
----------------
|
653
|
-
- 'meta/llama3-8b-instruct': 8B parameter model
|
654
|
-
- 'meta/llama3-70b-instruct': 70B parameter model
|
655
|
-
- Upon request, any model here: https://nvcf.ngc.nvidia.com/functions?filter=nvidia-functions
|
656
|
-
"""
|
657
|
-
...
|
658
|
-
|
659
635
|
@typing.overload
|
660
|
-
def
|
636
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
661
637
|
"""
|
662
|
-
Specifies the
|
638
|
+
Specifies the PyPI packages for all steps of the flow.
|
663
639
|
|
664
|
-
Use `@
|
665
|
-
steps and use `@
|
640
|
+
Use `@pypi_base` to set common packages required by all
|
641
|
+
steps and use `@pypi` to specify step-specific overrides.
|
666
642
|
"""
|
667
643
|
...
|
668
644
|
|
669
645
|
@typing.overload
|
670
|
-
def
|
646
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
671
647
|
...
|
672
648
|
|
673
|
-
def
|
649
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
674
650
|
"""
|
675
|
-
Specifies the
|
651
|
+
Specifies the PyPI packages for all steps of the flow.
|
676
652
|
|
677
|
-
Use `@
|
678
|
-
steps and use `@
|
653
|
+
Use `@pypi_base` to set common packages required by all
|
654
|
+
steps and use `@pypi` to specify step-specific overrides.
|
679
655
|
"""
|
680
656
|
...
|
681
657
|
|
@@ -770,33 +746,57 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
|
|
770
746
|
"""
|
771
747
|
...
|
772
748
|
|
773
|
-
|
749
|
+
@typing.overload
|
750
|
+
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]]:
|
774
751
|
"""
|
775
|
-
|
776
|
-
|
752
|
+
Specifies the Conda environment for all steps of the flow.
|
753
|
+
|
754
|
+
Use `@conda_base` to set common libraries required by all
|
755
|
+
steps and use `@conda` to specify step-specific additions.
|
777
756
|
"""
|
778
757
|
...
|
779
758
|
|
780
759
|
@typing.overload
|
781
|
-
def
|
760
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
761
|
+
...
|
762
|
+
|
763
|
+
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):
|
782
764
|
"""
|
783
|
-
Specifies the
|
765
|
+
Specifies the Conda environment for all steps of the flow.
|
784
766
|
|
785
|
-
Use `@
|
786
|
-
steps and use `@
|
767
|
+
Use `@conda_base` to set common libraries required by all
|
768
|
+
steps and use `@conda` to specify step-specific additions.
|
787
769
|
"""
|
788
770
|
...
|
789
771
|
|
790
|
-
|
791
|
-
|
772
|
+
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]]:
|
773
|
+
"""
|
774
|
+
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.
|
775
|
+
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.
|
776
|
+
"""
|
792
777
|
...
|
793
778
|
|
794
|
-
def
|
779
|
+
def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
795
780
|
"""
|
796
|
-
|
781
|
+
This decorator is used to run NIM containers in Metaflow tasks as sidecars.
|
797
782
|
|
798
|
-
|
799
|
-
|
783
|
+
User code call
|
784
|
+
-----------
|
785
|
+
@nim(
|
786
|
+
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
787
|
+
backend='managed'
|
788
|
+
)
|
789
|
+
|
790
|
+
Valid backend options
|
791
|
+
---------------------
|
792
|
+
- 'managed': Outerbounds selects a compute provider based on the model.
|
793
|
+
- 🚧 'dataplane': Run in your account.
|
794
|
+
|
795
|
+
Valid model options
|
796
|
+
----------------
|
797
|
+
- 'meta/llama3-8b-instruct': 8B parameter model
|
798
|
+
- 'meta/llama3-70b-instruct': 70B parameter model
|
799
|
+
- Upon request, any model here: https://nvcf.ngc.nvidia.com/functions?filter=nvidia-functions
|
800
800
|
"""
|
801
801
|
...
|
802
802
|
|
metaflow-stubs/cards.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.13.
|
4
|
-
# Generated on 2025-01-
|
3
|
+
# MF version: 2.13.4.1+obcheckpoint(0.1.6);ob(v1) #
|
4
|
+
# Generated on 2025-01-15T20:56:03.632361 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -17,6 +17,7 @@ from .plugins.cards.card_modules.components import Error as Error
|
|
17
17
|
from .plugins.cards.card_modules.components import Markdown as Markdown
|
18
18
|
from .plugins.cards.card_modules.components import VegaChart as VegaChart
|
19
19
|
from .plugins.cards.card_modules.components import ProgressBar as ProgressBar
|
20
|
+
from .plugins.cards.card_modules.components import PythonCode as PythonCode
|
20
21
|
from .plugins.cards.card_modules.basic import DefaultCard as DefaultCard
|
21
22
|
from .plugins.cards.card_modules.basic import PageComponent as PageComponent
|
22
23
|
from .plugins.cards.card_modules.basic import ErrorCard as ErrorCard
|
metaflow-stubs/cli.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.13.
|
4
|
-
# Generated on 2025-01-
|
3
|
+
# MF version: 2.13.4.1+obcheckpoint(0.1.6);ob(v1) #
|
4
|
+
# Generated on 2025-01-15T20:56:03.646107 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.13.
|
4
|
-
# Generated on 2025-01-
|
3
|
+
# MF version: 2.13.4.1+obcheckpoint(0.1.6);ob(v1) #
|
4
|
+
# Generated on 2025-01-15T20:56:03.644844 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.13.
|
4
|
-
# Generated on 2025-01-
|
3
|
+
# MF version: 2.13.4.1+obcheckpoint(0.1.6);ob(v1) #
|
4
|
+
# Generated on 2025-01-15T20:56:03.670295 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.13.
|
4
|
-
# Generated on 2025-01-
|
3
|
+
# MF version: 2.13.4.1+obcheckpoint(0.1.6);ob(v1) #
|
4
|
+
# Generated on 2025-01-15T20:56:03.635570 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|