ob-metaflow-stubs 6.0.3.114__py2.py3-none-any.whl → 6.0.3.116__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 +570 -570
- metaflow-stubs/cards.pyi +5 -5
- metaflow-stubs/cli.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +4 -4
- metaflow-stubs/client/core.pyi +10 -8
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/clone_util.pyi +2 -2
- metaflow-stubs/events.pyi +2 -2
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +5 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +4 -4
- metaflow-stubs/info_file.pyi +2 -2
- metaflow-stubs/metadata/metadata.pyi +6 -3
- metaflow-stubs/metadata/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -2
- metaflow-stubs/metaflow_current.pyi +108 -108
- metaflow-stubs/mflog/mflog.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +4 -4
- metaflow-stubs/plugins/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
- metaflow-stubs/plugins/airflow/exception.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +6 -6
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +6 -6
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
- metaflow-stubs/plugins/aws/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +4 -4
- 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 -2
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/production_token.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 +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 +2 -2
- metaflow-stubs/plugins/cards/card_cli.pyi +5 -5
- 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 +4 -4
- 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 +3 -3
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +4 -4
- 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 +5 -5
- 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 -2
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +4 -4
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
- metaflow-stubs/plugins/logs_cli.pyi +3 -3
- metaflow-stubs/plugins/package_cli.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 +3 -3
- 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 +3 -3
- 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/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/tag_cli.pyi +4 -4
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/procpoll.pyi +2 -2
- metaflow-stubs/profilers/__init__.pyi +2 -2
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/deployer.pyi +3 -3
- metaflow-stubs/runner/metaflow_runner.pyi +5 -33
- 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 +2 -2
- metaflow-stubs/system/__init__.pyi +3 -3
- 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
- {ob_metaflow_stubs-6.0.3.114.dist-info → ob_metaflow_stubs-6.0.3.116.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.116.dist-info/RECORD +140 -0
- ob_metaflow_stubs-6.0.3.114.dist-info/RECORD +0 -140
- {ob_metaflow_stubs-6.0.3.114.dist-info → ob_metaflow_stubs-6.0.3.116.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.114.dist-info → ob_metaflow_stubs-6.0.3.116.dist-info}/top_level.txt +0 -0
metaflow-stubs/cards.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.987624 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -9,11 +9,11 @@ from __future__ import annotations
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
11
|
import metaflow
|
12
|
+
import typing
|
13
|
+
import metaflow.plugins.cards.card_modules.card
|
12
14
|
import metaflow.plugins.cards.card_modules.components
|
13
|
-
import metaflow.plugins.cards.card_modules.basic
|
14
15
|
import metaflow.plugins.cards.card_client
|
15
|
-
import metaflow.plugins.cards.card_modules.
|
16
|
-
import typing
|
16
|
+
import metaflow.plugins.cards.card_modules.basic
|
17
17
|
|
18
18
|
def get_cards(task: typing.Union[str, "metaflow.Task"], id: typing.Optional[str] = None, type: typing.Optional[str] = None, follow_resumed: bool = True) -> metaflow.plugins.cards.card_client.CardContainer:
|
19
19
|
"""
|
metaflow-stubs/cli.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.007974 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,16 +1,16 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.996576 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import datetime
|
12
11
|
import metaflow.events
|
13
12
|
import typing
|
13
|
+
import datetime
|
14
14
|
import metaflow.client.core
|
15
15
|
|
16
16
|
def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
|
@@ -132,7 +132,7 @@ class Metaflow(object, metaclass=type):
|
|
132
132
|
flows present in the current namespace will be returned. A `Flow` is present in a namespace
|
133
133
|
if it has at least one run in the namespace.
|
134
134
|
"""
|
135
|
-
def __init__(self):
|
135
|
+
def __init__(self, _current_metadata: typing.Optional[str] = None):
|
136
136
|
...
|
137
137
|
@property
|
138
138
|
def flows(self) -> typing.List[metaflow.client.core.Flow]:
|
metaflow-stubs/client/core.pyi
CHANGED
@@ -1,21 +1,23 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.982719 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import tarfile
|
12
11
|
import metaflow
|
13
|
-
import
|
12
|
+
import typing
|
14
13
|
import metaflow.exception
|
15
|
-
import metaflow.client.core
|
16
14
|
import metaflow.metaflow_current
|
17
15
|
import datetime
|
18
|
-
import
|
16
|
+
import metaflow.client.core
|
17
|
+
import metaflow.events
|
18
|
+
import tarfile
|
19
|
+
|
20
|
+
TYPE_CHECKING: bool
|
19
21
|
|
20
22
|
current: metaflow.metaflow_current.Current
|
21
23
|
|
@@ -349,7 +351,7 @@ class MetaflowObject(object, metaclass=type):
|
|
349
351
|
Pathspec of the original object this object was cloned from (in the case of a resume).
|
350
352
|
None if not applicable.
|
351
353
|
"""
|
352
|
-
def __init__(self, pathspec: typing.Optional[str] = None, attempt: typing.Optional[int] = None, _object: typing.Optional["MetaflowObject"] = None, _parent: typing.Optional["MetaflowObject"] = None, _namespace_check: bool = True, _current_namespace: typing.Optional[str] = None):
|
354
|
+
def __init__(self, pathspec: typing.Optional[str] = None, attempt: typing.Optional[int] = None, _object: typing.Optional["MetaflowObject"] = None, _parent: typing.Optional["MetaflowObject"] = None, _namespace_check: bool = True, _metaflow: typing.Optional["Metaflow"] = None, _current_namespace: typing.Optional[str] = None, _current_metadata: typing.Optional[str] = None):
|
353
355
|
...
|
354
356
|
def __iter__(self) -> typing.Iterator["MetaflowObject"]:
|
355
357
|
"""
|
@@ -1593,7 +1595,7 @@ class Metaflow(object, metaclass=type):
|
|
1593
1595
|
flows present in the current namespace will be returned. A `Flow` is present in a namespace
|
1594
1596
|
if it has at least one run in the namespace.
|
1595
1597
|
"""
|
1596
|
-
def __init__(self):
|
1598
|
+
def __init__(self, _current_metadata: typing.Optional[str] = None):
|
1597
1599
|
...
|
1598
1600
|
@property
|
1599
1601
|
def flows(self) -> typing.List[Flow]:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.008843 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/clone_util.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.006832 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/events.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.984969 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/exception.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.974945 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/flowspec.pyi
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.984348 #
|
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.datastore.inputs
|
12
|
+
import typing
|
11
13
|
import metaflow.flowspec
|
12
14
|
import metaflow.unbounded_foreach
|
13
|
-
import metaflow.datastore.inputs
|
14
|
-
import metaflow.parameters
|
15
15
|
import metaflow.exception
|
16
|
-
import
|
16
|
+
import metaflow.parameters
|
17
17
|
|
18
18
|
class DelayedEvaluationParameter(object, metaclass=type):
|
19
19
|
"""
|
metaflow-stubs/generated_for.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.12.
|
1
|
+
2.12.27.1+obcheckpoint(0.1.1);ob(v1) 2024-11-04T20:32:12.959508
|
metaflow-stubs/includefile.pyi
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.991681 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
+
import typing
|
12
|
+
import metaflow.plugins.datatools.s3.s3
|
11
13
|
import io
|
12
14
|
import metaflow.parameters
|
13
|
-
import metaflow.plugins.datatools.s3.s3
|
14
15
|
import metaflow._vendor.click.types
|
15
|
-
import typing
|
16
16
|
|
17
17
|
class MetaflowException(Exception, metaclass=type):
|
18
18
|
def __init__(self, msg = "", lineno = None):
|
metaflow-stubs/info_file.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.974270 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,15 +1,15 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.033616 #
|
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.metadata.metadata
|
12
11
|
import metaflow.exception
|
12
|
+
import metaflow.metadata.metadata
|
13
13
|
|
14
14
|
class MetaflowInternalError(metaflow.exception.MetaflowException, metaclass=type):
|
15
15
|
...
|
@@ -99,6 +99,9 @@ class ObjectOrder(object, metaclass=type):
|
|
99
99
|
|
100
100
|
class MetadataProvider(object, metaclass=MetadataProviderMeta):
|
101
101
|
@classmethod
|
102
|
+
def metadata_str(cls):
|
103
|
+
...
|
104
|
+
@classmethod
|
102
105
|
def compute_info(cls, val):
|
103
106
|
"""
|
104
107
|
Compute the new information for this provider
|
metaflow-stubs/metadata/util.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.079493 #
|
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-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.975983 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,21 +1,21 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.082093 #
|
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_extensions.obcheckpoint.plugins.machine_learning_utilities.
|
11
|
+
import metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.hf_hub.decorator
|
12
12
|
import metaflow
|
13
|
-
import
|
13
|
+
import typing
|
14
14
|
import metaflow.metaflow_current
|
15
|
-
import metaflow.plugins.cards.component_serializer
|
16
15
|
import metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.modeling_utils.core
|
17
|
-
import
|
18
|
-
import
|
16
|
+
import metaflow.events
|
17
|
+
import metaflow.plugins.cards.component_serializer
|
18
|
+
import metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.decorator
|
19
19
|
|
20
20
|
TYPE_CHECKING: bool
|
21
21
|
|
@@ -227,82 +227,82 @@ class Current(object, metaclass=type):
|
|
227
227
|
def graph(_):
|
228
228
|
...
|
229
229
|
@property
|
230
|
-
def
|
230
|
+
def card(self) -> "metaflow.plugins.cards.component_serializer.CardComponentCollector":
|
231
231
|
"""
|
232
|
-
(only in the presence of the @
|
232
|
+
(only in the presence of the @card decorator)
|
233
233
|
|
234
|
-
The `@
|
235
|
-
|
234
|
+
The `@card` decorator makes the cards available through the `current.card`
|
235
|
+
object. If multiple `@card` decorators are present, you can add an `ID` to
|
236
|
+
distinguish between them using `@card(id=ID)` as the decorator. You will then
|
237
|
+
be able to access that specific card using `current.card[ID].
|
236
238
|
|
237
|
-
|
238
|
-
by using `current.checkpoint.info`. The `current.checkpoint.directory` returns the path to the checkpoint directory
|
239
|
-
where the checkpoint maybe loaded or saved.
|
239
|
+
Methods available are `append` and `extend`
|
240
240
|
|
241
|
-
|
241
|
+
Returns
|
242
242
|
-------
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
name="epoch_checkpoint",
|
259
|
-
metadata={
|
260
|
-
"epoch": i,
|
261
|
-
"loss": loss,
|
262
|
-
}
|
263
|
-
)
|
264
|
-
```
|
265
|
-
Usage (Using Loaded Checkpoints):
|
243
|
+
CardComponentCollector
|
244
|
+
The or one of the cards attached to this step.
|
245
|
+
"""
|
246
|
+
...
|
247
|
+
@property
|
248
|
+
def model(self) -> "metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.modeling_utils.core.ModelSerializer":
|
249
|
+
"""
|
250
|
+
(only in the presence of the @model decorator)
|
251
|
+
|
252
|
+
The object used for loading / saving models.
|
253
|
+
`current.model` exposes a `save` method to save models and a `load` method to load models.
|
254
|
+
`current.model.loaded` exposes the paths to the models loaded via the `load` argument in the @model decorator
|
255
|
+
or models loaded via `current.model.load`.
|
256
|
+
|
257
|
+
Usage (Saving a model):
|
266
258
|
-------
|
259
|
+
|
267
260
|
```
|
268
|
-
@
|
269
|
-
@checkpoint
|
261
|
+
@model
|
270
262
|
@step
|
271
263
|
def train(self):
|
272
|
-
#
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
264
|
+
# current.model.save returns a dictionary reference to the model saved
|
265
|
+
self.my_model = current.model.save(
|
266
|
+
path_to_my_model,
|
267
|
+
label="my_model",
|
268
|
+
metadata={
|
269
|
+
"epochs": 10,
|
270
|
+
"batch-size": 32,
|
271
|
+
"learning-rate": 0.001,
|
272
|
+
}
|
273
|
+
)
|
274
|
+
self.next(self.test)
|
278
275
|
|
279
|
-
|
280
|
-
|
281
|
-
|
276
|
+
@model(load="my_model")
|
277
|
+
@step
|
278
|
+
def test(self):
|
279
|
+
# `current.model.loaded` returns a dictionary of the loaded models
|
280
|
+
# where the key is the name of the artifact and the value is the path to the model
|
281
|
+
print(os.listdir(current.model.loaded["my_model"]))
|
282
|
+
self.next(self.end)
|
282
283
|
```
|
283
284
|
|
284
|
-
|
285
|
+
Usage (Loading models):
|
285
286
|
-------
|
286
|
-
CurrentCheckpointer
|
287
|
-
The object for handling checkpointing within a step.
|
288
|
-
"""
|
289
|
-
...
|
290
|
-
@property
|
291
|
-
def card(self) -> "metaflow.plugins.cards.component_serializer.CardComponentCollector":
|
292
|
-
"""
|
293
|
-
(only in the presence of the @card decorator)
|
294
287
|
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
288
|
+
```
|
289
|
+
@step
|
290
|
+
def train(self):
|
291
|
+
# current.model.load returns the path to the model loaded
|
292
|
+
checkpoint_path = current.model.load(
|
293
|
+
self.checkpoint_key,
|
294
|
+
)
|
295
|
+
model_path = current.model.load(
|
296
|
+
self.model,
|
297
|
+
)
|
298
|
+
self.next(self.test)
|
299
|
+
```
|
299
300
|
|
300
|
-
Methods available are `append` and `extend`
|
301
301
|
|
302
302
|
Returns
|
303
303
|
-------
|
304
|
-
|
305
|
-
The
|
304
|
+
ModelSerializer
|
305
|
+
The object used for loading / saving models.
|
306
306
|
"""
|
307
307
|
...
|
308
308
|
@property
|
@@ -368,70 +368,70 @@ class Current(object, metaclass=type):
|
|
368
368
|
"""
|
369
369
|
...
|
370
370
|
@property
|
371
|
-
def
|
371
|
+
def checkpoint(self) -> "metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.decorator.CurrentCheckpointer":
|
372
372
|
"""
|
373
|
-
(only in the presence of the @
|
373
|
+
(only in the presence of the @checkpoint decorator)
|
374
374
|
|
375
|
-
The
|
376
|
-
|
377
|
-
`current.model.loaded` exposes the paths to the models loaded via the `load` argument in the @model decorator
|
378
|
-
or models loaded via `current.model.load`.
|
375
|
+
The `@checkpoint` decorator makes saving/loading checkpoints available through the `current.checkpoint`.
|
376
|
+
The object exposes `save`/`load`/`list` methods for saving/loading checkpoints.
|
379
377
|
|
380
|
-
|
381
|
-
|
378
|
+
You can check if a checkpoint is loaded by `current.checkpoint.is_loaded` and get the checkpoint information
|
379
|
+
by using `current.checkpoint.info`. The `current.checkpoint.directory` returns the path to the checkpoint directory
|
380
|
+
where the checkpoint maybe loaded or saved.
|
382
381
|
|
382
|
+
Usage (Saving Checkpoints):
|
383
|
+
-------
|
383
384
|
```
|
384
|
-
@
|
385
|
+
@checkpoint
|
385
386
|
@step
|
386
387
|
def train(self):
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
print(os.listdir(current.model.loaded["my_model"]))
|
405
|
-
self.next(self.end)
|
388
|
+
model = create_model(self.parameters, checkpoint_path = None)
|
389
|
+
for i in range(self.epochs):
|
390
|
+
# some training logic
|
391
|
+
loss = model.train(self.dataset)
|
392
|
+
if i % 10 == 0:
|
393
|
+
model.save(
|
394
|
+
current.checkpoint.directory,
|
395
|
+
)
|
396
|
+
# saves the contents of the `current.checkpoint.directory` as a checkpoint
|
397
|
+
# and returns a reference dictionary to the checkpoint saved in the datastore
|
398
|
+
self.latest_checkpoint = current.checkpoint.save(
|
399
|
+
name="epoch_checkpoint",
|
400
|
+
metadata={
|
401
|
+
"epoch": i,
|
402
|
+
"loss": loss,
|
403
|
+
}
|
404
|
+
)
|
406
405
|
```
|
407
|
-
|
408
|
-
Usage (Loading models):
|
406
|
+
Usage (Using Loaded Checkpoints):
|
409
407
|
-------
|
410
|
-
|
411
408
|
```
|
409
|
+
@retry(times=3)
|
410
|
+
@checkpoint
|
412
411
|
@step
|
413
412
|
def train(self):
|
414
|
-
#
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
)
|
421
|
-
self.next(self.test)
|
422
|
-
```
|
413
|
+
# Assume that the task has restarted and the previous attempt of the task
|
414
|
+
# saved a checkpoint
|
415
|
+
checkpoint_path = None
|
416
|
+
if current.checkpoint.is_loaded: # Check if a checkpoint is loaded
|
417
|
+
print("Loaded checkpoint from the previous attempt")
|
418
|
+
checkpoint_path = current.checkpoint.directory
|
423
419
|
|
420
|
+
model = create_model(self.parameters, checkpoint_path = checkpoint_path)
|
421
|
+
for i in range(self.epochs):
|
422
|
+
...
|
423
|
+
```
|
424
424
|
|
425
425
|
Returns
|
426
426
|
-------
|
427
|
-
|
428
|
-
The object
|
427
|
+
CurrentCheckpointer
|
428
|
+
The object for handling checkpointing within a step.
|
429
429
|
"""
|
430
430
|
...
|
431
431
|
@property
|
432
432
|
def trigger(self) -> "metaflow.events.Trigger":
|
433
433
|
"""
|
434
|
-
(only in the presence of the @
|
434
|
+
(only in the presence of the @trigger, or @trigger_on_finish decorators)
|
435
435
|
|
436
436
|
Returns `Trigger` if the current run is triggered by an event
|
437
437
|
|
metaflow-stubs/mflog/mflog.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.033941 #
|
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-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.976392 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
metaflow-stubs/parameters.pyi
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:12.977607 #
|
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.parameters
|
12
11
|
import metaflow.exception
|
13
|
-
import metaflow._vendor.click.types
|
14
12
|
import typing
|
13
|
+
import metaflow.parameters
|
14
|
+
import metaflow._vendor.click.types
|
15
15
|
|
16
16
|
class ParameterFieldFailed(metaflow.exception.MetaflowException, metaclass=type):
|
17
17
|
def __init__(self, name, field):
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.000091 #
|
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-
|
3
|
+
# MF version: 2.12.27.1+obcheckpoint(0.1.1);ob(v1) #
|
4
|
+
# Generated on 2024-11-04T20:32:13.026808 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|