ob-metaflow-stubs 6.0.3.148__py2.py3-none-any.whl → 6.0.3.150__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- metaflow-stubs/__init__.pyi +574 -574
- metaflow-stubs/cards.pyi +2 -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 +6 -6
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +6 -6
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +4 -4
- 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 +3 -3
- metaflow-stubs/metadata_provider/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -2
- metaflow-stubs/metaflow_current.pyi +86 -86
- 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 +4 -4
- 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 +5 -5
- 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 +5 -5
- 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 +4 -4
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +4 -4
- 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 +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +3 -3
- 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/card_utilities/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/injector.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/ollama.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 +4 -4
- metaflow-stubs/plugins/__init__.pyi +10 -10
- 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 +3 -3
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +4 -4
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +4 -4
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +7 -5
- 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 +4 -4
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +4 -4
- 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 +6 -6
- metaflow-stubs/plugins/cards/card_client.pyi +3 -3
- metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
- metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
- metaflow-stubs/plugins/debug_logger.pyi +2 -2
- metaflow-stubs/plugins/debug_monitor.pyi +2 -2
- metaflow-stubs/plugins/environment_decorator.pyi +2 -2
- metaflow-stubs/plugins/events_decorator.pyi +2 -2
- metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
- metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
- metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +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 +3 -3
- 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/kubernetes/spot_monitor_sidecar.pyi +2 -2
- metaflow-stubs/plugins/ollama/__init__.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 +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
- metaflow-stubs/plugins/pypi/parsers.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
- 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 +3 -3
- 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 +32 -30
- metaflow-stubs/runner/deployer_impl.pyi +3 -3
- metaflow-stubs/runner/metaflow_runner.pyi +5 -5
- 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 +3 -3
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- metaflow-stubs/user_configs/__init__.pyi +2 -2
- metaflow-stubs/user_configs/config_decorators.pyi +6 -6
- metaflow-stubs/user_configs/config_options.pyi +4 -4
- metaflow-stubs/user_configs/config_parameters.pyi +7 -7
- {ob_metaflow_stubs-6.0.3.148.dist-info → ob_metaflow_stubs-6.0.3.150.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.150.dist-info/RECORD +198 -0
- ob_metaflow_stubs-6.0.3.148.dist-info/RECORD +0 -198
- {ob_metaflow_stubs-6.0.3.148.dist-info → ob_metaflow_stubs-6.0.3.150.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.148.dist-info → ob_metaflow_stubs-6.0.3.150.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.15.
|
4
|
-
# Generated on 2025-03-
|
3
|
+
# MF version: 2.15.5.1+obcheckpoint(0.1.9);ob(v1) #
|
4
|
+
# Generated on 2025-03-13T17:31:16.313988 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -35,17 +35,17 @@ from .user_configs.config_parameters import ConfigValue as ConfigValue
|
|
35
35
|
from .user_configs.config_parameters import config_expr as config_expr
|
36
36
|
from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
|
37
37
|
from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
|
38
|
-
from . import cards as cards
|
39
38
|
from . import tuple_util as tuple_util
|
39
|
+
from . import cards as cards
|
40
40
|
from . import events as events
|
41
41
|
from . import runner as runner
|
42
42
|
from . import plugins as plugins
|
43
43
|
from .mf_extensions.outerbounds.toplevel.global_aliases_for_metaflow_package import S3 as S3
|
44
44
|
from . import includefile as includefile
|
45
45
|
from .includefile import IncludeFile as IncludeFile
|
46
|
-
from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
|
47
|
-
from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
|
48
46
|
from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
|
47
|
+
from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
|
48
|
+
from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
|
49
49
|
from . import client as client
|
50
50
|
from .client.core import namespace as namespace
|
51
51
|
from .client.core import get_namespace as get_namespace
|
@@ -149,164 +149,220 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
149
149
|
"""
|
150
150
|
...
|
151
151
|
|
152
|
-
|
152
|
+
@typing.overload
|
153
|
+
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]]]:
|
153
154
|
"""
|
154
|
-
|
155
|
-
|
156
|
-
User code call
|
157
|
-
-----------
|
158
|
-
@nim(
|
159
|
-
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
160
|
-
backend='managed'
|
161
|
-
)
|
162
|
-
|
163
|
-
Valid backend options
|
164
|
-
---------------------
|
165
|
-
- 'managed': Outerbounds selects a compute provider based on the model.
|
155
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
166
156
|
|
167
|
-
|
168
|
-
----------------
|
169
|
-
- 'meta/llama3-8b-instruct': 8B parameter model
|
170
|
-
- 'meta/llama3-70b-instruct': 70B parameter model
|
171
|
-
- any model here: https://nvcf.ngc.nvidia.com/functions?filter=nvidia-functions
|
157
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
172
158
|
|
173
159
|
|
174
160
|
Parameters
|
175
161
|
----------
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
162
|
+
type : str, default 'default'
|
163
|
+
Card type.
|
164
|
+
id : str, optional, default None
|
165
|
+
If multiple cards are present, use this id to identify this card.
|
166
|
+
options : Dict[str, Any], default {}
|
167
|
+
Options passed to the card. The contents depend on the card type.
|
168
|
+
timeout : int, default 45
|
169
|
+
Interrupt reporting if it takes more than this many seconds.
|
182
170
|
"""
|
183
171
|
...
|
184
172
|
|
185
|
-
|
173
|
+
@typing.overload
|
174
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
175
|
+
...
|
176
|
+
|
177
|
+
@typing.overload
|
178
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
179
|
+
...
|
180
|
+
|
181
|
+
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):
|
186
182
|
"""
|
187
|
-
|
188
|
-
|
189
|
-
User code call
|
190
|
-
-----------
|
191
|
-
@ollama(
|
192
|
-
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
193
|
-
backend='local'
|
194
|
-
)
|
195
|
-
|
196
|
-
Valid backend options
|
197
|
-
---------------------
|
198
|
-
- 'local': Run as a separate process on the local task machine.
|
199
|
-
- (TODO) 'managed': Outerbounds hosts and selects compute provider.
|
200
|
-
- (TODO) 'remote': Spin up separate instance to serve Ollama models.
|
183
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
201
184
|
|
202
|
-
|
203
|
-
----------------
|
204
|
-
- 'llama3.2'
|
205
|
-
- 'llama3.3'
|
206
|
-
- any model here https://ollama.com/search
|
185
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
207
186
|
|
208
187
|
|
209
188
|
Parameters
|
210
189
|
----------
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
190
|
+
type : str, default 'default'
|
191
|
+
Card type.
|
192
|
+
id : str, optional, default None
|
193
|
+
If multiple cards are present, use this id to identify this card.
|
194
|
+
options : Dict[str, Any], default {}
|
195
|
+
Options passed to the card. The contents depend on the card type.
|
196
|
+
timeout : int, default 45
|
197
|
+
Interrupt reporting if it takes more than this many seconds.
|
215
198
|
"""
|
216
199
|
...
|
217
200
|
|
218
201
|
@typing.overload
|
219
|
-
def
|
202
|
+
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]]]:
|
220
203
|
"""
|
221
|
-
|
222
|
-
|
204
|
+
Specifies the Conda environment for the step.
|
205
|
+
|
206
|
+
Information in this decorator will augment any
|
207
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
208
|
+
you can use `@conda_base` to set packages required by all
|
209
|
+
steps and use `@conda` to specify step-specific overrides.
|
210
|
+
|
211
|
+
|
212
|
+
Parameters
|
213
|
+
----------
|
214
|
+
packages : Dict[str, str], default {}
|
215
|
+
Packages to use for this step. The key is the name of the package
|
216
|
+
and the value is the version to use.
|
217
|
+
libraries : Dict[str, str], default {}
|
218
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
219
|
+
python : str, optional, default None
|
220
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
221
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
222
|
+
disabled : bool, default False
|
223
|
+
If set to True, disables @conda.
|
223
224
|
"""
|
224
225
|
...
|
225
226
|
|
226
227
|
@typing.overload
|
227
|
-
def
|
228
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
228
229
|
...
|
229
230
|
|
230
|
-
|
231
|
-
|
232
|
-
Decorator prototype for all step decorators. This function gets specialized
|
233
|
-
and imported for all decorators types by _import_plugin_decorators().
|
234
|
-
"""
|
231
|
+
@typing.overload
|
232
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
235
233
|
...
|
236
234
|
|
237
|
-
def
|
235
|
+
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):
|
238
236
|
"""
|
239
|
-
|
237
|
+
Specifies the Conda environment for the step.
|
238
|
+
|
239
|
+
Information in this decorator will augment any
|
240
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
241
|
+
you can use `@conda_base` to set packages required by all
|
242
|
+
steps and use `@conda` to specify step-specific overrides.
|
240
243
|
|
241
244
|
|
242
245
|
Parameters
|
243
246
|
----------
|
244
|
-
|
245
|
-
|
247
|
+
packages : Dict[str, str], default {}
|
248
|
+
Packages to use for this step. The key is the name of the package
|
249
|
+
and the value is the version to use.
|
250
|
+
libraries : Dict[str, str], default {}
|
251
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
252
|
+
python : str, optional, default None
|
253
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
254
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
255
|
+
disabled : bool, default False
|
256
|
+
If set to True, disables @conda.
|
257
|
+
"""
|
258
|
+
...
|
259
|
+
|
260
|
+
@typing.overload
|
261
|
+
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]]]:
|
262
|
+
"""
|
263
|
+
Enables checkpointing for a step.
|
246
264
|
|
247
|
-
load: Union[List[str], List[Tuple[Dict, str]], List[Tuple[str, str]], List[Dict], None]
|
248
|
-
The list of repos (models/datasets) to load.
|
249
265
|
|
250
|
-
Loaded repos can be accessed via `current.huggingface_hub.loaded`. If load is set, then the following happens:
|
251
266
|
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
267
|
+
Parameters
|
268
|
+
----------
|
269
|
+
load_policy : str, default: "fresh"
|
270
|
+
The policy for loading the checkpoint. The following policies are supported:
|
271
|
+
- "eager": Loads the the latest available checkpoint within the namespace.
|
272
|
+
With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
|
273
|
+
will be loaded at the start of the task.
|
274
|
+
- "none": Do not load any checkpoint
|
275
|
+
- "fresh": Loads the lastest checkpoint created within the running Task.
|
276
|
+
This mode helps loading checkpoints across various retry attempts of the same task.
|
277
|
+
With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
|
278
|
+
created within the task will be loaded when the task is retries execution on failure.
|
256
279
|
|
257
|
-
|
258
|
-
|
280
|
+
temp_dir_root : str, default: None
|
281
|
+
The root directory under which `current.checkpoint.directory` will be created.
|
259
282
|
"""
|
260
283
|
...
|
261
284
|
|
262
285
|
@typing.overload
|
263
|
-
def
|
286
|
+
def checkpoint(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
287
|
+
...
|
288
|
+
|
289
|
+
@typing.overload
|
290
|
+
def checkpoint(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
291
|
+
...
|
292
|
+
|
293
|
+
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):
|
264
294
|
"""
|
265
|
-
|
295
|
+
Enables checkpointing for a step.
|
266
296
|
|
267
|
-
The decorator will create an optional artifact, specified by `var`, which
|
268
|
-
contains the exception raised. You can use it to detect the presence
|
269
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
270
|
-
are missing.
|
271
297
|
|
272
298
|
|
273
299
|
Parameters
|
274
300
|
----------
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
301
|
+
load_policy : str, default: "fresh"
|
302
|
+
The policy for loading the checkpoint. The following policies are supported:
|
303
|
+
- "eager": Loads the the latest available checkpoint within the namespace.
|
304
|
+
With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
|
305
|
+
will be loaded at the start of the task.
|
306
|
+
- "none": Do not load any checkpoint
|
307
|
+
- "fresh": Loads the lastest checkpoint created within the running Task.
|
308
|
+
This mode helps loading checkpoints across various retry attempts of the same task.
|
309
|
+
With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
|
310
|
+
created within the task will be loaded when the task is retries execution on failure.
|
311
|
+
|
312
|
+
temp_dir_root : str, default: None
|
313
|
+
The root directory under which `current.checkpoint.directory` will be created.
|
281
314
|
"""
|
282
315
|
...
|
283
316
|
|
284
317
|
@typing.overload
|
285
|
-
def
|
318
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
319
|
+
"""
|
320
|
+
Decorator prototype for all step decorators. This function gets specialized
|
321
|
+
and imported for all decorators types by _import_plugin_decorators().
|
322
|
+
"""
|
286
323
|
...
|
287
324
|
|
288
325
|
@typing.overload
|
289
|
-
def
|
326
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
290
327
|
...
|
291
328
|
|
292
|
-
def
|
329
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
293
330
|
"""
|
294
|
-
|
331
|
+
Decorator prototype for all step decorators. This function gets specialized
|
332
|
+
and imported for all decorators types by _import_plugin_decorators().
|
333
|
+
"""
|
334
|
+
...
|
335
|
+
|
336
|
+
def nim(*, models: "list[NIM]", backend: str, queue_timeout: int) -> 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]]]:
|
337
|
+
"""
|
338
|
+
This decorator is used to run NIM containers in Metaflow tasks as sidecars.
|
295
339
|
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
340
|
+
User code call
|
341
|
+
-----------
|
342
|
+
@nim(
|
343
|
+
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
344
|
+
backend='managed'
|
345
|
+
)
|
346
|
+
|
347
|
+
Valid backend options
|
348
|
+
---------------------
|
349
|
+
- 'managed': Outerbounds selects a compute provider based on the model.
|
350
|
+
|
351
|
+
Valid model options
|
352
|
+
----------------
|
353
|
+
- 'meta/llama3-8b-instruct': 8B parameter model
|
354
|
+
- 'meta/llama3-70b-instruct': 70B parameter model
|
355
|
+
- any model here: https://nvcf.ngc.nvidia.com/functions?filter=nvidia-functions
|
300
356
|
|
301
357
|
|
302
358
|
Parameters
|
303
359
|
----------
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
360
|
+
models: list[NIM]
|
361
|
+
List of NIM containers running models in sidecars.
|
362
|
+
backend: str
|
363
|
+
Compute provider to run the NIM container.
|
364
|
+
queue_timeout : int
|
365
|
+
Time to keep the job in NVCF's queue.
|
310
366
|
"""
|
311
367
|
...
|
312
368
|
|
@@ -365,272 +421,130 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
365
421
|
"""
|
366
422
|
...
|
367
423
|
|
368
|
-
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]]]:
|
369
|
-
"""
|
370
|
-
Specifies that this step should execute on Kubernetes.
|
371
|
-
|
372
|
-
|
373
|
-
Parameters
|
374
|
-
----------
|
375
|
-
cpu : int, default 1
|
376
|
-
Number of CPUs required for this step. If `@resources` is
|
377
|
-
also present, the maximum value from all decorators is used.
|
378
|
-
memory : int, default 4096
|
379
|
-
Memory size (in MB) required for this step. If
|
380
|
-
`@resources` is also present, the maximum value from all decorators is
|
381
|
-
used.
|
382
|
-
disk : int, default 10240
|
383
|
-
Disk size (in MB) required for this step. If
|
384
|
-
`@resources` is also present, the maximum value from all decorators is
|
385
|
-
used.
|
386
|
-
image : str, optional, default None
|
387
|
-
Docker image to use when launching on Kubernetes. If not specified, and
|
388
|
-
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
389
|
-
not, a default Docker image mapping to the current version of Python is used.
|
390
|
-
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
391
|
-
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
392
|
-
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
393
|
-
Kubernetes service account to use when launching pod in Kubernetes.
|
394
|
-
secrets : List[str], optional, default None
|
395
|
-
Kubernetes secrets to use when launching pod in Kubernetes. These
|
396
|
-
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
397
|
-
in Metaflow configuration.
|
398
|
-
node_selector: Union[Dict[str,str], str], optional, default None
|
399
|
-
Kubernetes node selector(s) to apply to the pod running the task.
|
400
|
-
Can be passed in as a comma separated string of values e.g.
|
401
|
-
'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
|
402
|
-
{'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
|
403
|
-
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
404
|
-
Kubernetes namespace to use when launching pod in Kubernetes.
|
405
|
-
gpu : int, optional, default None
|
406
|
-
Number of GPUs required for this step. A value of zero implies that
|
407
|
-
the scheduled node should not have GPUs.
|
408
|
-
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
409
|
-
The vendor of the GPUs to be used for this step.
|
410
|
-
tolerations : List[str], default []
|
411
|
-
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
412
|
-
Kubernetes tolerations to use when launching pod in Kubernetes.
|
413
|
-
labels: Dict[str, str], default: METAFLOW_KUBERNETES_LABELS
|
414
|
-
Kubernetes labels to use when launching pod in Kubernetes.
|
415
|
-
annotations: Dict[str, str], default: METAFLOW_KUBERNETES_ANNOTATIONS
|
416
|
-
Kubernetes annotations to use when launching pod in Kubernetes.
|
417
|
-
use_tmpfs : bool, default False
|
418
|
-
This enables an explicit tmpfs mount for this step.
|
419
|
-
tmpfs_tempdir : bool, default True
|
420
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
421
|
-
tmpfs_size : int, optional, default: None
|
422
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
423
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
424
|
-
memory allocated for this step.
|
425
|
-
tmpfs_path : str, optional, default /metaflow_temp
|
426
|
-
Path to tmpfs mount for this step.
|
427
|
-
persistent_volume_claims : Dict[str, str], optional, default None
|
428
|
-
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
429
|
-
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
430
|
-
shared_memory: int, optional
|
431
|
-
Shared memory size (in MiB) required for this step
|
432
|
-
port: int, optional
|
433
|
-
Port number to specify in the Kubernetes job object
|
434
|
-
compute_pool : str, optional, default None
|
435
|
-
Compute pool to be used for for this step.
|
436
|
-
If not specified, any accessible compute pool within the perimeter is used.
|
437
|
-
hostname_resolution_timeout: int, default 10 * 60
|
438
|
-
Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
|
439
|
-
Only applicable when @parallel is used.
|
440
|
-
qos: str, default: Burstable
|
441
|
-
Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
|
442
|
-
"""
|
443
|
-
...
|
444
|
-
|
445
424
|
@typing.overload
|
446
|
-
def
|
425
|
+
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]]]:
|
447
426
|
"""
|
448
|
-
Specifies the
|
427
|
+
Specifies the PyPI packages for the step.
|
449
428
|
|
450
429
|
Information in this decorator will augment any
|
451
|
-
attributes set in the `@
|
452
|
-
you can use `@
|
453
|
-
steps and use `@
|
430
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
431
|
+
you can use `@pypi_base` to set packages required by all
|
432
|
+
steps and use `@pypi` to specify step-specific overrides.
|
454
433
|
|
455
434
|
|
456
435
|
Parameters
|
457
436
|
----------
|
458
|
-
packages : Dict[str, str], default {}
|
437
|
+
packages : Dict[str, str], default: {}
|
459
438
|
Packages to use for this step. The key is the name of the package
|
460
439
|
and the value is the version to use.
|
461
|
-
|
462
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
463
|
-
python : str, optional, default None
|
440
|
+
python : str, optional, default: None
|
464
441
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
465
442
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
466
|
-
disabled : bool, default False
|
467
|
-
If set to True, disables @conda.
|
468
443
|
"""
|
469
444
|
...
|
470
445
|
|
471
446
|
@typing.overload
|
472
|
-
def
|
447
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
473
448
|
...
|
474
449
|
|
475
450
|
@typing.overload
|
476
|
-
def
|
451
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
477
452
|
...
|
478
453
|
|
479
|
-
def
|
454
|
+
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):
|
480
455
|
"""
|
481
|
-
Specifies the
|
456
|
+
Specifies the PyPI packages for the step.
|
482
457
|
|
483
458
|
Information in this decorator will augment any
|
484
|
-
attributes set in the `@
|
485
|
-
you can use `@
|
486
|
-
steps and use `@
|
459
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
460
|
+
you can use `@pypi_base` to set packages required by all
|
461
|
+
steps and use `@pypi` to specify step-specific overrides.
|
487
462
|
|
488
463
|
|
489
464
|
Parameters
|
490
465
|
----------
|
491
|
-
packages : Dict[str, str], default {}
|
466
|
+
packages : Dict[str, str], default: {}
|
492
467
|
Packages to use for this step. The key is the name of the package
|
493
468
|
and the value is the version to use.
|
494
|
-
|
495
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
496
|
-
python : str, optional, default None
|
469
|
+
python : str, optional, default: None
|
497
470
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
498
471
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
499
|
-
disabled : bool, default False
|
500
|
-
If set to True, disables @conda.
|
501
|
-
"""
|
502
|
-
...
|
503
|
-
|
504
|
-
def nvidia(*, gpu: int, gpu_type: str, queue_timeout: int) -> 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]]]:
|
505
|
-
"""
|
506
|
-
Specifies that this step should execute on DGX cloud.
|
507
|
-
|
508
|
-
|
509
|
-
Parameters
|
510
|
-
----------
|
511
|
-
gpu : int
|
512
|
-
Number of GPUs to use.
|
513
|
-
gpu_type : str
|
514
|
-
Type of Nvidia GPU to use.
|
515
|
-
queue_timeout : int
|
516
|
-
Time to keep the job in NVCF's queue.
|
517
472
|
"""
|
518
473
|
...
|
519
474
|
|
520
475
|
@typing.overload
|
521
|
-
def
|
476
|
+
def catch(*, var: typing.Optional[str] = None, print_exception: bool = True) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
522
477
|
"""
|
523
|
-
|
478
|
+
Specifies that the step will success under all circumstances.
|
524
479
|
|
525
|
-
|
480
|
+
The decorator will create an optional artifact, specified by `var`, which
|
481
|
+
contains the exception raised. You can use it to detect the presence
|
482
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
483
|
+
are missing.
|
526
484
|
|
527
485
|
|
528
486
|
Parameters
|
529
487
|
----------
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
timeout : int, default 45
|
537
|
-
Interrupt reporting if it takes more than this many seconds.
|
488
|
+
var : str, optional, default None
|
489
|
+
Name of the artifact in which to store the caught exception.
|
490
|
+
If not specified, the exception is not stored.
|
491
|
+
print_exception : bool, default True
|
492
|
+
Determines whether or not the exception is printed to
|
493
|
+
stdout when caught.
|
538
494
|
"""
|
539
495
|
...
|
540
496
|
|
541
497
|
@typing.overload
|
542
|
-
def
|
498
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
543
499
|
...
|
544
500
|
|
545
501
|
@typing.overload
|
546
|
-
def
|
502
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
547
503
|
...
|
548
504
|
|
549
|
-
def
|
505
|
+
def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
|
550
506
|
"""
|
551
|
-
|
507
|
+
Specifies that the step will success under all circumstances.
|
552
508
|
|
553
|
-
|
509
|
+
The decorator will create an optional artifact, specified by `var`, which
|
510
|
+
contains the exception raised. You can use it to detect the presence
|
511
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
512
|
+
are missing.
|
554
513
|
|
555
514
|
|
556
515
|
Parameters
|
557
516
|
----------
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
timeout : int, default 45
|
565
|
-
Interrupt reporting if it takes more than this many seconds.
|
566
|
-
"""
|
567
|
-
...
|
568
|
-
|
569
|
-
@typing.overload
|
570
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
571
|
-
"""
|
572
|
-
Internal decorator to support Fast bakery
|
573
|
-
"""
|
574
|
-
...
|
575
|
-
|
576
|
-
@typing.overload
|
577
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
578
|
-
...
|
579
|
-
|
580
|
-
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
581
|
-
"""
|
582
|
-
Internal decorator to support Fast bakery
|
517
|
+
var : str, optional, default None
|
518
|
+
Name of the artifact in which to store the caught exception.
|
519
|
+
If not specified, the exception is not stored.
|
520
|
+
print_exception : bool, default True
|
521
|
+
Determines whether or not the exception is printed to
|
522
|
+
stdout when caught.
|
583
523
|
"""
|
584
524
|
...
|
585
525
|
|
586
|
-
|
587
|
-
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]]]:
|
526
|
+
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]]]:
|
588
527
|
"""
|
589
|
-
|
590
|
-
|
591
|
-
Information in this decorator will augment any
|
592
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
593
|
-
you can use `@pypi_base` to set packages required by all
|
594
|
-
steps and use `@pypi` to specify step-specific overrides.
|
528
|
+
Decorator that helps cache, version and store models/datasets from huggingface hub.
|
595
529
|
|
596
530
|
|
597
531
|
Parameters
|
598
532
|
----------
|
599
|
-
|
600
|
-
|
601
|
-
and the value is the version to use.
|
602
|
-
python : str, optional, default: None
|
603
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
604
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
605
|
-
"""
|
606
|
-
...
|
607
|
-
|
608
|
-
@typing.overload
|
609
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
610
|
-
...
|
611
|
-
|
612
|
-
@typing.overload
|
613
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
614
|
-
...
|
615
|
-
|
616
|
-
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):
|
617
|
-
"""
|
618
|
-
Specifies the PyPI packages for the step.
|
533
|
+
temp_dir_root : str, optional
|
534
|
+
The root directory that will hold the temporary directory where objects will be downloaded.
|
619
535
|
|
620
|
-
|
621
|
-
|
622
|
-
you can use `@pypi_base` to set packages required by all
|
623
|
-
steps and use `@pypi` to specify step-specific overrides.
|
536
|
+
load: Union[List[str], List[Tuple[Dict, str]], List[Tuple[str, str]], List[Dict], None]
|
537
|
+
The list of repos (models/datasets) to load.
|
624
538
|
|
539
|
+
Loaded repos can be accessed via `current.huggingface_hub.loaded`. If load is set, then the following happens:
|
625
540
|
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
541
|
+
- If repo (model/dataset) is not found in the datastore:
|
542
|
+
- Downloads the repo from Hugging Face Hub to a temporary directory (or uses specified path) for local access
|
543
|
+
- Stores it in Metaflow's datastore (s3/gcs/azure etc.) with a unique name based on repo_type/repo_id
|
544
|
+
- All HF models loaded for a `@step` will be cached separately under flow/step/namespace.
|
545
|
+
|
546
|
+
- If repo is found in the datastore:
|
547
|
+
- Loads it directly from datastore to local path (can be temporary directory or specified path)
|
634
548
|
"""
|
635
549
|
...
|
636
550
|
|
@@ -726,119 +640,148 @@ def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
726
640
|
"""
|
727
641
|
...
|
728
642
|
|
729
|
-
|
730
|
-
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]]]:
|
643
|
+
def nvidia(*, gpu: int, gpu_type: str, queue_timeout: int) -> 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]]]:
|
731
644
|
"""
|
732
|
-
Specifies
|
733
|
-
|
734
|
-
This decorator is useful if this step may hang indefinitely.
|
735
|
-
|
736
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
737
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
738
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
739
|
-
|
740
|
-
Note that all the values specified in parameters are added together so if you specify
|
741
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
645
|
+
Specifies that this step should execute on DGX cloud.
|
742
646
|
|
743
647
|
|
744
648
|
Parameters
|
745
649
|
----------
|
746
|
-
|
747
|
-
Number of
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
650
|
+
gpu : int
|
651
|
+
Number of GPUs to use.
|
652
|
+
gpu_type : str
|
653
|
+
Type of Nvidia GPU to use.
|
654
|
+
queue_timeout : int
|
655
|
+
Time to keep the job in NVCF's queue.
|
752
656
|
"""
|
753
657
|
...
|
754
658
|
|
755
|
-
|
756
|
-
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
757
|
-
...
|
758
|
-
|
759
|
-
@typing.overload
|
760
|
-
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
761
|
-
...
|
762
|
-
|
763
|
-
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):
|
659
|
+
def ollama(*, models: "list[Ollama]", backend: 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]]]:
|
764
660
|
"""
|
765
|
-
|
661
|
+
This decorator is used to run Ollama APIs as Metaflow task sidecars.
|
766
662
|
|
767
|
-
|
663
|
+
User code call
|
664
|
+
-----------
|
665
|
+
@ollama(
|
666
|
+
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
667
|
+
backend='local'
|
668
|
+
)
|
768
669
|
|
769
|
-
|
770
|
-
|
771
|
-
|
670
|
+
Valid backend options
|
671
|
+
---------------------
|
672
|
+
- 'local': Run as a separate process on the local task machine.
|
673
|
+
- (TODO) 'managed': Outerbounds hosts and selects compute provider.
|
674
|
+
- (TODO) 'remote': Spin up separate instance to serve Ollama models.
|
772
675
|
|
773
|
-
|
774
|
-
|
676
|
+
Valid model options
|
677
|
+
----------------
|
678
|
+
- 'llama3.2'
|
679
|
+
- 'llama3.3'
|
680
|
+
- any model here https://ollama.com/search
|
775
681
|
|
776
682
|
|
777
683
|
Parameters
|
778
684
|
----------
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
hours : int, default 0
|
784
|
-
Number of hours to wait prior to timing out.
|
685
|
+
models: list[Ollama]
|
686
|
+
List of Ollama containers running models in sidecars.
|
687
|
+
backend: str
|
688
|
+
Determines where and how to run the Ollama process.
|
785
689
|
"""
|
786
690
|
...
|
787
691
|
|
788
692
|
@typing.overload
|
789
|
-
def
|
693
|
+
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]]]:
|
790
694
|
"""
|
791
|
-
|
695
|
+
Specifies the resources needed when executing this step.
|
792
696
|
|
697
|
+
Use `@resources` to specify the resource requirements
|
698
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
699
|
+
|
700
|
+
You can choose the compute layer on the command line by executing e.g.
|
701
|
+
```
|
702
|
+
python myflow.py run --with batch
|
703
|
+
```
|
704
|
+
or
|
705
|
+
```
|
706
|
+
python myflow.py run --with kubernetes
|
707
|
+
```
|
708
|
+
which executes the flow on the desired system using the
|
709
|
+
requirements specified in `@resources`.
|
793
710
|
|
794
711
|
|
795
712
|
Parameters
|
796
713
|
----------
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
temp_dir_root : str, default: None
|
809
|
-
The root directory under which `current.checkpoint.directory` will be created.
|
714
|
+
cpu : int, default 1
|
715
|
+
Number of CPUs required for this step.
|
716
|
+
gpu : int, optional, default None
|
717
|
+
Number of GPUs required for this step.
|
718
|
+
disk : int, optional, default None
|
719
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
720
|
+
memory : int, default 4096
|
721
|
+
Memory size (in MB) required for this step.
|
722
|
+
shared_memory : int, optional, default None
|
723
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
724
|
+
This parameter maps to the `--shm-size` option in Docker.
|
810
725
|
"""
|
811
726
|
...
|
812
727
|
|
813
728
|
@typing.overload
|
814
|
-
def
|
729
|
+
def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
815
730
|
...
|
816
731
|
|
817
732
|
@typing.overload
|
818
|
-
def
|
733
|
+
def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
819
734
|
...
|
820
735
|
|
821
|
-
def
|
736
|
+
def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
|
822
737
|
"""
|
823
|
-
|
738
|
+
Specifies the resources needed when executing this step.
|
824
739
|
|
740
|
+
Use `@resources` to specify the resource requirements
|
741
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
742
|
+
|
743
|
+
You can choose the compute layer on the command line by executing e.g.
|
744
|
+
```
|
745
|
+
python myflow.py run --with batch
|
746
|
+
```
|
747
|
+
or
|
748
|
+
```
|
749
|
+
python myflow.py run --with kubernetes
|
750
|
+
```
|
751
|
+
which executes the flow on the desired system using the
|
752
|
+
requirements specified in `@resources`.
|
825
753
|
|
826
754
|
|
827
755
|
Parameters
|
828
756
|
----------
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
757
|
+
cpu : int, default 1
|
758
|
+
Number of CPUs required for this step.
|
759
|
+
gpu : int, optional, default None
|
760
|
+
Number of GPUs required for this step.
|
761
|
+
disk : int, optional, default None
|
762
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
763
|
+
memory : int, default 4096
|
764
|
+
Memory size (in MB) required for this step.
|
765
|
+
shared_memory : int, optional, default None
|
766
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
767
|
+
This parameter maps to the `--shm-size` option in Docker.
|
768
|
+
"""
|
769
|
+
...
|
770
|
+
|
771
|
+
@typing.overload
|
772
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
773
|
+
"""
|
774
|
+
Internal decorator to support Fast bakery
|
775
|
+
"""
|
776
|
+
...
|
777
|
+
|
778
|
+
@typing.overload
|
779
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
780
|
+
...
|
781
|
+
|
782
|
+
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
783
|
+
"""
|
784
|
+
Internal decorator to support Fast bakery
|
842
785
|
"""
|
843
786
|
...
|
844
787
|
|
@@ -876,81 +819,222 @@ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], Non
|
|
876
819
|
...
|
877
820
|
|
878
821
|
@typing.overload
|
879
|
-
def
|
822
|
+
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]]]:
|
880
823
|
"""
|
881
|
-
Specifies
|
824
|
+
Specifies a timeout for your step.
|
882
825
|
|
883
|
-
|
884
|
-
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
826
|
+
This decorator is useful if this step may hang indefinitely.
|
885
827
|
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
828
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
829
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
830
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
831
|
+
|
832
|
+
Note that all the values specified in parameters are added together so if you specify
|
833
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
834
|
+
|
835
|
+
|
836
|
+
Parameters
|
837
|
+
----------
|
838
|
+
seconds : int, default 0
|
839
|
+
Number of seconds to wait prior to timing out.
|
840
|
+
minutes : int, default 0
|
841
|
+
Number of minutes to wait prior to timing out.
|
842
|
+
hours : int, default 0
|
843
|
+
Number of hours to wait prior to timing out.
|
844
|
+
"""
|
845
|
+
...
|
846
|
+
|
847
|
+
@typing.overload
|
848
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
849
|
+
...
|
850
|
+
|
851
|
+
@typing.overload
|
852
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
853
|
+
...
|
854
|
+
|
855
|
+
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):
|
856
|
+
"""
|
857
|
+
Specifies a timeout for your step.
|
858
|
+
|
859
|
+
This decorator is useful if this step may hang indefinitely.
|
860
|
+
|
861
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
862
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
863
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
864
|
+
|
865
|
+
Note that all the values specified in parameters are added together so if you specify
|
866
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
867
|
+
|
868
|
+
|
869
|
+
Parameters
|
870
|
+
----------
|
871
|
+
seconds : int, default 0
|
872
|
+
Number of seconds to wait prior to timing out.
|
873
|
+
minutes : int, default 0
|
874
|
+
Number of minutes to wait prior to timing out.
|
875
|
+
hours : int, default 0
|
876
|
+
Number of hours to wait prior to timing out.
|
877
|
+
"""
|
878
|
+
...
|
879
|
+
|
880
|
+
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]]]:
|
881
|
+
"""
|
882
|
+
Specifies that this step should execute on Kubernetes.
|
896
883
|
|
897
884
|
|
898
885
|
Parameters
|
899
886
|
----------
|
900
887
|
cpu : int, default 1
|
901
|
-
Number of CPUs required for this step.
|
902
|
-
|
903
|
-
Number of GPUs required for this step.
|
904
|
-
disk : int, optional, default None
|
905
|
-
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
888
|
+
Number of CPUs required for this step. If `@resources` is
|
889
|
+
also present, the maximum value from all decorators is used.
|
906
890
|
memory : int, default 4096
|
907
|
-
Memory size (in MB) required for this step.
|
908
|
-
|
909
|
-
|
910
|
-
|
891
|
+
Memory size (in MB) required for this step. If
|
892
|
+
`@resources` is also present, the maximum value from all decorators is
|
893
|
+
used.
|
894
|
+
disk : int, default 10240
|
895
|
+
Disk size (in MB) required for this step. If
|
896
|
+
`@resources` is also present, the maximum value from all decorators is
|
897
|
+
used.
|
898
|
+
image : str, optional, default None
|
899
|
+
Docker image to use when launching on Kubernetes. If not specified, and
|
900
|
+
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
901
|
+
not, a default Docker image mapping to the current version of Python is used.
|
902
|
+
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
903
|
+
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
904
|
+
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
905
|
+
Kubernetes service account to use when launching pod in Kubernetes.
|
906
|
+
secrets : List[str], optional, default None
|
907
|
+
Kubernetes secrets to use when launching pod in Kubernetes. These
|
908
|
+
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
909
|
+
in Metaflow configuration.
|
910
|
+
node_selector: Union[Dict[str,str], str], optional, default None
|
911
|
+
Kubernetes node selector(s) to apply to the pod running the task.
|
912
|
+
Can be passed in as a comma separated string of values e.g.
|
913
|
+
'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
|
914
|
+
{'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
|
915
|
+
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
916
|
+
Kubernetes namespace to use when launching pod in Kubernetes.
|
917
|
+
gpu : int, optional, default None
|
918
|
+
Number of GPUs required for this step. A value of zero implies that
|
919
|
+
the scheduled node should not have GPUs.
|
920
|
+
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
921
|
+
The vendor of the GPUs to be used for this step.
|
922
|
+
tolerations : List[str], default []
|
923
|
+
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
924
|
+
Kubernetes tolerations to use when launching pod in Kubernetes.
|
925
|
+
labels: Dict[str, str], default: METAFLOW_KUBERNETES_LABELS
|
926
|
+
Kubernetes labels to use when launching pod in Kubernetes.
|
927
|
+
annotations: Dict[str, str], default: METAFLOW_KUBERNETES_ANNOTATIONS
|
928
|
+
Kubernetes annotations to use when launching pod in Kubernetes.
|
929
|
+
use_tmpfs : bool, default False
|
930
|
+
This enables an explicit tmpfs mount for this step.
|
931
|
+
tmpfs_tempdir : bool, default True
|
932
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
933
|
+
tmpfs_size : int, optional, default: None
|
934
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
935
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
936
|
+
memory allocated for this step.
|
937
|
+
tmpfs_path : str, optional, default /metaflow_temp
|
938
|
+
Path to tmpfs mount for this step.
|
939
|
+
persistent_volume_claims : Dict[str, str], optional, default None
|
940
|
+
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
941
|
+
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
942
|
+
shared_memory: int, optional
|
943
|
+
Shared memory size (in MiB) required for this step
|
944
|
+
port: int, optional
|
945
|
+
Port number to specify in the Kubernetes job object
|
946
|
+
compute_pool : str, optional, default None
|
947
|
+
Compute pool to be used for for this step.
|
948
|
+
If not specified, any accessible compute pool within the perimeter is used.
|
949
|
+
hostname_resolution_timeout: int, default 10 * 60
|
950
|
+
Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
|
951
|
+
Only applicable when @parallel is used.
|
952
|
+
qos: str, default: Burstable
|
953
|
+
Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
|
954
|
+
"""
|
955
|
+
...
|
956
|
+
|
957
|
+
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]]:
|
958
|
+
"""
|
959
|
+
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)
|
960
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
961
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
962
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
963
|
+
starts only after all sensors finish.
|
964
|
+
|
965
|
+
|
966
|
+
Parameters
|
967
|
+
----------
|
968
|
+
timeout : int
|
969
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
970
|
+
poke_interval : int
|
971
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
972
|
+
mode : str
|
973
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
974
|
+
exponential_backoff : bool
|
975
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
976
|
+
pool : str
|
977
|
+
the slot pool this task should run in,
|
978
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
979
|
+
soft_fail : bool
|
980
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
981
|
+
name : str
|
982
|
+
Name of the sensor on Airflow
|
983
|
+
description : str
|
984
|
+
Description of sensor in the Airflow UI
|
985
|
+
bucket_key : Union[str, List[str]]
|
986
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
987
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
988
|
+
bucket_name : str
|
989
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
990
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
991
|
+
wildcard_match : bool
|
992
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
993
|
+
aws_conn_id : str
|
994
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
995
|
+
verify : bool
|
996
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
911
997
|
"""
|
912
998
|
...
|
913
999
|
|
914
1000
|
@typing.overload
|
915
|
-
def
|
1001
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1002
|
+
"""
|
1003
|
+
Specifies the PyPI packages for all steps of the flow.
|
1004
|
+
|
1005
|
+
Use `@pypi_base` to set common packages required by all
|
1006
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1007
|
+
|
1008
|
+
Parameters
|
1009
|
+
----------
|
1010
|
+
packages : Dict[str, str], default: {}
|
1011
|
+
Packages to use for this flow. The key is the name of the package
|
1012
|
+
and the value is the version to use.
|
1013
|
+
python : str, optional, default: None
|
1014
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1015
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1016
|
+
"""
|
916
1017
|
...
|
917
1018
|
|
918
1019
|
@typing.overload
|
919
|
-
def
|
1020
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
920
1021
|
...
|
921
1022
|
|
922
|
-
def
|
1023
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
923
1024
|
"""
|
924
|
-
Specifies the
|
925
|
-
|
926
|
-
Use `@resources` to specify the resource requirements
|
927
|
-
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
928
|
-
|
929
|
-
You can choose the compute layer on the command line by executing e.g.
|
930
|
-
```
|
931
|
-
python myflow.py run --with batch
|
932
|
-
```
|
933
|
-
or
|
934
|
-
```
|
935
|
-
python myflow.py run --with kubernetes
|
936
|
-
```
|
937
|
-
which executes the flow on the desired system using the
|
938
|
-
requirements specified in `@resources`.
|
1025
|
+
Specifies the PyPI packages for all steps of the flow.
|
939
1026
|
|
1027
|
+
Use `@pypi_base` to set common packages required by all
|
1028
|
+
steps and use `@pypi` to specify step-specific overrides.
|
940
1029
|
|
941
1030
|
Parameters
|
942
1031
|
----------
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
memory : int, default 4096
|
950
|
-
Memory size (in MB) required for this step.
|
951
|
-
shared_memory : int, optional, default None
|
952
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
953
|
-
This parameter maps to the `--shm-size` option in Docker.
|
1032
|
+
packages : Dict[str, str], default: {}
|
1033
|
+
Packages to use for this flow. The key is the name of the package
|
1034
|
+
and the value is the version to use.
|
1035
|
+
python : str, optional, default: None
|
1036
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1037
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
954
1038
|
"""
|
955
1039
|
...
|
956
1040
|
|
@@ -1055,46 +1139,54 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
|
|
1055
1139
|
"""
|
1056
1140
|
...
|
1057
1141
|
|
1058
|
-
|
1142
|
+
@typing.overload
|
1143
|
+
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]]:
|
1059
1144
|
"""
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
starts only after all sensors finish.
|
1145
|
+
Specifies the Conda environment for all steps of the flow.
|
1146
|
+
|
1147
|
+
Use `@conda_base` to set common libraries required by all
|
1148
|
+
steps and use `@conda` to specify step-specific additions.
|
1065
1149
|
|
1066
1150
|
|
1067
1151
|
Parameters
|
1068
1152
|
----------
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1153
|
+
packages : Dict[str, str], default {}
|
1154
|
+
Packages to use for this flow. The key is the name of the package
|
1155
|
+
and the value is the version to use.
|
1156
|
+
libraries : Dict[str, str], default {}
|
1157
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1158
|
+
python : str, optional, default None
|
1159
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1160
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1161
|
+
disabled : bool, default False
|
1162
|
+
If set to True, disables Conda.
|
1163
|
+
"""
|
1164
|
+
...
|
1165
|
+
|
1166
|
+
@typing.overload
|
1167
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1168
|
+
...
|
1169
|
+
|
1170
|
+
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):
|
1171
|
+
"""
|
1172
|
+
Specifies the Conda environment for all steps of the flow.
|
1173
|
+
|
1174
|
+
Use `@conda_base` to set common libraries required by all
|
1175
|
+
steps and use `@conda` to specify step-specific additions.
|
1176
|
+
|
1177
|
+
|
1178
|
+
Parameters
|
1179
|
+
----------
|
1180
|
+
packages : Dict[str, str], default {}
|
1181
|
+
Packages to use for this flow. The key is the name of the package
|
1182
|
+
and the value is the version to use.
|
1183
|
+
libraries : Dict[str, str], default {}
|
1184
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1185
|
+
python : str, optional, default None
|
1186
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1187
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1188
|
+
disabled : bool, default False
|
1189
|
+
If set to True, disables Conda.
|
1098
1190
|
"""
|
1099
1191
|
...
|
1100
1192
|
|
@@ -1141,82 +1233,6 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
|
|
1141
1233
|
"""
|
1142
1234
|
...
|
1143
1235
|
|
1144
|
-
def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1145
|
-
"""
|
1146
|
-
Specifies what flows belong to the same project.
|
1147
|
-
|
1148
|
-
A project-specific namespace is created for all flows that
|
1149
|
-
use the same `@project(name)`.
|
1150
|
-
|
1151
|
-
|
1152
|
-
Parameters
|
1153
|
-
----------
|
1154
|
-
name : str
|
1155
|
-
Project name. Make sure that the name is unique amongst all
|
1156
|
-
projects that use the same production scheduler. The name may
|
1157
|
-
contain only lowercase alphanumeric characters and underscores.
|
1158
|
-
|
1159
|
-
branch : Optional[str], default None
|
1160
|
-
The branch to use. If not specified, the branch is set to
|
1161
|
-
`user.<username>` unless `production` is set to `True`. This can
|
1162
|
-
also be set on the command line using `--branch` as a top-level option.
|
1163
|
-
It is an error to specify `branch` in the decorator and on the command line.
|
1164
|
-
|
1165
|
-
production : bool, default False
|
1166
|
-
Whether or not the branch is the production branch. This can also be set on the
|
1167
|
-
command line using `--production` as a top-level option. It is an error to specify
|
1168
|
-
`production` in the decorator and on the command line.
|
1169
|
-
The project branch name will be:
|
1170
|
-
- if `branch` is specified:
|
1171
|
-
- if `production` is True: `prod.<branch>`
|
1172
|
-
- if `production` is False: `test.<branch>`
|
1173
|
-
- if `branch` is not specified:
|
1174
|
-
- if `production` is True: `prod`
|
1175
|
-
- if `production` is False: `user.<username>`
|
1176
|
-
"""
|
1177
|
-
...
|
1178
|
-
|
1179
|
-
@typing.overload
|
1180
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1181
|
-
"""
|
1182
|
-
Specifies the PyPI packages for all steps of the flow.
|
1183
|
-
|
1184
|
-
Use `@pypi_base` to set common packages required by all
|
1185
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1186
|
-
|
1187
|
-
Parameters
|
1188
|
-
----------
|
1189
|
-
packages : Dict[str, str], default: {}
|
1190
|
-
Packages to use for this flow. The key is the name of the package
|
1191
|
-
and the value is the version to use.
|
1192
|
-
python : str, optional, default: None
|
1193
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1194
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1195
|
-
"""
|
1196
|
-
...
|
1197
|
-
|
1198
|
-
@typing.overload
|
1199
|
-
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1200
|
-
...
|
1201
|
-
|
1202
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1203
|
-
"""
|
1204
|
-
Specifies the PyPI packages for all steps of the flow.
|
1205
|
-
|
1206
|
-
Use `@pypi_base` to set common packages required by all
|
1207
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1208
|
-
|
1209
|
-
Parameters
|
1210
|
-
----------
|
1211
|
-
packages : Dict[str, str], default: {}
|
1212
|
-
Packages to use for this flow. The key is the name of the package
|
1213
|
-
and the value is the version to use.
|
1214
|
-
python : str, optional, default: None
|
1215
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1216
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1217
|
-
"""
|
1218
|
-
...
|
1219
|
-
|
1220
1236
|
@typing.overload
|
1221
1237
|
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]]:
|
1222
1238
|
"""
|
@@ -1361,54 +1377,38 @@ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly:
|
|
1361
1377
|
"""
|
1362
1378
|
...
|
1363
1379
|
|
1364
|
-
|
1365
|
-
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]]:
|
1380
|
+
def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1366
1381
|
"""
|
1367
|
-
Specifies
|
1382
|
+
Specifies what flows belong to the same project.
|
1368
1383
|
|
1369
|
-
|
1370
|
-
|
1384
|
+
A project-specific namespace is created for all flows that
|
1385
|
+
use the same `@project(name)`.
|
1371
1386
|
|
1372
1387
|
|
1373
1388
|
Parameters
|
1374
1389
|
----------
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1380
|
-
python : str, optional, default None
|
1381
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1382
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1383
|
-
disabled : bool, default False
|
1384
|
-
If set to True, disables Conda.
|
1385
|
-
"""
|
1386
|
-
...
|
1387
|
-
|
1388
|
-
@typing.overload
|
1389
|
-
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1390
|
-
...
|
1391
|
-
|
1392
|
-
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):
|
1393
|
-
"""
|
1394
|
-
Specifies the Conda environment for all steps of the flow.
|
1395
|
-
|
1396
|
-
Use `@conda_base` to set common libraries required by all
|
1397
|
-
steps and use `@conda` to specify step-specific additions.
|
1390
|
+
name : str
|
1391
|
+
Project name. Make sure that the name is unique amongst all
|
1392
|
+
projects that use the same production scheduler. The name may
|
1393
|
+
contain only lowercase alphanumeric characters and underscores.
|
1398
1394
|
|
1395
|
+
branch : Optional[str], default None
|
1396
|
+
The branch to use. If not specified, the branch is set to
|
1397
|
+
`user.<username>` unless `production` is set to `True`. This can
|
1398
|
+
also be set on the command line using `--branch` as a top-level option.
|
1399
|
+
It is an error to specify `branch` in the decorator and on the command line.
|
1399
1400
|
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
If set to True, disables Conda.
|
1401
|
+
production : bool, default False
|
1402
|
+
Whether or not the branch is the production branch. This can also be set on the
|
1403
|
+
command line using `--production` as a top-level option. It is an error to specify
|
1404
|
+
`production` in the decorator and on the command line.
|
1405
|
+
The project branch name will be:
|
1406
|
+
- if `branch` is specified:
|
1407
|
+
- if `production` is True: `prod.<branch>`
|
1408
|
+
- if `production` is False: `test.<branch>`
|
1409
|
+
- if `branch` is not specified:
|
1410
|
+
- if `production` is True: `prod`
|
1411
|
+
- if `production` is False: `user.<username>`
|
1412
1412
|
"""
|
1413
1413
|
...
|
1414
1414
|
|