ob-metaflow-stubs 6.0.3.123__py2.py3-none-any.whl → 6.0.3.126__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. metaflow-stubs/__init__.pyi +253 -248
  2. metaflow-stubs/cards.pyi +2 -2
  3. metaflow-stubs/cli.pyi +9 -21
  4. metaflow-stubs/{plugins/package_cli.pyi → cli_components/__init__.pyi} +3 -3
  5. metaflow-stubs/cli_components/utils.pyi +35 -0
  6. metaflow-stubs/client/__init__.pyi +2 -2
  7. metaflow-stubs/client/core.pyi +4 -4
  8. metaflow-stubs/client/filecache.pyi +2 -2
  9. metaflow-stubs/events.pyi +3 -3
  10. metaflow-stubs/exception.pyi +2 -2
  11. metaflow-stubs/flowspec.pyi +10 -3
  12. metaflow-stubs/generated_for.txt +1 -1
  13. metaflow-stubs/includefile.pyi +18 -11
  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 +4 -2
  20. metaflow-stubs/metaflow_current.pyi +58 -58
  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/checkpoints/__init__.pyi +2 -2
  26. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +4 -4
  27. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +2 -2
  28. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +3 -3
  29. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +2 -2
  30. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +2 -2
  31. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +2 -2
  32. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +2 -2
  33. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +2 -2
  34. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +3 -3
  35. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +2 -2
  36. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +2 -2
  37. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +2 -2
  38. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +2 -2
  39. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +2 -2
  40. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +2 -2
  41. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +3 -3
  42. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +2 -2
  43. metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +2 -2
  44. metaflow-stubs/{mflog → mf_extensions/outerbounds/plugins}/__init__.pyi +2 -2
  45. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +6 -0
  46. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +92 -0
  47. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +2 -2
  48. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +2 -2
  49. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +2 -2
  50. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +2 -2
  51. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +3 -2
  52. metaflow-stubs/multicore_utils.pyi +2 -2
  53. metaflow-stubs/parameters.pyi +33 -16
  54. metaflow-stubs/plugins/__init__.pyi +16 -15
  55. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  56. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  57. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  58. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  59. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  60. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  61. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  62. metaflow-stubs/plugins/argo/__init__.pyi +2 -5
  63. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  64. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  65. metaflow-stubs/plugins/argo/argo_workflows.pyi +4 -3
  66. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
  67. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
  68. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +31 -3
  69. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  70. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  71. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  72. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  73. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  74. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  75. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +3 -3
  76. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  77. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +5 -5
  78. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -3
  79. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  80. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  81. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +3 -2
  82. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  83. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
  84. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +3 -3
  85. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  86. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  87. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  88. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +5 -5
  89. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  90. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  91. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  92. metaflow-stubs/plugins/cards/__init__.pyi +2 -3
  93. metaflow-stubs/plugins/cards/card_client.pyi +3 -3
  94. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  95. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  96. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  97. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  98. metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
  99. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  100. metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
  101. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  102. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  103. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  104. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  105. metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
  106. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  107. metaflow-stubs/plugins/catch_decorator.pyi +2 -2
  108. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  109. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  110. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  111. metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
  112. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  113. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  114. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  115. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  116. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  117. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  118. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  119. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  120. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  121. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +5 -5
  122. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  123. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  124. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  125. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  126. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -5
  127. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  128. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
  129. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  130. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +3 -3
  131. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  132. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  133. metaflow-stubs/plugins/perimeters.pyi +2 -2
  134. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  135. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  136. metaflow-stubs/plugins/pypi/conda_decorator.pyi +6 -2
  137. metaflow-stubs/plugins/pypi/conda_environment.pyi +5 -5
  138. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  139. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  140. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  141. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  142. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  143. metaflow-stubs/plugins/secrets/__init__.pyi +3 -3
  144. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +4 -4
  145. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  146. metaflow-stubs/plugins/snowflake/__init__.pyi +14 -0
  147. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  148. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
  149. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  150. metaflow-stubs/profilers/__init__.pyi +2 -2
  151. metaflow-stubs/pylint_wrapper.pyi +2 -2
  152. metaflow-stubs/runner/__init__.pyi +2 -2
  153. metaflow-stubs/runner/deployer.pyi +30 -30
  154. metaflow-stubs/runner/deployer_impl.pyi +3 -3
  155. metaflow-stubs/runner/metaflow_runner.pyi +4 -4
  156. metaflow-stubs/runner/nbdeploy.pyi +4 -2
  157. metaflow-stubs/runner/nbrun.pyi +3 -3
  158. metaflow-stubs/runner/subprocess_manager.pyi +5 -2
  159. metaflow-stubs/runner/utils.pyi +8 -8
  160. metaflow-stubs/system/__init__.pyi +2 -2
  161. metaflow-stubs/system/system_logger.pyi +2 -2
  162. metaflow-stubs/system/system_monitor.pyi +2 -2
  163. metaflow-stubs/tagging_util.pyi +2 -2
  164. metaflow-stubs/tuple_util.pyi +2 -2
  165. metaflow-stubs/{plugins/aws/step_functions/production_token.pyi → user_configs/__init__.pyi} +5 -11
  166. metaflow-stubs/user_configs/config_decorators.pyi +253 -0
  167. metaflow-stubs/user_configs/config_options.pyi +82 -0
  168. metaflow-stubs/user_configs/config_parameters.pyi +217 -0
  169. {ob_metaflow_stubs-6.0.3.123.dist-info → ob_metaflow_stubs-6.0.3.126.dist-info}/METADATA +1 -1
  170. ob_metaflow_stubs-6.0.3.126.dist-info/RECORD +173 -0
  171. metaflow-stubs/clone_util.pyi +0 -14
  172. metaflow-stubs/mflog/mflog.pyi +0 -69
  173. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +0 -103
  174. metaflow-stubs/plugins/cards/card_cli.pyi +0 -146
  175. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +0 -33
  176. metaflow-stubs/plugins/logs_cli.pyi +0 -46
  177. metaflow-stubs/plugins/tag_cli.pyi +0 -19
  178. metaflow-stubs/procpoll.pyi +0 -53
  179. ob_metaflow_stubs-6.0.3.123.dist-info/RECORD +0 -174
  180. {ob_metaflow_stubs-6.0.3.123.dist-info → ob_metaflow_stubs-6.0.3.126.dist-info}/WHEEL +0 -0
  181. {ob_metaflow_stubs-6.0.3.123.dist-info → ob_metaflow_stubs-6.0.3.126.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,253 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-12-17T01:10:55.769764 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing
10
+ if typing.TYPE_CHECKING:
11
+ import metaflow.user_configs.config_decorators
12
+ import metaflow.flowspec
13
+ import metaflow.user_configs.config_parameters
14
+ import metaflow.parameters
15
+ import typing
16
+ import metaflow.decorators
17
+ import functools
18
+
19
+ from ..exception import MetaflowException as MetaflowException
20
+ from .config_parameters import ConfigValue as ConfigValue
21
+ from .config_parameters import resolve_delayed_evaluator as resolve_delayed_evaluator
22
+
23
+ TYPE_CHECKING: bool
24
+
25
+ class MutableStep(object, metaclass=type):
26
+ """
27
+ A MutableStep is a wrapper passed to the `CustomStepDecorator`'s `evaluate` method
28
+ to allow the decorator to interact with the step and providing easy methods to
29
+ modify the behavior of the step.
30
+ """
31
+ def __init__(self, flow_spec: "metaflow.flowspec.FlowSpec", step: typing.Union[typing.Callable[["metaflow.decorators.FlowSpecDerived"], None], typing.Callable[["metaflow.decorators.FlowSpecDerived", typing.Any], None]]):
32
+ ...
33
+ @property
34
+ def flow(self) -> MutableFlow:
35
+ """
36
+ The flow that contains this step
37
+
38
+ Returns
39
+ -------
40
+ MutableFlow
41
+ The flow that contains this step
42
+ """
43
+ ...
44
+ @property
45
+ def decorators(self) -> typing.Generator["metaflow.decorators.StepDecorator", None, None]:
46
+ """
47
+ Iterate over all the decorators of this step. Note that the same type of decorator
48
+ may be present multiple times and no order is guaranteed.
49
+
50
+ Yields
51
+ ------
52
+ metaflow.decorators.StepDecorator
53
+ A decorator of the step
54
+ """
55
+ ...
56
+ def add_decorator(self, deco_type: functools.partial, **kwargs):
57
+ """
58
+ Add a Metaflow decorator to a step.
59
+
60
+ Parameters
61
+ ----------
62
+ deco_type : partial
63
+ The decorator class to add to this step
64
+ """
65
+ ...
66
+ def remove_decorator(self, deco_name: str, all: bool = True, **kwargs) -> bool:
67
+ """
68
+ Remove one or more Metaflow decorators from a step.
69
+
70
+ Some decorators can be applied multiple times to a step. This method allows you
71
+ to choose which decorator to remove or just remove all of them or one of them.
72
+
73
+ Parameters
74
+ ----------
75
+ deco_name : str
76
+ Name of the decorator to remove
77
+ all : bool, default True
78
+ If True, remove all instances of the decorator that match the filters
79
+ passed using kwargs (or all the instances of the decorator if no filters are
80
+ passed). If False, removes only the first found instance of the decorator.
81
+
82
+ Returns
83
+ -------
84
+ bool
85
+ Returns True if at least one decorator was removed.
86
+ """
87
+ ...
88
+ ...
89
+
90
+ class MutableFlow(object, metaclass=type):
91
+ def __init__(self, flow_spec: "metaflow.flowspec.FlowSpec"):
92
+ ...
93
+ @property
94
+ def decorators(self) -> typing.Generator["metaflow.decorators.FlowDecorator", None, None]:
95
+ """
96
+ Iterate over all the decorators of this flow. Note that the same type of decorator
97
+ may be present multiple times and no order is guaranteed.
98
+
99
+ Yields
100
+ ------
101
+ metaflow.decorators.FlowDecorator
102
+ A decorator of the flow
103
+ """
104
+ ...
105
+ @property
106
+ def configs(self) -> typing.Generator[typing.Tuple[str, metaflow.user_configs.config_parameters.ConfigValue], None, None]:
107
+ """
108
+ Iterate over all user configurations in this flow
109
+
110
+ Use this to parameterize your flow based on configuration. As an example, the
111
+ `evaluate` method of your `CustomFlowDecorator` can use this to add an
112
+ environment decorator.
113
+ ```
114
+ class MyDecorator(CustomFlowDecorator):
115
+ def evaluate(flow: MutableFlow):
116
+ val = next(flow.configs)[1].steps.start.cpu
117
+ flow.start.add_decorator(environment, vars={'mycpu': val})
118
+ return flow
119
+
120
+ @MyDecorator()
121
+ class TestFlow(FlowSpec):
122
+ config = Config('myconfig.json')
123
+
124
+ @step
125
+ def start(self):
126
+ pass
127
+ ```
128
+ can be used to add an environment decorator to the `start` step.
129
+
130
+ Yields
131
+ ------
132
+ Tuple[str, ConfigValue]
133
+ Iterates over the configurations of the flow
134
+ """
135
+ ...
136
+ @property
137
+ def parameters(self) -> typing.Generator[typing.Tuple[str, typing.Any], None, None]:
138
+ ...
139
+ @property
140
+ def steps(self) -> typing.Generator[typing.Tuple[str, MutableStep], None, None]:
141
+ """
142
+ Iterate over all the steps in this flow. The order of the steps
143
+ returned is not guaranteed.
144
+
145
+ Yields
146
+ ------
147
+ Tuple[str, MutableStep]
148
+ A tuple with the step name and the step proxy
149
+ """
150
+ ...
151
+ def add_parameter(self, name: str, value: "metaflow.parameters.Parameter", overwrite: bool = False):
152
+ ...
153
+ def remove_parameter(self, parameter_name: str) -> bool:
154
+ """
155
+ Remove a parameter from the flow.
156
+
157
+ The name given should match the name of the parameter (can be different
158
+ from the name of the parameter in the flow. You can not remove config parameters.
159
+
160
+ Parameters
161
+ ----------
162
+ parameter_name : str
163
+ Name of the parameter
164
+
165
+ Returns
166
+ -------
167
+ bool
168
+ Returns True if the parameter was removed
169
+ """
170
+ ...
171
+ def add_decorator(self, deco_type: functools.partial, **kwargs):
172
+ """
173
+ Add a Metaflow decorator to a flow.
174
+
175
+ Parameters
176
+ ----------
177
+ deco_type : partial
178
+ The decorator class to add to this flow
179
+ """
180
+ ...
181
+ def remove_decorator(self, deco_name: str, all: bool = True, **kwargs) -> bool:
182
+ """
183
+ Remove one or more Metaflow decorators from a flow.
184
+
185
+ Some decorators can be applied multiple times to a flow. This method allows you
186
+ to choose which decorator to remove or just remove all of them or one of them.
187
+
188
+ Parameters
189
+ ----------
190
+ deco_name : str
191
+ Name of the decorator to remove
192
+ all : bool, default True
193
+ If True, remove all instances of the decorator that match the filters
194
+ passed using kwargs (or all the instances of the decorator if no filters are
195
+ passed). If False, removes only the first found instance of the decorator.
196
+
197
+ Returns
198
+ -------
199
+ bool
200
+ Returns True if at least one decorator was removed.
201
+ """
202
+ ...
203
+ def __getattr__(self, name):
204
+ ...
205
+ ...
206
+
207
+ class CustomFlowDecorator(object, metaclass=type):
208
+ def __init__(self, *args, **kwargs):
209
+ ...
210
+ def __get__(self, instance, owner):
211
+ ...
212
+ def __call__(self, flow_spec: typing.Optional["metaflow.flowspec.FlowSpecMeta"] = None) -> "metaflow.flowspec.FlowSpecMeta":
213
+ ...
214
+ def init(self, *args, **kwargs):
215
+ """
216
+ This method is intended to be optionally overridden if you need to
217
+ have an initializer.
218
+ """
219
+ ...
220
+ def evaluate(self, mutable_flow: MutableFlow):
221
+ """
222
+ Implement this method to act on the flow and modify it as needed.
223
+
224
+ Parameters
225
+ ----------
226
+ mutable_flow : MutableFlow
227
+ Flow
228
+
229
+ Raises
230
+ ------
231
+ NotImplementedError
232
+ _description_
233
+ """
234
+ ...
235
+ ...
236
+
237
+ class CustomStepDecorator(object, metaclass=type):
238
+ def __init__(self, *args, **kwargs):
239
+ ...
240
+ def __get__(self, instance, owner):
241
+ ...
242
+ def __call__(self, step: typing.Union[typing.Callable[["metaflow.decorators.FlowSpecDerived"], None], typing.Callable[["metaflow.decorators.FlowSpecDerived", typing.Any], None], None] = None) -> typing.Union[typing.Callable[["metaflow.decorators.FlowSpecDerived"], None], typing.Callable[["metaflow.decorators.FlowSpecDerived", typing.Any], None]]:
243
+ ...
244
+ def init(self, *args, **kwargs):
245
+ """
246
+ This method is intended to be optionally overridden if you need to
247
+ have an initializer.
248
+ """
249
+ ...
250
+ def evaluate(self, mutable_step: MutableStep):
251
+ ...
252
+ ...
253
+
@@ -0,0 +1,82 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-12-17T01:10:55.785989 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing
10
+ import metaflow
11
+ if typing.TYPE_CHECKING:
12
+ import typing
13
+ import metaflow._vendor.click.types
14
+
15
+ from .._vendor import click as click
16
+ from .config_parameters import ConfigValue as ConfigValue
17
+ from ..exception import MetaflowException as MetaflowException
18
+ from ..exception import MetaflowInternalError as MetaflowInternalError
19
+ from ..parameters import DeployTimeField as DeployTimeField
20
+ from ..parameters import ParameterContext as ParameterContext
21
+
22
+ CONFIG_FILE: str
23
+
24
+ class ConvertPath(metaflow._vendor.click.types.Path, metaclass=type):
25
+ def convert(self, value, param, ctx):
26
+ ...
27
+ @staticmethod
28
+ def mark_as_default(value):
29
+ ...
30
+ @staticmethod
31
+ def convert_value(value, is_default):
32
+ ...
33
+ ...
34
+
35
+ class ConvertDictOrStr(metaflow._vendor.click.types.ParamType, metaclass=type):
36
+ def convert(self, value, param, ctx):
37
+ ...
38
+ @staticmethod
39
+ def convert_value(value, is_default):
40
+ ...
41
+ @staticmethod
42
+ def mark_as_default(value):
43
+ ...
44
+ ...
45
+
46
+ class MultipleTuple(metaflow._vendor.click.types.Tuple, metaclass=type):
47
+ def split_envvar_value(self, rv):
48
+ ...
49
+ ...
50
+
51
+ class ConfigInput(object, metaclass=type):
52
+ def __init__(self, req_configs: typing.List[str], defaults: typing.Dict[str, typing.Tuple[typing.Union[str, typing.Dict[typing.Any, typing.Any]], bool]], parsers: typing.Dict[str, typing.Union[str, typing.Callable[[str], typing.Dict[typing.Any, typing.Any]]]]):
53
+ ...
54
+ @staticmethod
55
+ def make_key_name(name: str) -> str:
56
+ ...
57
+ @classmethod
58
+ def set_config_file(cls, config_file: str):
59
+ ...
60
+ @classmethod
61
+ def get_config(cls, config_name: str) -> typing.Optional[typing.Dict[typing.Any, typing.Any]]:
62
+ ...
63
+ def process_configs(self, ctx, param, value):
64
+ ...
65
+ def __str__(self):
66
+ ...
67
+ def __repr__(self):
68
+ ...
69
+ ...
70
+
71
+ class LocalFileInput(metaflow._vendor.click.types.Path, metaclass=type):
72
+ def convert(self, value, param, ctx):
73
+ ...
74
+ def __str__(self):
75
+ ...
76
+ def __repr__(self):
77
+ ...
78
+ ...
79
+
80
+ def config_options(cmd):
81
+ ...
82
+
@@ -0,0 +1,217 @@
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.39.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-12-17T01:10:55.768336 #
5
+ ######################################################################################################
6
+
7
+ from __future__ import annotations
8
+
9
+ import collections
10
+ import typing
11
+ import metaflow
12
+ import abc
13
+ if typing.TYPE_CHECKING:
14
+ import abc
15
+ import collections.abc
16
+ import metaflow.user_configs.config_parameters
17
+ import metaflow.parameters
18
+ import typing
19
+
20
+ from ..exception import MetaflowException as MetaflowException
21
+ from ..parameters import Parameter as Parameter
22
+ from ..parameters import ParameterContext as ParameterContext
23
+
24
+ TYPE_CHECKING: bool
25
+
26
+ CONFIG_FILE: str
27
+
28
+ UNPACK_KEY: str
29
+
30
+ def dump_config_values(flow: "FlowSpec"):
31
+ ...
32
+
33
+ class ConfigValue(collections.abc.Mapping, metaclass=abc.ABCMeta):
34
+ """
35
+ ConfigValue is a thin wrapper around an arbitrarily nested dictionary-like
36
+ configuration object. It allows you to access elements of this nested structure
37
+ using either a "." notation or a [] notation. As an example, if your configuration
38
+ object is:
39
+ {"foo": {"bar": 42}}
40
+ you can access the value 42 using either config["foo"]["bar"] or config.foo.bar.
41
+
42
+ All "keys"" need to be valid Python identifiers
43
+ """
44
+ def __init__(self, data: typing.Dict[str, typing.Any]):
45
+ ...
46
+ def __getattr__(self, key: str) -> typing.Any:
47
+ """
48
+ Access an element of this configuration
49
+
50
+ Parameters
51
+ ----------
52
+ key : str
53
+ Element to access
54
+
55
+ Returns
56
+ -------
57
+ Any
58
+ Element of the configuration
59
+ """
60
+ ...
61
+ def __setattr__(self, name: str, value: typing.Any):
62
+ ...
63
+ def __getitem__(self, key: typing.Any) -> typing.Any:
64
+ """
65
+ Access an element of this configuration
66
+
67
+ Parameters
68
+ ----------
69
+ key : Any
70
+ Element to access
71
+
72
+ Returns
73
+ -------
74
+ Any
75
+ Element of the configuration
76
+ """
77
+ ...
78
+ def __len__(self):
79
+ ...
80
+ def __iter__(self):
81
+ ...
82
+ def __repr__(self):
83
+ ...
84
+ def __str__(self):
85
+ ...
86
+ def to_dict(self) -> typing.Dict[typing.Any, typing.Any]:
87
+ """
88
+ Returns a dictionary representation of this configuration object.
89
+
90
+ Returns
91
+ -------
92
+ Dict[Any, Any]
93
+ Dictionary equivalent of this configuration object.
94
+ """
95
+ ...
96
+ ...
97
+
98
+ class DelayEvaluator(collections.abc.Mapping, metaclass=abc.ABCMeta):
99
+ """
100
+ Small wrapper that allows the evaluation of a Config() value in a delayed manner.
101
+ This is used when we want to use config.* values in decorators for example.
102
+
103
+ It also allows the following "delayed" access on an obj that is a DelayEvaluation
104
+ - obj.x.y.z (ie: accessing members of DelayEvaluator; accesses will be delayed until
105
+ the DelayEvaluator is evaluated)
106
+ - **obj (ie: unpacking the DelayEvaluator as a dictionary). Note that this requires
107
+ special handling in whatever this is being unpacked into, specifically the handling
108
+ of _unpacked_delayed_*
109
+ """
110
+ def __init__(self, ex: str):
111
+ ...
112
+ def __iter__(self):
113
+ ...
114
+ def __getitem__(self, key):
115
+ ...
116
+ def __len__(self):
117
+ ...
118
+ def __getattr__(self, name):
119
+ ...
120
+ def __call__(self, ctx = None, deploy_time = False):
121
+ ...
122
+ ...
123
+
124
+ def config_expr(expr: str) -> DelayEvaluator:
125
+ """
126
+ Function to allow you to use an expression involving a config parameter in
127
+ places where it may not be directory accessible or if you want a more complicated
128
+ expression than just a single variable.
129
+
130
+ You can use it as follows:
131
+ - When the config is not directly accessible:
132
+
133
+ @project(name=config_expr("config").project.name)
134
+ class MyFlow(FlowSpec):
135
+ config = Config("config")
136
+ ...
137
+ - When you want a more complex expression:
138
+ class MyFlow(FlowSpec):
139
+ config = Config("config")
140
+
141
+ @environment(vars={"foo": config_expr("config.bar.baz.lower()")})
142
+ @step
143
+ def start(self):
144
+ ...
145
+
146
+ Parameters
147
+ ----------
148
+ expr : str
149
+ Expression using the config values.
150
+ """
151
+ ...
152
+
153
+ class Config(metaflow.parameters.Parameter, collections.abc.Mapping, metaclass=abc.ABCMeta):
154
+ """
155
+ Includes a configuration for this flow.
156
+
157
+ `Config` is a special type of `Parameter` but differs in a few key areas:
158
+ - it is immutable and determined at deploy time (or prior to running if not deploying
159
+ to a scheduler)
160
+ - as such, it can be used anywhere in your code including in Metaflow decorators
161
+
162
+ The value of the configuration is determines as follows:
163
+ - use the user-provided file path or value. It is an error to provide both
164
+ - if none are present:
165
+ - if a default file path (default) is provided, attempt to read this file
166
+ - if the file is present, use that value. Note that the file will be used
167
+ even if it has an invalid syntax
168
+ - if the file is not present, and a default value is present, use that
169
+ - if still None and is required, this is an error.
170
+
171
+ Parameters
172
+ ----------
173
+ name : str
174
+ User-visible configuration name.
175
+ default : Union[str, Callable[[ParameterContext], str], optional, default None
176
+ Default path from where to read this configuration. A function implies that the
177
+ value will be computed using that function.
178
+ You can only specify default or default_value.
179
+ default_value : Union[str, Dict[str, Any], Callable[[ParameterContext, Union[str, Dict[str, Any]]], Any], optional, default None
180
+ Default value for the parameter. A function
181
+ implies that the value will be computed using that function.
182
+ You can only specify default or default_value.
183
+ help : str, optional, default None
184
+ Help text to show in `run --help`.
185
+ required : bool, optional, default None
186
+ Require that the user specified a value for the configuration. Note that if
187
+ a default is provided, the required flag is ignored. A value of None is
188
+ equivalent to False.
189
+ parser : Union[str, Callable[[str], Dict[Any, Any]]], optional, default None
190
+ If a callable, it is a function that can parse the configuration string
191
+ into an arbitrarily nested dictionary. If a string, the string should refer to
192
+ a function (like "my_parser_package.my_parser.my_parser_function") which should
193
+ be able to parse the configuration string into an arbitrarily nested dictionary.
194
+ If the name starts with a ".", it is assumed to be relative to "metaflow".
195
+ show_default : bool, default True
196
+ If True, show the default value in the help text.
197
+ """
198
+ def __init__(self, name: str, default: typing.Union[str, typing.Callable[[metaflow.parameters.ParameterContext], str], None] = None, default_value: typing.Union[str, typing.Dict[str, typing.Any], typing.Callable[[metaflow.parameters.ParameterContext], typing.Union[str, typing.Dict[str, typing.Any]]], None] = None, help: typing.Optional[str] = None, required: typing.Optional[bool] = None, parser: typing.Union[str, typing.Callable[[str], typing.Dict[typing.Any, typing.Any]], None] = None, **kwargs: typing.Dict[str, str]):
199
+ ...
200
+ def load_parameter(self, v):
201
+ ...
202
+ def __getattr__(self, name):
203
+ ...
204
+ def __iter__(self):
205
+ ...
206
+ def __len__(self):
207
+ ...
208
+ def __getitem__(self, key):
209
+ ...
210
+ ...
211
+
212
+ def resolve_delayed_evaluator(v: typing.Any) -> typing.Any:
213
+ ...
214
+
215
+ def unpack_delayed_evaluator(to_unpack: typing.Dict[str, typing.Any]) -> typing.Dict[str, typing.Any]:
216
+ ...
217
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-metaflow-stubs
3
- Version: 6.0.3.123
3
+ Version: 6.0.3.126
4
4
  Summary: Metaflow Stubs: Stubs for the metaflow package
5
5
  Author: Netflix, Outerbounds & the Metaflow Community
6
6
  Author-email: help@outerbounds.co