ob-metaflow-stubs 6.0.3.127__py2.py3-none-any.whl → 6.0.3.128__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. metaflow-stubs/__init__.pyi +282 -282
  2. metaflow-stubs/cards.pyi +2 -2
  3. metaflow-stubs/cli.pyi +2 -2
  4. metaflow-stubs/cli_components/__init__.pyi +2 -2
  5. metaflow-stubs/cli_components/utils.pyi +2 -2
  6. metaflow-stubs/client/__init__.pyi +2 -2
  7. metaflow-stubs/client/core.pyi +5 -5
  8. metaflow-stubs/client/filecache.pyi +3 -3
  9. metaflow-stubs/events.pyi +3 -3
  10. metaflow-stubs/exception.pyi +2 -2
  11. metaflow-stubs/flowspec.pyi +6 -6
  12. metaflow-stubs/generated_for.txt +1 -1
  13. metaflow-stubs/includefile.pyi +5 -5
  14. metaflow-stubs/info_file.pyi +2 -2
  15. metaflow-stubs/metadata_provider/__init__.pyi +2 -2
  16. metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
  17. metaflow-stubs/metadata_provider/metadata.pyi +2 -2
  18. metaflow-stubs/metadata_provider/util.pyi +2 -2
  19. metaflow-stubs/metaflow_config.pyi +2 -2
  20. metaflow-stubs/metaflow_current.pyi +106 -106
  21. metaflow-stubs/mf_extensions/__init__.pyi +2 -2
  22. metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +2 -2
  23. metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +2 -2
  24. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +2 -2
  25. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/__init__.pyi +6 -0
  26. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/async_cards.pyi +58 -0
  27. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/deco_injection_mixin.pyi +23 -0
  28. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/extra_components.pyi +69 -0
  29. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +2 -2
  30. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/__init__.pyi +6 -0
  31. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/checkpoint_lister.pyi +76 -0
  32. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/lineage_card.pyi +33 -0
  33. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +4 -4
  34. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +2 -2
  35. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +4 -4
  36. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/decorator.pyi +249 -0
  37. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +2 -2
  38. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +2 -2
  39. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/lineage.pyi +27 -0
  40. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +2 -2
  41. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +3 -3
  42. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +2 -2
  43. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +3 -3
  44. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +2 -2
  45. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +3 -3
  46. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +2 -2
  47. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/__init__.pyi +6 -0
  48. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/decorator.pyi +206 -0
  49. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/__init__.pyi +6 -0
  50. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/core.pyi +99 -0
  51. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/exceptions.pyi +25 -0
  52. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/model_storage.pyi +80 -0
  53. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +2 -2
  54. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +2 -2
  55. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +2 -2
  56. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +2 -2
  57. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/__init__.pyi +6 -0
  58. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/base.pyi +20 -0
  59. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/tar.pyi +25 -0
  60. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +3 -3
  61. metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +2 -2
  62. metaflow-stubs/mf_extensions/outerbounds/plugins/__init__.pyi +2 -2
  63. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +2 -2
  64. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +2 -2
  65. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +2 -2
  66. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +2 -2
  67. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +2 -2
  68. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +2 -2
  69. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +2 -2
  70. metaflow-stubs/multicore_utils.pyi +2 -2
  71. metaflow-stubs/parameters.pyi +5 -5
  72. metaflow-stubs/plugins/__init__.pyi +11 -11
  73. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  74. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  75. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  76. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  77. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  78. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  79. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  80. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  81. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  82. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  83. metaflow-stubs/plugins/argo/argo_workflows.pyi +2 -2
  84. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
  85. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +4 -4
  86. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
  87. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  88. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  89. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  90. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  91. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  92. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  93. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
  94. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  95. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +2 -2
  96. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  97. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  98. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  99. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  100. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  101. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
  102. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +3 -3
  103. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  104. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  105. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  106. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +2 -2
  107. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  108. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  109. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  110. metaflow-stubs/plugins/cards/__init__.pyi +6 -6
  111. metaflow-stubs/plugins/cards/card_client.pyi +2 -2
  112. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  113. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  114. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  115. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  116. metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
  117. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  118. metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
  119. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  120. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  121. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  122. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  123. metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
  124. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  125. metaflow-stubs/plugins/catch_decorator.pyi +3 -3
  126. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  127. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  128. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  129. metaflow-stubs/plugins/datatools/s3/s3.pyi +4 -4
  130. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  131. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  132. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  133. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  134. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  135. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  136. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  137. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  138. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  139. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +2 -2
  140. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  141. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  142. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  143. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  144. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  145. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  146. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +3 -3
  147. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  148. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
  149. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  150. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  151. metaflow-stubs/plugins/perimeters.pyi +2 -2
  152. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  153. metaflow-stubs/plugins/pypi/__init__.pyi +3 -3
  154. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  155. metaflow-stubs/plugins/pypi/conda_environment.pyi +5 -5
  156. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  157. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  158. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  159. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  160. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  161. metaflow-stubs/plugins/secrets/__init__.pyi +3 -3
  162. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
  163. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  164. metaflow-stubs/plugins/snowflake/__init__.pyi +2 -2
  165. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  166. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
  167. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  168. metaflow-stubs/profilers/__init__.pyi +2 -2
  169. metaflow-stubs/pylint_wrapper.pyi +2 -2
  170. metaflow-stubs/runner/__init__.pyi +2 -2
  171. metaflow-stubs/runner/deployer.pyi +30 -30
  172. metaflow-stubs/runner/deployer_impl.pyi +2 -2
  173. metaflow-stubs/runner/metaflow_runner.pyi +3 -3
  174. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  175. metaflow-stubs/runner/nbrun.pyi +2 -2
  176. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  177. metaflow-stubs/runner/utils.pyi +3 -3
  178. metaflow-stubs/system/__init__.pyi +2 -2
  179. metaflow-stubs/system/system_logger.pyi +3 -3
  180. metaflow-stubs/system/system_monitor.pyi +2 -2
  181. metaflow-stubs/tagging_util.pyi +2 -2
  182. metaflow-stubs/tuple_util.pyi +2 -2
  183. metaflow-stubs/user_configs/__init__.pyi +2 -2
  184. metaflow-stubs/user_configs/config_decorators.pyi +6 -6
  185. metaflow-stubs/user_configs/config_options.pyi +4 -4
  186. metaflow-stubs/user_configs/config_parameters.pyi +6 -6
  187. {ob_metaflow_stubs-6.0.3.127.dist-info → ob_metaflow_stubs-6.0.3.128.dist-info}/METADATA +1 -1
  188. ob_metaflow_stubs-6.0.3.128.dist-info/RECORD +191 -0
  189. ob_metaflow_stubs-6.0.3.127.dist-info/RECORD +0 -173
  190. {ob_metaflow_stubs-6.0.3.127.dist-info → ob_metaflow_stubs-6.0.3.128.dist-info}/WHEEL +0 -0
  191. {ob_metaflow_stubs-6.0.3.127.dist-info → ob_metaflow_stubs-6.0.3.128.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,69 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.105637 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing
10
+ import metaflow
11
+ if typing.TYPE_CHECKING:
12
+ import metaflow.plugins.cards.card_modules.card
13
+ import metaflow.plugins.cards.card_modules.components
14
+
15
+ from ......plugins.cards.card_modules.components import VegaChart as VegaChart
16
+ from ......plugins.cards.card_modules.card import MetaflowCardComponent as MetaflowCardComponent
17
+ from ......plugins.cards.card_modules.components import Artifact as Artifact
18
+ from ......plugins.cards.card_modules.components import Table as Table
19
+ from ......plugins.cards.card_modules.components import with_default_component_id as with_default_component_id
20
+ from ......plugins.cards.card_modules.convert_to_native_type import TaskToDict as TaskToDict
21
+ from ......plugins.cards.card_modules.basic import ArtifactsComponent as ArtifactsComponent
22
+ from ......plugins.cards.card_modules.components import UserComponent as UserComponent
23
+ from ......plugins.cards.card_modules.basic import TableComponent as TableComponent
24
+ from ......plugins.cards.card_modules.basic import SectionComponent as SectionComponent
25
+ from ......plugins.cards.card_modules.renderer_tools import render_safely as render_safely
26
+ from ......metaflow_current import current as current
27
+
28
+ def update_spec_data(spec, data):
29
+ ...
30
+
31
+ def update_data_object(data_object, data):
32
+ ...
33
+
34
+ def line_chart_spec(title = None, x_name = 'u', y_name = 'v', xtitle = None, ytitle = None, width = 600, height = 400, with_params = True, x_axis_temporal = False):
35
+ ...
36
+
37
+ class LineChart(metaflow.plugins.cards.card_modules.components.UserComponent, metaclass=type):
38
+ def __init__(self, title, xtitle, ytitle, x_name, y_name, with_params = False, x_axis_temporal = False, width = None, height = None):
39
+ ...
40
+ def update(self, data):
41
+ ...
42
+ def render(self, *args, **kwargs):
43
+ ...
44
+ ...
45
+
46
+ class ArtifactTable(metaflow.plugins.cards.card_modules.components.Artifact, metaclass=type):
47
+ def __init__(self, data_dict):
48
+ ...
49
+ def render(self, *args, **kwargs):
50
+ ...
51
+ ...
52
+
53
+ class UpadateableTable(metaflow.plugins.cards.card_modules.components.UserComponent, metaclass=type):
54
+ """
55
+ Parameters
56
+ ----------
57
+ data : List[List[str or MetaflowCardComponent]], optional
58
+ List (rows) of lists (columns). Each item can be a string or a `MetaflowCardComponent`.
59
+ headers : List[str], optional
60
+ Optional header row for the table.
61
+ """
62
+ def update(self, row: typing.List[typing.Union[str, metaflow.plugins.cards.card_modules.card.MetaflowCardComponent]]):
63
+ ...
64
+ def __init__(self, data: typing.Optional[typing.List[typing.List[typing.Union[str, metaflow.plugins.cards.card_modules.card.MetaflowCardComponent]]]] = None, headers: typing.Optional[typing.List[str]] = None, disable_updates: bool = False):
65
+ ...
66
+ def render(self, *args, **kwargs):
67
+ ...
68
+ ...
69
+
@@ -1,6 +1,6 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.927066 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.014407 #
5
5
  ######################################################################################################
6
6
 
@@ -0,0 +1,6 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.066857 #
5
+ ######################################################################################################
6
+
@@ -0,0 +1,76 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.066910 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing
10
+ import threading
11
+ import metaflow
12
+ if typing.TYPE_CHECKING:
13
+ import threading
14
+ import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.card_utils.async_cards
15
+ import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
16
+
17
+ from ...card_utils.deco_injection_mixin import CardDecoratorInjector as CardDecoratorInjector
18
+ from ...card_utils.async_cards import CardRefresher as CardRefresher
19
+ from ...card_utils.async_cards import AsyncPeriodicRefresher as AsyncPeriodicRefresher
20
+ from ...card_utils.extra_components import LineChart as LineChart
21
+ from ...card_utils.extra_components import UpadateableTable as UpadateableTable
22
+ from ...datastructures import CheckpointArtifact as CheckpointArtifact
23
+ from .lineage_card import construct_lineage_table as construct_lineage_table
24
+ from .lineage_card import create_checkpoint_card as create_checkpoint_card
25
+ from .lineage_card import null_card as null_card
26
+ from .lineage_card import format_datetime as format_datetime
27
+ from ...utils.general import unit_convert as unit_convert
28
+ from .......plugins.cards.card_modules.components import Markdown as Markdown
29
+ from .......plugins.cards.card_modules.components import Table as Table
30
+ from .......plugins.cards.card_modules.components import Artifact as Artifact
31
+ from .......plugins.cards.card_modules.components import VegaChart as VegaChart
32
+
33
+ def human_readable_date(date):
34
+ ...
35
+
36
+ def determine_nice_value(time_range_seconds):
37
+ """
38
+ Function to determine the 'nice' value based on the time range in seconds.
39
+ """
40
+ ...
41
+
42
+ def generate_vega_timeline(data_objects):
43
+ ...
44
+
45
+ class CheckpointListRefresher(metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.card_utils.async_cards.CardRefresher, metaclass=type):
46
+ def __init__(self, loaded_checkpoint: typing.Optional[metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures.CheckpointArtifact], lineage_stack: typing.Optional[typing.List[metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures.CheckpointArtifact]], load_policy: str):
47
+ ...
48
+ def on_error(self, current_card, error_message):
49
+ ...
50
+ def on_startup(self, current_card):
51
+ ...
52
+ def first_time_render(self, current_card, data_object, force_refresh = False):
53
+ ...
54
+ def data_update(self, current_card, data_object):
55
+ ...
56
+ def on_update(self, current_card, data_object):
57
+ ...
58
+ def on_final(self, current_card, data_object):
59
+ ...
60
+ ...
61
+
62
+ class CheckpointsCollector(threading.Thread, metaclass=type):
63
+ def __init__(self, refresher: metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.card_utils.async_cards.CardRefresher, interval = 1):
64
+ ...
65
+ def collect(self):
66
+ ...
67
+ def final_update(self):
68
+ ...
69
+ def run_update(self):
70
+ ...
71
+ def run(self):
72
+ ...
73
+ def stop(self):
74
+ ...
75
+ ...
76
+
@@ -0,0 +1,33 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.067273 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing
10
+ if typing.TYPE_CHECKING:
11
+ import metaflow.plugins.cards.card_modules.card
12
+
13
+ from .......plugins.cards.card_modules.components import Table as Table
14
+ from .......plugins.cards.card_modules.components import Markdown as Markdown
15
+ from .......plugins.cards.card_modules.card import MetaflowCardComponent as MetaflowCardComponent
16
+ from .......plugins.cards.card_modules.components import Artifact as Artifact
17
+ from .......plugins.cards.card_modules.basic import DagComponent as DagComponent
18
+ from .......plugins.cards.card_modules.basic import SectionComponent as SectionComponent
19
+
20
+ TYPE_CHECKING: bool
21
+
22
+ def format_datetime(iso_str):
23
+ ...
24
+
25
+ def null_card(load_policy):
26
+ ...
27
+
28
+ def construct_lineage_table(lineage):
29
+ ...
30
+
31
+ def create_checkpoint_card(loaded_checkpoint: "Checkpoint", checkpoint_lineage: typing.List["Checkpoint"], load_policy: str) -> typing.List[metaflow.plugins.cards.card_modules.card.MetaflowCardComponent]:
32
+ ...
33
+
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:51.013938 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.104414 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -9,10 +9,10 @@ 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
13
- import metaflow.datastore.datastore_storage
14
12
  import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastore.core
15
13
  import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.checkpoint_storage
14
+ import metaflow.datastore.datastore_storage
15
+ import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
16
16
 
17
17
  from ..exceptions import KeyNotCompatibleWithObjectException as KeyNotCompatibleWithObjectException
18
18
  from ..utils.identity_utils import pathspec_hash as pathspec_hash
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.950387 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.037169 #
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.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.974016 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.063291 #
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.datastructures
12
- import metaflow
13
11
  import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.core
14
12
  import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.checkpoint_storage
13
+ import metaflow
14
+ import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
15
15
 
16
16
  from ......metaflow_current import current as current
17
17
  from ......exception import MetaflowException as MetaflowException
@@ -0,0 +1,249 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.039290 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing
10
+ import metaflow
11
+ if typing.TYPE_CHECKING:
12
+ import metaflow.decorators
13
+ import os
14
+ import metaflow
15
+ import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
16
+
17
+ from .exceptions import CheckpointException as CheckpointException
18
+ from ..utils import flowspec_utils as flowspec_utils
19
+ from ..card_utils.deco_injection_mixin import CardDecoratorInjector as CardDecoratorInjector
20
+ from ..card_utils.async_cards import AsyncPeriodicRefresher as AsyncPeriodicRefresher
21
+ from .cards.checkpoint_lister import CheckpointListRefresher as CheckpointListRefresher
22
+ from .cards.checkpoint_lister import CheckpointsCollector as CheckpointsCollector
23
+ from .cards.lineage_card import create_checkpoint_card as create_checkpoint_card
24
+ from .cards.lineage_card import null_card as null_card
25
+ from .lineage import checkpoint_load_related_metadata as checkpoint_load_related_metadata
26
+ from .lineage import trace_lineage as trace_lineage
27
+ from .constructors import load_checkpoint as load_checkpoint
28
+ from .core import ScopeResolver as ScopeResolver
29
+ from .core import CheckpointLoadPolicy as CheckpointLoadPolicy
30
+ from ..datastructures import CheckpointArtifact as CheckpointArtifact
31
+ from .final_api import Checkpoint as Checkpoint
32
+
33
+ DEFAULT_NAME: str
34
+
35
+ CHECKPOINT_TAG_PREFIX: str
36
+
37
+ CHECKPOINT_TASK_IDENTIFIER_ENV_VAR_NAME: str
38
+
39
+ CHECKPOINT_UID_ENV_VAR_NAME: str
40
+
41
+ TASK_CHECKPOINTS_ARTIFACT_NAME: str
42
+
43
+ TASK_LATEST_CHECKPOINT_ARTIFACT_NAME: str
44
+
45
+ DEFAULT_STORAGE_FORMAT: str
46
+
47
+ INTERNAL_ARTIFACTS_SET: set
48
+
49
+ TYPE_CHECKING: bool
50
+
51
+ def warning_message(message, logger = None, ts = False, prefix = '[@checkpoint]'):
52
+ ...
53
+
54
+ class CurrentCheckpointer(object, metaclass=type):
55
+ @property
56
+ def task_identifier(self):
57
+ ...
58
+ @property
59
+ def directory(self):
60
+ ...
61
+ @property
62
+ def is_loaded(self):
63
+ ...
64
+ @property
65
+ def info(self):
66
+ ...
67
+ def __init__(self, flow, task_identifier, resolved_scope, logger, gang_scheduled_task = False, temp_dir_root = None):
68
+ ...
69
+ def save(self, path: typing.Union[str, os.PathLike, None] = None, name: typing.Optional[str] = 'mfchckpt', metadata: typing.Optional[typing.Dict] = {}, latest: bool = True, storage_format: str = 'files'):
70
+ """
71
+ Saves the checkpoint to the datastore.
72
+
73
+ Parameters
74
+ ----------
75
+ path : Optional[Union[str, os.PathLike]], default: None
76
+ The path to save the checkpoint. Accepts a file path or a directory path.
77
+ - If a directory path is provided, all the contents within that directory will be saved.
78
+ When a checkpoint is reloaded during task retries, `the current.checkpoint.directory` will
79
+ contain the contents of this directory.
80
+ - If a file path is provided, the file will be directly saved to the datastore (with the same filename).
81
+ When the checkpoint is reloaded during task retries, the file with the same name will be available in the
82
+ `current.checkpoint.directory`.
83
+ - If no path is provided then the `current.checkpoint.directory` will be saved as the checkpoint.
84
+
85
+ name : Optional[str], default: "mfchckpt"
86
+ The name of the checkpoint.
87
+
88
+ metadata : Optional[Dict], default: {}
89
+ Any metadata that needs to be saved with the checkpoint.
90
+
91
+ latest : bool, default: True
92
+ If True, the checkpoint will be marked as the latest checkpoint.
93
+ This helps determine if the checkpoint gets loaded when the task restarts.
94
+
95
+ storage_format : str, default: files
96
+ If `tar`, the contents of the directory will be tarred before saving to the datastore.
97
+ If `files`, saves directory directly to the datastore.
98
+ """
99
+ ...
100
+ def list(self, name: typing.Optional[str] = None, task: typing.Union["metaflow.Task", str, None] = None, attempt: typing.Optional[int] = None, within_task: bool = True):
101
+ ...
102
+ def cleanup(self):
103
+ ...
104
+ def refresh_directory(self):
105
+ ...
106
+ def load(self, reference: typing.Union[str, typing.Dict, metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures.CheckpointArtifact], path: typing.Optional[str] = None):
107
+ """
108
+ loads a checkpoint reference from the datastore. (resembles a read op)
109
+
110
+ This can have two meanings:
111
+ - If the path is provided, it will load the checkpoint in the provided path
112
+ - If no path is provided, it will load the checkpoint in the default directory
113
+
114
+ Parameters
115
+ ----------
116
+
117
+ `reference` :
118
+ - can be a string, dict or a CheckpointArtifact object:
119
+ - string: a string reference to the checkpoint
120
+ - dict: a dictionary form of the CheckpointArtifact
121
+ - CheckpointArtifact: a CheckpointArtifact object reference to the checkpoint
122
+ """
123
+ ...
124
+ ...
125
+
126
+ def merge_dicts_with_precedence(*args: dict) -> dict:
127
+ """
128
+ Merges multiple dictionaries, respecting the order of precedence.
129
+
130
+ This function takes any number of dictionary arguments and merges them into a single dictionary.
131
+ If the same key exists in multiple dictionaries, the value from the dictionary that appears
132
+ last in the argument list takes precedence, except where the value is None, in which case
133
+ the search continues in the earlier dictionaries for a non-None value.
134
+
135
+ The operation is not recursive and will only consider top-level keys.
136
+
137
+ Parameters:
138
+ - args: A variable number of dictionary arguments. Each argument must be a dictionary.
139
+
140
+ Returns:
141
+ - dict: A single dictionary that results from merging the input dictionaries according to their order of precedence.
142
+
143
+ Examples:
144
+ - merge_dicts_with_precedence(defaults, attrs)
145
+ Here, `defaults` is a dictionary of default values, and `attrs` contains override values.
146
+ Any None values in `attrs` will result in values from `defaults` being used.
147
+
148
+ - merge_dicts_with_precedence(defaults, global_config, attrs)
149
+ In this scenario, `global_config` can override `defaults`, and `attrs` can override both
150
+ `defaults` and `global_config`. The order of arguments defines the precedence.
151
+
152
+ Note:
153
+ The function behaves differently if the order of the arguments changes, reflecting the
154
+ precedence of the values set based on their position in the argument list.
155
+ """
156
+ ...
157
+
158
+ class CheckpointDecorator(metaflow.decorators.StepDecorator, metaclass=type):
159
+ """
160
+ Enables checkpointing for a step.
161
+
162
+
163
+ Parameters
164
+ ----------
165
+ load_policy : str, default: "fresh"
166
+ The policy for loading the checkpoint. The following policies are supported:
167
+ - "eager": Loads the the latest available checkpoint within the namespace.
168
+ With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
169
+ will be loaded at the start of the task.
170
+ - "none": Do not load any checkpoint
171
+ - "fresh": Loads the lastest checkpoint created within the running Task.
172
+ This mode helps loading checkpoints across various retry attempts of the same task.
173
+ With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
174
+ created within the task will be loaded when the task is retries execution on failure.
175
+
176
+ temp_dir_root : str, default: None
177
+ The root directory under which `current.checkpoint.directory` will be created.
178
+
179
+
180
+ MF Add To Current
181
+ -----------------
182
+ checkpoint -> metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.decorator.CurrentCheckpointer
183
+ The `@checkpoint` decorator makes saving/loading checkpoints available through the `current.checkpoint`.
184
+ The object exposes `save`/`load`/`list` methods for saving/loading checkpoints.
185
+
186
+ You can check if a checkpoint is loaded by `current.checkpoint.is_loaded` and get the checkpoint information
187
+ by using `current.checkpoint.info`. The `current.checkpoint.directory` returns the path to the checkpoint directory
188
+ where the checkpoint maybe loaded or saved.
189
+
190
+ Usage (Saving Checkpoints):
191
+ -------
192
+ ```
193
+ @checkpoint
194
+ @step
195
+ def train(self):
196
+ model = create_model(self.parameters, checkpoint_path = None)
197
+ for i in range(self.epochs):
198
+ # some training logic
199
+ loss = model.train(self.dataset)
200
+ if i % 10 == 0:
201
+ model.save(
202
+ current.checkpoint.directory,
203
+ )
204
+ # saves the contents of the `current.checkpoint.directory` as a checkpoint
205
+ # and returns a reference dictionary to the checkpoint saved in the datastore
206
+ self.latest_checkpoint = current.checkpoint.save(
207
+ name="epoch_checkpoint",
208
+ metadata={
209
+ "epoch": i,
210
+ "loss": loss,
211
+ }
212
+ )
213
+ ```
214
+ Usage (Using Loaded Checkpoints):
215
+ -------
216
+ ```
217
+ @retry(times=3)
218
+ @checkpoint
219
+ @step
220
+ def train(self):
221
+ # Assume that the task has restarted and the previous attempt of the task
222
+ # saved a checkpoint
223
+ checkpoint_path = None
224
+ if current.checkpoint.is_loaded: # Check if a checkpoint is loaded
225
+ print("Loaded checkpoint from the previous attempt")
226
+ checkpoint_path = current.checkpoint.directory
227
+
228
+ model = create_model(self.parameters, checkpoint_path = checkpoint_path)
229
+ for i in range(self.epochs):
230
+ ...
231
+ ```
232
+
233
+ @@ Returns
234
+ -------
235
+ CurrentCheckpointer
236
+ The object for handling checkpointing within a step.
237
+ """
238
+ def step_init(self, flow, graph, step_name, decorators, environment, flow_datastore, logger):
239
+ ...
240
+ def task_exception(self, exception, step_name, flow, graph, retry_count, max_user_code_retries):
241
+ ...
242
+ def task_pre_step(self, step_name, task_datastore, metadata, run_id, task_id, flow, graph, retry_count, max_user_code_retries, ubf_context, inputs):
243
+ ...
244
+ def task_decorate(self, step_func, flow, graph, retry_count, max_user_code_retries, ubf_context):
245
+ ...
246
+ def task_post_step(self, step_name, flow, graph, retry_count, max_user_code_retries):
247
+ ...
248
+ ...
249
+
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.950605 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.037392 #
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.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.927112 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.014456 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -0,0 +1,27 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.067535 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing
10
+ if typing.TYPE_CHECKING:
11
+ import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
12
+
13
+ from ......metadata_provider.metadata import MetaDatum as MetaDatum
14
+ from ..datastructures import CheckpointArtifact as CheckpointArtifact
15
+ from .core import CheckpointReferenceResolver as CheckpointReferenceResolver
16
+
17
+ TYPE_CHECKING: bool
18
+
19
+ def checkpoint_load_related_metadata(checkpoint: metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures.CheckpointArtifact, current_attempt):
20
+ ...
21
+
22
+ def trace_lineage(flow, checkpoint: metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures.CheckpointArtifact):
23
+ """
24
+ Trace the lineage of the checkpoint by tracing the previous paths.
25
+ """
26
+ ...
27
+
@@ -1,6 +1,6 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.951215 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.037997 #
5
5
  ######################################################################################################
6
6
 
@@ -1,15 +1,15 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.975275 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.064530 #
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.datastore_storage
12
11
  import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastore.core
12
+ import metaflow.datastore.datastore_storage
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.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:51.030083 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.120179 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -1,13 +1,13 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.951266 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.038055 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- import metaflow
10
9
  import typing
10
+ import metaflow
11
11
  if typing.TYPE_CHECKING:
12
12
  import metaflow.exception
13
13
  import metaflow
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:51.030276 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.068638 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -1,13 +1,13 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-17T21:56:50.928096 #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.6);ob(v1) #
4
+ # Generated on 2024-12-18T07:29:34.015510 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- import metaflow
10
9
  import typing
10
+ import metaflow
11
11
  if typing.TYPE_CHECKING:
12
12
  import metaflow.mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
13
13