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.
Files changed (140) hide show
  1. metaflow-stubs/__init__.pyi +570 -570
  2. metaflow-stubs/cards.pyi +5 -5
  3. metaflow-stubs/cli.pyi +2 -2
  4. metaflow-stubs/client/__init__.pyi +4 -4
  5. metaflow-stubs/client/core.pyi +10 -8
  6. metaflow-stubs/client/filecache.pyi +2 -2
  7. metaflow-stubs/clone_util.pyi +2 -2
  8. metaflow-stubs/events.pyi +2 -2
  9. metaflow-stubs/exception.pyi +2 -2
  10. metaflow-stubs/flowspec.pyi +5 -5
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +4 -4
  13. metaflow-stubs/info_file.pyi +2 -2
  14. metaflow-stubs/metadata/metadata.pyi +6 -3
  15. metaflow-stubs/metadata/util.pyi +2 -2
  16. metaflow-stubs/metaflow_config.pyi +2 -2
  17. metaflow-stubs/metaflow_current.pyi +108 -108
  18. metaflow-stubs/mflog/mflog.pyi +2 -2
  19. metaflow-stubs/multicore_utils.pyi +2 -2
  20. metaflow-stubs/parameters.pyi +4 -4
  21. metaflow-stubs/plugins/__init__.pyi +2 -2
  22. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  23. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  24. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  25. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  26. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  27. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  28. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  29. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  30. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  31. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  32. metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
  33. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +6 -6
  34. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +6 -6
  35. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
  36. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  37. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  38. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  39. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  40. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  41. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  42. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +4 -4
  43. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  44. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
  45. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  46. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  47. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
  48. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  49. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  50. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  51. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +2 -2
  52. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  53. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  54. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  55. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +3 -3
  56. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  57. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  58. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  59. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  60. metaflow-stubs/plugins/cards/card_cli.pyi +5 -5
  61. metaflow-stubs/plugins/cards/card_client.pyi +3 -3
  62. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  63. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  64. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  65. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  66. metaflow-stubs/plugins/cards/card_modules/basic.pyi +4 -4
  67. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  68. metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
  69. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  70. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  71. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +3 -3
  72. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  73. metaflow-stubs/plugins/cards/component_serializer.pyi +4 -4
  74. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  75. metaflow-stubs/plugins/catch_decorator.pyi +3 -3
  76. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  77. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  78. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  79. metaflow-stubs/plugins/datatools/s3/s3.pyi +5 -5
  80. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  81. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  82. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  83. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  84. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  85. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  86. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  87. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  88. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  89. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +3 -3
  90. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  91. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  92. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  93. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  94. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  95. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  96. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
  97. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +2 -2
  98. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  99. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +4 -4
  100. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  101. metaflow-stubs/plugins/logs_cli.pyi +3 -3
  102. metaflow-stubs/plugins/package_cli.pyi +2 -2
  103. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  104. metaflow-stubs/plugins/perimeters.pyi +2 -2
  105. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  106. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  107. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  108. metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
  109. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  110. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  111. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  112. metaflow-stubs/plugins/resources_decorator.pyi +3 -3
  113. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  114. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  115. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
  116. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  117. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  118. metaflow-stubs/plugins/tag_cli.pyi +4 -4
  119. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
  120. metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
  121. metaflow-stubs/procpoll.pyi +2 -2
  122. metaflow-stubs/profilers/__init__.pyi +2 -2
  123. metaflow-stubs/pylint_wrapper.pyi +2 -2
  124. metaflow-stubs/runner/__init__.pyi +2 -2
  125. metaflow-stubs/runner/deployer.pyi +3 -3
  126. metaflow-stubs/runner/metaflow_runner.pyi +5 -33
  127. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  128. metaflow-stubs/runner/nbrun.pyi +2 -2
  129. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  130. metaflow-stubs/runner/utils.pyi +2 -2
  131. metaflow-stubs/system/__init__.pyi +3 -3
  132. metaflow-stubs/system/system_logger.pyi +3 -3
  133. metaflow-stubs/system/system_monitor.pyi +2 -2
  134. metaflow-stubs/tagging_util.pyi +2 -2
  135. metaflow-stubs/tuple_util.pyi +2 -2
  136. {ob_metaflow_stubs-6.0.3.114.dist-info → ob_metaflow_stubs-6.0.3.116.dist-info}/METADATA +1 -1
  137. ob_metaflow_stubs-6.0.3.116.dist-info/RECORD +140 -0
  138. ob_metaflow_stubs-6.0.3.114.dist-info/RECORD +0 -140
  139. {ob_metaflow_stubs-6.0.3.114.dist-info → ob_metaflow_stubs-6.0.3.116.dist-info}/WHEEL +0 -0
  140. {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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.137003 #
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.card
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.153873 #
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.143901 #
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]:
@@ -1,21 +1,23 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.132836 #
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 metaflow.events
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 typing
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.154756 #
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
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.152712 #
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.134915 #
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
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.124998 #
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
@@ -1,19 +1,19 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.134316 #
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 typing
16
+ import metaflow.parameters
17
17
 
