ob-metaflow-stubs 6.0.3.125__py2.py3-none-any.whl → 6.0.3.127__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- metaflow-stubs/__init__.pyi +300 -290
- metaflow-stubs/cards.pyi +2 -2
- metaflow-stubs/cli.pyi +9 -21
- metaflow-stubs/{plugins/package_cli.pyi → cli_components/__init__.pyi} +3 -3
- metaflow-stubs/cli_components/utils.pyi +35 -0
- metaflow-stubs/client/__init__.pyi +2 -2
- metaflow-stubs/client/core.pyi +4 -4
- metaflow-stubs/client/filecache.pyi +3 -3
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +12 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +18 -11
- 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 +4 -2
- metaflow-stubs/metaflow_current.pyi +116 -116
- 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/checkpoints/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +3 -3
- 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/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/datastore/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +3 -3
- 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 +2 -2
- 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/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 +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 +33 -16
- metaflow-stubs/plugins/__init__.pyi +15 -15
- 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 -5
- 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 -2
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +30 -2
- 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 +3 -3
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -3
- 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 +3 -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 +3 -3
- 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 -7
- 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 +2 -2
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
- 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 +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 +3 -3
- 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 -5
- 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 +3 -3
- 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 +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +6 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +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 +2 -2
- 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 +30 -30
- metaflow-stubs/runner/deployer_impl.pyi +3 -3
- metaflow-stubs/runner/metaflow_runner.pyi +5 -5
- metaflow-stubs/runner/nbdeploy.pyi +4 -2
- metaflow-stubs/runner/nbrun.pyi +3 -3
- metaflow-stubs/runner/subprocess_manager.pyi +5 -2
- metaflow-stubs/runner/utils.pyi +7 -7
- 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/{plugins/aws/step_functions/production_token.pyi → user_configs/__init__.pyi} +5 -11
- metaflow-stubs/user_configs/config_decorators.pyi +253 -0
- metaflow-stubs/user_configs/config_options.pyi +82 -0
- metaflow-stubs/user_configs/config_parameters.pyi +217 -0
- {ob_metaflow_stubs-6.0.3.125.dist-info → ob_metaflow_stubs-6.0.3.127.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.127.dist-info/RECORD +173 -0
- metaflow-stubs/clone_util.pyi +0 -14
- metaflow-stubs/mflog/__init__.pyi +0 -6
- metaflow-stubs/mflog/mflog.pyi +0 -69
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +0 -103
- metaflow-stubs/plugins/cards/card_cli.pyi +0 -146
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +0 -33
- metaflow-stubs/plugins/logs_cli.pyi +0 -46
- metaflow-stubs/plugins/tag_cli.pyi +0 -19
- metaflow-stubs/procpoll.pyi +0 -53
- ob_metaflow_stubs-6.0.3.125.dist-info/RECORD +0 -178
- {ob_metaflow_stubs-6.0.3.125.dist-info → ob_metaflow_stubs-6.0.3.127.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.125.dist-info → ob_metaflow_stubs-6.0.3.127.dist-info}/top_level.txt +0 -0
@@ -1,21 +1,21 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.046031 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.
|
12
|
-
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.hf_hub.decorator
|
11
|
+
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.modeling_utils.core
|
13
12
|
import metaflow
|
14
|
-
import typing
|
15
|
-
import metaflow.events
|
16
13
|
import metaflow.metaflow_current
|
14
|
+
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.hf_hub.decorator
|
17
15
|
import metaflow.plugins.cards.component_serializer
|
18
|
-
import
|
16
|
+
import typing
|
17
|
+
import metaflow.events
|
18
|
+
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.decorator
|
19
19
|
|
20
20
|
|
21
21
|
TYPE_CHECKING: bool
|
@@ -228,6 +228,114 @@ class Current(object, metaclass=type):
|
|
228
228
|
def graph(self):
|
229
229
|
...
|
230
230
|
@property
|
231
|
+
def card(self) -> "metaflow.plugins.cards.component_serializer.CardComponentCollector":
|
232
|
+
"""
|
233
|
+
(only in the presence of the @card decorator)
|
234
|
+
|
235
|
+
The `@card` decorator makes the cards available through the `current.card`
|
236
|
+
object. If multiple `@card` decorators are present, you can add an `ID` to
|
237
|
+
distinguish between them using `@card(id=ID)` as the decorator. You will then
|
238
|
+
be able to access that specific card using `current.card[ID].
|
239
|
+
|
240
|
+
Methods available are `append` and `extend`
|
241
|
+
|
242
|
+
Returns
|
243
|
+
-------
|
244
|
+
CardComponentCollector
|
245
|
+
The or one of the cards attached to this step.
|
246
|
+
"""
|
247
|
+
...
|
248
|
+
@property
|
249
|
+
def checkpoint(self) -> "metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.decorator.CurrentCheckpointer":
|
250
|
+
"""
|
251
|
+
(only in the presence of the @checkpoint decorator)
|
252
|
+
|
253
|
+
The `@checkpoint` decorator makes saving/loading checkpoints available through the `current.checkpoint`.
|
254
|
+
The object exposes `save`/`load`/`list` methods for saving/loading checkpoints.
|
255
|
+
|
256
|
+
You can check if a checkpoint is loaded by `current.checkpoint.is_loaded` and get the checkpoint information
|
257
|
+
by using `current.checkpoint.info`. The `current.checkpoint.directory` returns the path to the checkpoint directory
|
258
|
+
where the checkpoint maybe loaded or saved.
|
259
|
+
|
260
|
+
Usage (Saving Checkpoints):
|
261
|
+
-------
|
262
|
+
```
|
263
|
+
@checkpoint
|
264
|
+
@step
|
265
|
+
def train(self):
|
266
|
+
model = create_model(self.parameters, checkpoint_path = None)
|
267
|
+
for i in range(self.epochs):
|
268
|
+
# some training logic
|
269
|
+
loss = model.train(self.dataset)
|
270
|
+
if i % 10 == 0:
|
271
|
+
model.save(
|
272
|
+
current.checkpoint.directory,
|
273
|
+
)
|
274
|
+
# saves the contents of the `current.checkpoint.directory` as a checkpoint
|
275
|
+
# and returns a reference dictionary to the checkpoint saved in the datastore
|
276
|
+
self.latest_checkpoint = current.checkpoint.save(
|
277
|
+
name="epoch_checkpoint",
|
278
|
+
metadata={
|
279
|
+
"epoch": i,
|
280
|
+
"loss": loss,
|
281
|
+
}
|
282
|
+
)
|
283
|
+
```
|
284
|
+
Usage (Using Loaded Checkpoints):
|
285
|
+
-------
|
286
|
+
```
|
287
|
+
@retry(times=3)
|
288
|
+
@checkpoint
|
289
|
+
@step
|
290
|
+
def train(self):
|
291
|
+
# Assume that the task has restarted and the previous attempt of the task
|
292
|
+
# saved a checkpoint
|
293
|
+
checkpoint_path = None
|
294
|
+
if current.checkpoint.is_loaded: # Check if a checkpoint is loaded
|
295
|
+
print("Loaded checkpoint from the previous attempt")
|
296
|
+
checkpoint_path = current.checkpoint.directory
|
297
|
+
|
298
|
+
model = create_model(self.parameters, checkpoint_path = checkpoint_path)
|
299
|
+
for i in range(self.epochs):
|
300
|
+
...
|
301
|
+
```
|
302
|
+
|
303
|
+
Returns
|
304
|
+
-------
|
305
|
+
CurrentCheckpointer
|
306
|
+
The object for handling checkpointing within a step.
|
307
|
+
"""
|
308
|
+
...
|
309
|
+
@property
|
310
|
+
def parallel(self) -> "metaflow.metaflow_current.Parallel":
|
311
|
+
"""
|
312
|
+
(only in the presence of the @parallel decorator)
|
313
|
+
|
314
|
+
Returns a namedtuple with relevant information about the parallel task.
|
315
|
+
|
316
|
+
Returns
|
317
|
+
-------
|
318
|
+
Parallel
|
319
|
+
`namedtuple` with the following fields:
|
320
|
+
- main_ip (`str`)
|
321
|
+
The IP address of the control task.
|
322
|
+
- num_nodes (`int`)
|
323
|
+
The total number of tasks created by @parallel
|
324
|
+
- node_index (`int`)
|
325
|
+
The index of the current task in all the @parallel tasks.
|
326
|
+
- control_task_id (`Optional[str]`)
|
327
|
+
The task ID of the control task. Available to all tasks.
|
328
|
+
"""
|
329
|
+
...
|
330
|
+
@property
|
331
|
+
def is_parallel(self) -> bool:
|
332
|
+
"""
|
333
|
+
(only in the presence of the @parallel decorator)
|
334
|
+
|
335
|
+
True if the current step is a @parallel step.
|
336
|
+
"""
|
337
|
+
...
|
338
|
+
@property
|
231
339
|
def model(self) -> "metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.modeling_utils.core.ModelSerializer":
|
232
340
|
"""
|
233
341
|
(only in the presence of the @model decorator)
|
@@ -289,53 +397,6 @@ class Current(object, metaclass=type):
|
|
289
397
|
"""
|
290
398
|
...
|
291
399
|
@property
|
292
|
-
def card(self) -> "metaflow.plugins.cards.component_serializer.CardComponentCollector":
|
293
|
-
"""
|
294
|
-
(only in the presence of the @card decorator)
|
295
|
-
|
296
|
-
The `@card` decorator makes the cards available through the `current.card`
|
297
|
-
object. If multiple `@card` decorators are present, you can add an `ID` to
|
298
|
-
distinguish between them using `@card(id=ID)` as the decorator. You will then
|
299
|
-
be able to access that specific card using `current.card[ID].
|
300
|
-
|
301
|
-
Methods available are `append` and `extend`
|
302
|
-
|
303
|
-
Returns
|
304
|
-
-------
|
305
|
-
CardComponentCollector
|
306
|
-
The or one of the cards attached to this step.
|
307
|
-
"""
|
308
|
-
...
|
309
|
-
@property
|
310
|
-
def parallel(self) -> "metaflow.metaflow_current.Parallel":
|
311
|
-
"""
|
312
|
-
(only in the presence of the @parallel decorator)
|
313
|
-
|
314
|
-
Returns a namedtuple with relevant information about the parallel task.
|
315
|
-
|
316
|
-
Returns
|
317
|
-
-------
|
318
|
-
Parallel
|
319
|
-
`namedtuple` with the following fields:
|
320
|
-
- main_ip (`str`)
|
321
|
-
The IP address of the control task.
|
322
|
-
- num_nodes (`int`)
|
323
|
-
The total number of tasks created by @parallel
|
324
|
-
- node_index (`int`)
|
325
|
-
The index of the current task in all the @parallel tasks.
|
326
|
-
- control_task_id (`Optional[str]`)
|
327
|
-
The task ID of the control task. Available to all tasks.
|
328
|
-
"""
|
329
|
-
...
|
330
|
-
@property
|
331
|
-
def is_parallel(self) -> bool:
|
332
|
-
"""
|
333
|
-
(only in the presence of the @parallel decorator)
|
334
|
-
|
335
|
-
True if the current step is a @parallel step.
|
336
|
-
"""
|
337
|
-
...
|
338
|
-
@property
|
339
400
|
def huggingface_hub(self) -> "metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.hf_hub.decorator.HuggingfaceRegistry":
|
340
401
|
"""
|
341
402
|
(only in the presence of the @huggingface_hub decorator)
|
@@ -405,70 +466,9 @@ class Current(object, metaclass=type):
|
|
405
466
|
"""
|
406
467
|
...
|
407
468
|
@property
|
408
|
-
def checkpoint(self) -> "metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.decorator.CurrentCheckpointer":
|
409
|
-
"""
|
410
|
-
(only in the presence of the @checkpoint decorator)
|
411
|
-
|
412
|
-
The `@checkpoint` decorator makes saving/loading checkpoints available through the `current.checkpoint`.
|
413
|
-
The object exposes `save`/`load`/`list` methods for saving/loading checkpoints.
|
414
|
-
|
415
|
-
You can check if a checkpoint is loaded by `current.checkpoint.is_loaded` and get the checkpoint information
|
416
|
-
by using `current.checkpoint.info`. The `current.checkpoint.directory` returns the path to the checkpoint directory
|
417
|
-
where the checkpoint maybe loaded or saved.
|
418
|
-
|
419
|
-
Usage (Saving Checkpoints):
|
420
|
-
-------
|
421
|
-
```
|
422
|
-
@checkpoint
|
423
|
-
@step
|
424
|
-
def train(self):
|
425
|
-
model = create_model(self.parameters, checkpoint_path = None)
|
426
|
-
for i in range(self.epochs):
|
427
|
-
# some training logic
|
428
|
-
loss = model.train(self.dataset)
|
429
|
-
if i % 10 == 0:
|
430
|
-
model.save(
|
431
|
-
current.checkpoint.directory,
|
432
|
-
)
|
433
|
-
# saves the contents of the `current.checkpoint.directory` as a checkpoint
|
434
|
-
# and returns a reference dictionary to the checkpoint saved in the datastore
|
435
|
-
self.latest_checkpoint = current.checkpoint.save(
|
436
|
-
name="epoch_checkpoint",
|
437
|
-
metadata={
|
438
|
-
"epoch": i,
|
439
|
-
"loss": loss,
|
440
|
-
}
|
441
|
-
)
|
442
|
-
```
|
443
|
-
Usage (Using Loaded Checkpoints):
|
444
|
-
-------
|
445
|
-
```
|
446
|
-
@retry(times=3)
|
447
|
-
@checkpoint
|
448
|
-
@step
|
449
|
-
def train(self):
|
450
|
-
# Assume that the task has restarted and the previous attempt of the task
|
451
|
-
# saved a checkpoint
|
452
|
-
checkpoint_path = None
|
453
|
-
if current.checkpoint.is_loaded: # Check if a checkpoint is loaded
|
454
|
-
print("Loaded checkpoint from the previous attempt")
|
455
|
-
checkpoint_path = current.checkpoint.directory
|
456
|
-
|
457
|
-
model = create_model(self.parameters, checkpoint_path = checkpoint_path)
|
458
|
-
for i in range(self.epochs):
|
459
|
-
...
|
460
|
-
```
|
461
|
-
|
462
|
-
Returns
|
463
|
-
-------
|
464
|
-
CurrentCheckpointer
|
465
|
-
The object for handling checkpointing within a step.
|
466
|
-
"""
|
467
|
-
...
|
468
|
-
@property
|
469
469
|
def trigger(self) -> "metaflow.events.Trigger":
|
470
470
|
"""
|
471
|
-
(only in the presence of the @
|
471
|
+
(only in the presence of the @trigger_on_finish, or @trigger decorators)
|
472
472
|
|
473
473
|
Returns `Trigger` if the current run is triggered by an event
|
474
474
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.918249 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.926884 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.926948 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.927008 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.927066 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.013938 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -9,9 +9,9 @@ from __future__ import annotations
|
|
9
9
|
import metaflow
|
10
10
|
import typing
|
11
11
|
if typing.TYPE_CHECKING:
|
12
|
+
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
|
12
13
|
import metaflow.datastore.datastore_storage
|
13
14
|
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastore.core
|
14
|
-
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
|
15
15
|
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.checkpoint_storage
|
16
16
|
|
17
17
|
from ..exceptions import KeyNotCompatibleWithObjectException as KeyNotCompatibleWithObjectException
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.950387 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.974016 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.core
|
12
|
-
import metaflow
|
13
11
|
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
|
12
|
+
import metaflow
|
13
|
+
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.core
|
14
14
|
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.checkpoint_storage
|
15
15
|
|
16
16
|
from ......metaflow_current import current as current
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.950605 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.927112 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.951215 #
|
5
5
|
######################################################################################################
|
6
6
|
|
metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.975275 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastore.core
|
12
11
|
import metaflow.datastore.datastore_storage
|
12
|
+
import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastore.core
|
13
13
|
|
14
14
|
from ......exception import MetaflowException as MetaflowException
|
15
15
|
from ..utils.tar_utils import create_tarball_on_disk as create_tarball_on_disk
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.030083 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.951266 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.030276 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.928096 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.950929 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.012845 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.012898 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.014898 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.029811 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:51.014507 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.918314 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.928840 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.928905 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.928953 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,6 +1,6 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.931408 #
|
5
5
|
######################################################################################################
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.931460 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-12-
|
3
|
+
# MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
|
4
|
+
# Generated on 2024-12-17T21:56:50.951591 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|