18
18
  class DelayedEvaluationParameter(object, metaclass=type):
19
19
  """
@@ -1 +1 @@
1
- 2.12.26.1+obcheckpoint(0.1.1);ob(v1) 2024-10-23T20:57:01.109645
1
+ 2.12.27.1+obcheckpoint(0.1.1);ob(v1) 2024-11-04T20:32:12.959508
@@ -1,18 +1,18 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.139910 #
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):
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.124316 #
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.179096 #
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
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.216115 #
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.126055 #
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.226367 #
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.checkpoints.decorator
11
+ import metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.hf_hub.decorator
12
12
  import metaflow
13
- import metaflow.events
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 metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.hf_hub.decorator
18
- import typing
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 checkpoint(self) -> "metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.decorator.CurrentCheckpointer":
230
+ def card(self) -> "metaflow.plugins.cards.component_serializer.CardComponentCollector":
231
231
  """
232
- (only in the presence of the @checkpoint decorator)
232
+ (only in the presence of the @card decorator)
233
233
 
234
- The `@checkpoint` decorator makes saving/loading checkpoints available through the `current.checkpoint`.
235
- The object exposes `save`/`load`/`list` methods for saving/loading checkpoints.
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
- You can check if a checkpoint is loaded by `current.checkpoint.is_loaded` and get the checkpoint information
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
- Usage (Saving Checkpoints):
241
+ Returns
242
242
  -------
243
- ```
244
- @checkpoint
245
- @step
246
- def train(self):
247
- model = create_model(self.parameters, checkpoint_path = None)
248
- for i in range(self.epochs):
249
- # some training logic
250
- loss = model.train(self.dataset)
251
- if i % 10 == 0:
252
- model.save(
253
- current.checkpoint.directory,
254
- )
255
- # saves the contents of the `current.checkpoint.directory` as a checkpoint
256
- # and returns a reference dictionary to the checkpoint saved in the datastore
257
- self.latest_checkpoint = current.checkpoint.save(
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
- @retry(times=3)
269
- @checkpoint
261
+ @model
270
262
  @step
271
263
  def train(self):
272
- # Assume that the task has restarted and the previous attempt of the task
273
- # saved a checkpoint
274
- checkpoint_path = None
275
- if current.checkpoint.is_loaded: # Check if a checkpoint is loaded
276
- print("Loaded checkpoint from the previous attempt")
277
- checkpoint_path = current.checkpoint.directory
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
- model = create_model(self.parameters, checkpoint_path = checkpoint_path)
280
- for i in range(self.epochs):
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
- Returns
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
- The `@card` decorator makes the cards available through the `current.card`
296
- object. If multiple `@card` decorators are present, you can add an `ID` to
297
- distinguish between them using `@card(id=ID)` as the decorator. You will then
298
- be able to access that specific card using `current.card[ID].
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
- CardComponentCollector
305
- The or one of the cards attached to this step.
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 model(self) -> "metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.modeling_utils.core.ModelSerializer":
371
+ def checkpoint(self) -> "metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.decorator.CurrentCheckpointer":
372
372
  """
373
- (only in the presence of the @model decorator)
373
+ (only in the presence of the @checkpoint decorator)
374
374
 
375
- The object used for loading / saving models.
376
- `current.model` exposes a `save` method to save models and a `load` method to load models.
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
- Usage (Saving a model):
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
- @model
385
+ @checkpoint
385
386
  @step
386
387
  def train(self):
387
- # current.model.save returns a dictionary reference to the model saved
388
- self.my_model = current.model.save(
389
- path_to_my_model,
390
- label="my_model",
391
- metadata={
392
- "epochs": 10,
393
- "batch-size": 32,
394
- "learning-rate": 0.001,
395
- }
396
- )
397
- self.next(self.test)
398
-
399
- @model(load="my_model")
400
- @step
401
- def test(self):
402
- # `current.model.loaded` returns a dictionary of the loaded models
403
- # where the key is the name of the artifact and the value is the path to the model
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
- # current.model.load returns the path to the model loaded
415
- checkpoint_path = current.model.load(
416
- self.checkpoint_key,
417
- )
418
- model_path = current.model.load(
419
- self.model,
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
- ModelSerializer
428
- The object used for loading / saving models.
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 @trigger_on_finish, or @trigger decorators)
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
 
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.179460 #
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.126552 #
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
@@ -1,17 +1,17 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.127789 #
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.145685 #
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.26.1+obcheckpoint(0.1.1);ob(v1) #
4
- # Generated on 2024-10-23T20:57:01.173472 #
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