ob-metaflow-stubs 6.0.3.117__py2.py3-none-any.whl → 6.0.3.118__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. metaflow-stubs/__init__.pyi +319 -2739
  2. metaflow-stubs/cards.pyi +19 -473
  3. metaflow-stubs/cli.pyi +17 -81
  4. metaflow-stubs/client/__init__.pyi +19 -1113
  5. metaflow-stubs/client/core.pyi +18 -158
  6. metaflow-stubs/client/filecache.pyi +8 -12
  7. metaflow-stubs/clone_util.pyi +6 -26
  8. metaflow-stubs/events.pyi +6 -5
  9. metaflow-stubs/exception.pyi +8 -6
  10. metaflow-stubs/flowspec.pyi +22 -106
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +16 -564
  13. metaflow-stubs/info_file.pyi +6 -5
  14. metaflow-stubs/metadata_provider/__init__.pyi +16 -0
  15. metaflow-stubs/metadata_provider/heartbeat.pyi +34 -0
  16. metaflow-stubs/{metadata → metadata_provider}/metadata.pyi +10 -22
  17. metaflow-stubs/metadata_provider/util.pyi +19 -0
  18. metaflow-stubs/metaflow_config.pyi +8 -13
  19. metaflow-stubs/metaflow_current.pyi +134 -133
  20. metaflow-stubs/mf_extensions/__init__.pyi +6 -0
  21. metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +6 -0
  22. metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +6 -0
  23. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +6 -0
  24. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +6 -0
  25. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +129 -0
  26. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +26 -0
  27. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +156 -0
  28. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +25 -0
  29. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +111 -0
  30. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +6 -0
  31. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +188 -0
  32. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +30 -0
  33. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +28 -0
  34. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +19 -0
  35. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +115 -0
  36. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +40 -0
  37. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +6 -0
  38. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +71 -0
  39. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +56 -0
  40. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +67 -0
  41. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +49 -0
  42. metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +6 -0
  43. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +6 -0
  44. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +130 -0
  45. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +42 -0
  46. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +6 -0
  47. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +17 -0
  48. metaflow-stubs/mflog/__init__.pyi +6 -0
  49. metaflow-stubs/mflog/mflog.pyi +52 -5
  50. metaflow-stubs/multicore_utils.pyi +6 -5
  51. metaflow-stubs/parameters.pyi +13 -23
  52. metaflow-stubs/plugins/__init__.pyi +52 -165
  53. metaflow-stubs/plugins/airflow/__init__.pyi +9 -5
  54. metaflow-stubs/plugins/airflow/airflow_utils.pyi +7 -6
  55. metaflow-stubs/plugins/airflow/exception.pyi +7 -11
  56. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +10 -97
  57. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +9 -30
  58. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +9 -40
  59. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +9 -40
  60. metaflow-stubs/plugins/argo/__init__.pyi +12 -5
  61. metaflow-stubs/plugins/argo/argo_client.pyi +8 -26
  62. metaflow-stubs/plugins/argo/argo_events.pyi +7 -11
  63. metaflow-stubs/plugins/argo/argo_workflows.pyi +18 -130
  64. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
  65. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +12 -404
  66. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +63 -448
  67. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +165 -0
  68. metaflow-stubs/plugins/aws/__init__.pyi +11 -5
  69. metaflow-stubs/plugins/aws/aws_client.pyi +6 -5
  70. metaflow-stubs/plugins/aws/aws_utils.pyi +6 -11
  71. metaflow-stubs/plugins/aws/batch/__init__.pyi +9 -5
  72. metaflow-stubs/plugins/aws/batch/batch.pyi +10 -55
  73. metaflow-stubs/plugins/aws/batch/batch_client.pyi +7 -11
  74. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +15 -140
  75. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +7 -5
  76. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +10 -21
  77. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +9 -5
  78. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +6 -5
  79. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +6 -5
  80. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +7 -5
  81. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +11 -65
  82. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +6 -5
  83. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +52 -292
  84. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +127 -0
  85. metaflow-stubs/plugins/azure/__init__.pyi +12 -7
  86. metaflow-stubs/plugins/azure/azure_credential.pyi +6 -5
  87. metaflow-stubs/plugins/azure/azure_exceptions.pyi +7 -11
  88. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +11 -24
  89. metaflow-stubs/plugins/azure/azure_utils.pyi +11 -29
  90. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +8 -23
  91. metaflow-stubs/plugins/azure/includefile_support.pyi +7 -17
  92. metaflow-stubs/plugins/cards/__init__.pyi +15 -5
  93. metaflow-stubs/plugins/cards/card_cli.pyi +22 -491
  94. metaflow-stubs/plugins/cards/card_client.pyi +13 -75
  95. metaflow-stubs/plugins/cards/card_creator.pyi +7 -10
  96. metaflow-stubs/plugins/cards/card_datastore.pyi +10 -18
  97. metaflow-stubs/plugins/cards/card_decorator.pyi +10 -126
  98. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +13 -81
  99. metaflow-stubs/plugins/cards/card_modules/basic.pyi +13 -96
  100. metaflow-stubs/plugins/cards/card_modules/card.pyi +6 -5
  101. metaflow-stubs/plugins/cards/card_modules/components.pyi +24 -107
  102. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +6 -5
  103. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +6 -12
  104. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +11 -88
  105. metaflow-stubs/plugins/cards/card_resolver.pyi +6 -49
  106. metaflow-stubs/plugins/cards/component_serializer.pyi +13 -63
  107. metaflow-stubs/plugins/cards/exception.pyi +7 -11
  108. metaflow-stubs/plugins/catch_decorator.pyi +10 -30
  109. metaflow-stubs/plugins/datatools/__init__.pyi +13 -392
  110. metaflow-stubs/plugins/datatools/local.pyi +7 -11
  111. metaflow-stubs/plugins/datatools/s3/__init__.pyi +19 -653
  112. metaflow-stubs/plugins/datatools/s3/s3.pyi +16 -264
  113. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +7 -10
  114. metaflow-stubs/plugins/datatools/s3/s3util.pyi +6 -11
  115. metaflow-stubs/plugins/debug_logger.pyi +7 -5
  116. metaflow-stubs/plugins/debug_monitor.pyi +7 -5
  117. metaflow-stubs/plugins/environment_decorator.pyi +7 -5
  118. metaflow-stubs/plugins/events_decorator.pyi +8 -14
  119. metaflow-stubs/plugins/frameworks/__init__.pyi +7 -5
  120. metaflow-stubs/plugins/frameworks/pytorch.pyi +8 -45
  121. metaflow-stubs/plugins/gcp/__init__.pyi +11 -7
  122. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +11 -24
  123. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +7 -11
  124. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +6 -5
  125. metaflow-stubs/plugins/gcp/gs_utils.pyi +8 -20
  126. metaflow-stubs/plugins/gcp/includefile_support.pyi +7 -17
  127. metaflow-stubs/plugins/kubernetes/__init__.pyi +12 -5
  128. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +6 -10
  129. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +10 -38
  130. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +16 -155
  131. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +7 -11
  132. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +19 -142
  133. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +7 -11
  134. metaflow-stubs/plugins/logs_cli.pyi +10 -9
  135. metaflow-stubs/plugins/package_cli.pyi +7 -5
  136. metaflow-stubs/plugins/parallel_decorator.pyi +11 -59
  137. metaflow-stubs/plugins/perimeters.pyi +6 -11
  138. metaflow-stubs/plugins/project_decorator.pyi +8 -14
  139. metaflow-stubs/plugins/pypi/__init__.pyi +12 -11
  140. metaflow-stubs/plugins/pypi/conda_decorator.pyi +8 -27
  141. metaflow-stubs/plugins/pypi/conda_environment.pyi +14 -20
  142. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +7 -5
  143. metaflow-stubs/plugins/pypi/pypi_environment.pyi +7 -39
  144. metaflow-stubs/plugins/pypi/utils.pyi +7 -11
  145. metaflow-stubs/plugins/resources_decorator.pyi +7 -5
  146. metaflow-stubs/plugins/retry_decorator.pyi +7 -11
  147. metaflow-stubs/plugins/secrets/__init__.pyi +9 -5
  148. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +8 -13
  149. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +7 -11
  150. metaflow-stubs/plugins/storage_executor.pyi +6 -11
  151. metaflow-stubs/plugins/tag_cli.pyi +14 -396
  152. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +8 -33
  153. metaflow-stubs/plugins/timeout_decorator.pyi +8 -12
  154. metaflow-stubs/procpoll.pyi +7 -5
  155. metaflow-stubs/profilers/__init__.pyi +7 -11
  156. metaflow-stubs/pylint_wrapper.pyi +7 -11
  157. metaflow-stubs/runner/__init__.pyi +13 -5
  158. metaflow-stubs/runner/deployer.pyi +99 -223
  159. metaflow-stubs/runner/deployer_impl.pyi +87 -0
  160. metaflow-stubs/runner/metaflow_runner.pyi +24 -508
  161. metaflow-stubs/runner/nbdeploy.pyi +16 -60
  162. metaflow-stubs/runner/nbrun.pyi +11 -148
  163. metaflow-stubs/runner/subprocess_manager.pyi +9 -10
  164. metaflow-stubs/runner/utils.pyi +44 -9
  165. metaflow-stubs/system/__init__.pyi +9 -107
  166. metaflow-stubs/system/system_logger.pyi +6 -15
  167. metaflow-stubs/system/system_monitor.pyi +6 -16
  168. metaflow-stubs/tagging_util.pyi +6 -10
  169. metaflow-stubs/tuple_util.pyi +6 -5
  170. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.118.dist-info}/METADATA +1 -1
  171. ob_metaflow_stubs-6.0.3.118.dist-info/RECORD +174 -0
  172. metaflow-stubs/metadata/util.pyi +0 -18
  173. ob_metaflow_stubs-6.0.3.117.dist-info/RECORD +0 -140
  174. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.118.dist-info}/WHEEL +0 -0
  175. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.118.dist-info}/top_level.txt +0 -0
@@ -1,253 +1,27 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.380674 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.879410 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
- import metaflow.flowspec
12
+ import metaflow.exception
12
13
  import metaflow.plugins.datatools.s3.s3
13
14
  import io
14
- import metaflow.exception
15
- import metaflow.metaflow_current
16
- import metaflow.datastore.inputs
17
- import typing
18
15
 
19
- TYPE_CHECKING: bool
16
+ from ....flowspec import FlowSpec as FlowSpec
17
+ from ....metaflow_current import current as current
18
+ from ....tuple_util import namedtuple_with_defaults as namedtuple_with_defaults
19
+ from ....exception import MetaflowException as MetaflowException
20
+ from .s3util import get_s3_client as get_s3_client
21
+ from .s3util import read_in_chunks as read_in_chunks
22
+ from .s3util import get_timestamp as get_timestamp
20
23
 
21
- class FlowSpec(object, metaclass=metaflow.flowspec._FlowSpecMeta):
22
- """
23
- Main class from which all Flows should inherit.
24
-
25
- Attributes
26
- ----------
27
- index
28
- input
29
- """
30
- def __init__(self, use_cli = True):
31
- """
32
- Construct a FlowSpec
33
-
34
- Parameters
35
- ----------
36
- use_cli : bool, default True
37
- Set to True if the flow is invoked from __main__ or the command line
38
- """
39
- ...
40
- @property
41
- def script_name(self) -> str:
42
- """
43
- [Legacy function - do not use. Use `current` instead]
44
-
45
- Returns the name of the script containing the flow
46
-
47
- Returns
48
- -------
49
- str
50
- A string containing the name of the script
51
- """
52
- ...
53
- def __iter__(self):
54
- """
55
- [Legacy function - do not use]
56
-
57
- Iterate over all steps in the Flow
58
-
59
- Returns
60
- -------
61
- Iterator[graph.DAGNode]
62
- Iterator over the steps in the flow
63
- """
64
- ...
65
- def __getattr__(self, name: str):
66
- ...
67
- def cmd(self, cmdline, input = {}, output = []):
68
- """
69
- [Legacy function - do not use]
70
- """
71
- ...
72
- @property
73
- def index(self) -> typing.Optional[int]:
74
- """
75
- The index of this foreach branch.
76
-
77
- In a foreach step, multiple instances of this step (tasks) will be executed,
78
- one for each element in the foreach. This property returns the zero based index
79
- of the current task. If this is not a foreach step, this returns None.
80
-
81
- If you need to know the indices of the parent tasks in a nested foreach, use
82
- `FlowSpec.foreach_stack`.
83
-
84
- Returns
85
- -------
86
- int, optional
87
- Index of the task in a foreach step.
88
- """
89
- ...
90
- @property
91
- def input(self) -> typing.Optional[typing.Any]:
92
- """
93
- The value of the foreach artifact in this foreach branch.
94
-
95
- In a foreach step, multiple instances of this step (tasks) will be executed,
96
- one for each element in the foreach. This property returns the element passed
97
- to the current task. If this is not a foreach step, this returns None.
98
-
99
- If you need to know the values of the parent tasks in a nested foreach, use
100
- `FlowSpec.foreach_stack`.
101
-
102
- Returns
103
- -------
104
- object, optional
105
- Input passed to the foreach task.
106
- """
107
- ...
108
- def foreach_stack(self) -> typing.Optional[typing.List[typing.Tuple[int, int, typing.Any]]]:
109
- """
110
- Returns the current stack of foreach indexes and values for the current step.
111
-
112
- Use this information to understand what data is being processed in the current
113
- foreach branch. For example, considering the following code:
114
- ```
115
- @step
116
- def root(self):
117
- self.split_1 = ['a', 'b', 'c']
118
- self.next(self.nest_1, foreach='split_1')
119
-
120
- @step
121
- def nest_1(self):
122
- self.split_2 = ['d', 'e', 'f', 'g']
123
- self.next(self.nest_2, foreach='split_2'):
124
-
125
- @step
126
- def nest_2(self):
127
- foo = self.foreach_stack()
128
- ```
129
-
130
- `foo` will take the following values in the various tasks for nest_2:
131
- ```
132
- [(0, 3, 'a'), (0, 4, 'd')]
133
- [(0, 3, 'a'), (1, 4, 'e')]
134
- ...
135
- [(0, 3, 'a'), (3, 4, 'g')]
136
- [(1, 3, 'b'), (0, 4, 'd')]
137
- ...
138
- ```
139
- where each tuple corresponds to:
140
-
141
- - The index of the task for that level of the loop.
142
- - The number of splits for that level of the loop.
143
- - The value for that level of the loop.
144
-
145
- Note that the last tuple returned in a task corresponds to:
146
-
147
- - 1st element: value returned by `self.index`.
148
- - 3rd element: value returned by `self.input`.
149
-
150
- Returns
151
- -------
152
- List[Tuple[int, int, Any]]
153
- An array describing the current stack of foreach steps.
154
- """
155
- ...
156
- def merge_artifacts(self, inputs: metaflow.datastore.inputs.Inputs, exclude: typing.Optional[typing.List[str]] = None, include: typing.Optional[typing.List[str]] = None):
157
- """
158
- Helper function for merging artifacts in a join step.
159
-
160
- This function takes all the artifacts coming from the branches of a
161
- join point and assigns them to self in the calling step. Only artifacts
162
- not set in the current step are considered. If, for a given artifact, different
163
- values are present on the incoming edges, an error will be thrown and the artifacts
164
- that conflict will be reported.
165
-
166
- As a few examples, in the simple graph: A splitting into B and C and joining in D:
167
- ```
168
- A:
169
- self.x = 5
170
- self.y = 6
171
- B:
172
- self.b_var = 1
173
- self.x = from_b
174
- C:
175
- self.x = from_c
176
-
177
- D:
178
- merge_artifacts(inputs)
179
- ```
180
- In D, the following artifacts are set:
181
- - `y` (value: 6), `b_var` (value: 1)
182
- - if `from_b` and `from_c` are the same, `x` will be accessible and have value `from_b`
183
- - if `from_b` and `from_c` are different, an error will be thrown. To prevent this error,
184
- you need to manually set `self.x` in D to a merged value (for example the max) prior to
185
- calling `merge_artifacts`.
186
-
187
- Parameters
188
- ----------
189
- inputs : Inputs
190
- Incoming steps to the join point.
191
- exclude : List[str], optional, default None
192
- If specified, do not consider merging artifacts with a name in `exclude`.
193
- Cannot specify if `include` is also specified.
194
- include : List[str], optional, default None
195
- If specified, only merge artifacts specified. Cannot specify if `exclude` is
196
- also specified.
197
-
198
- Raises
199
- ------
200
- MetaflowException
201
- This exception is thrown if this is not called in a join step.
202
- UnhandledInMergeArtifactsException
203
- This exception is thrown in case of unresolved conflicts.
204
- MissingInMergeArtifactsException
205
- This exception is thrown in case an artifact specified in `include` cannot
206
- be found.
207
- """
208
- ...
209
- def next(self, *dsts: typing.Callable[..., None], **kwargs):
210
- """
211
- Indicates the next step to execute after this step has completed.
212
-
213
- This statement should appear as the last statement of each step, except
214
- the end step.
215
-
216
- There are several valid formats to specify the next step:
217
-
218
- - Straight-line connection: `self.next(self.next_step)` where `next_step` is a method in
219
- the current class decorated with the `@step` decorator.
220
-
221
- - Static fan-out connection: `self.next(self.step1, self.step2, ...)` where `stepX` are
222
- methods in the current class decorated with the `@step` decorator.
223
-
224
- - Foreach branch:
225
- ```
226
- self.next(self.foreach_step, foreach='foreach_iterator')
227
- ```
228
- In this situation, `foreach_step` is a method in the current class decorated with the
229
- `@step` decorator and `foreach_iterator` is a variable name in the current class that
230
- evaluates to an iterator. A task will be launched for each value in the iterator and
231
- each task will execute the code specified by the step `foreach_step`.
232
-
233
- Parameters
234
- ----------
235
- dsts : Callable[..., None]
236
- One or more methods annotated with `@step`.
237
-
238
- Raises
239
- ------
240
- InvalidNextException
241
- Raised if the format of the arguments does not match one of the ones given above.
242
- """
243
- ...
244
- def __str__(self):
245
- ...
246
- def __getstate__(self):
247
- ...
248
- ...
249
-
250
- current: metaflow.metaflow_current.Current
24
+ TYPE_CHECKING: bool
251
25
 
252
26
  DATATOOLS_S3ROOT: None
253
27
 
@@ -259,28 +33,6 @@ S3_SERVER_SIDE_ENCRYPTION: None
259
33
 
260
34
  TEMPDIR: str
261
35
 
262
- def namedtuple_with_defaults(typename, field_descr, defaults = ()):
263
- ...
264
-
265
- class MetaflowException(Exception, metaclass=type):
266
- def __init__(self, msg = "", lineno = None):
267
- ...
268
- def __str__(self):
269
- ...
270
- ...
271
-
272
- def get_s3_client(s3_role_arn = None, s3_session_vars = None, s3_client_params = None):
273
- ...
274
-
275
- def read_in_chunks(dst, src, src_sz, max_chunk_size):
276
- ...
277
-
278
- def get_timestamp(dt):
279
- """
280
- Python2 compatible way to compute the timestamp (seconds since 1/1/1970)
281
- """
282
- ...
283
-
284
36
  TRANSIENT_RETRY_START_LINE: str
285
37
 
286
38
  TRANSIENT_RETRY_LINE_CONTENT: str
@@ -667,7 +419,7 @@ class S3(object, metaclass=type):
667
419
  @classmethod
668
420
  def get_root_from_config(cls, echo, create_on_absent = True):
669
421
  ...
670
- def __enter__(self) -> S3:
422
+ def __enter__(self) -> "S3":
671
423
  ...
672
424
  def __exit__(self, *args):
673
425
  ...
@@ -1,17 +1,14 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.430363 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.902619 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
 
10
- def aws_retry(f):
11
- ...
12
-
13
- def get_s3_client(s3_role_arn = None, s3_session_vars = None, s3_client_params = None):
14
- ...
10
+ from .s3util import aws_retry as aws_retry
11
+ from .s3util import get_s3_client as get_s3_client
15
12
 
16
13
  class S3Tail(object, metaclass=type):
17
14
  def __init__(self, s3url):
@@ -1,18 +1,13 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.397865 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.902275 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
 
10
- class MetaflowException(Exception, metaclass=type):
11
- def __init__(self, msg = "", lineno = None):
12
- ...
13
- def __str__(self):
14
- ...
15
- ...
10
+ from ....exception import MetaflowException as MetaflowException
16
11
 
17
12
  DATATOOLS_CLIENT_PARAMS: dict
18
13
 
@@ -1,15 +1,17 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.389542 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.866607 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
12
  import metaflow.event_logger
12
13
 
14
+
13
15
  class DebugEventLogger(metaflow.event_logger.NullEventLogger, metaclass=type):
14
16
  @classmethod
15
17
  def get_worker(cls):
@@ -1,15 +1,17 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.389770 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.866850 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
12
  import metaflow.monitor
12
13
 
14
+
13
15
  class DebugMonitor(metaflow.monitor.NullMonitor, metaclass=type):
14
16
  @classmethod
15
17
  def get_worker(cls):
@@ -1,15 +1,17 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.387660 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.862926 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
12
  import metaflow.decorators
12
13
 
14
+
13
15
  class EnvironmentDecorator(metaflow.decorators.StepDecorator, metaclass=type):
14
16
  """
15
17
  Specifies environment variables to be set prior to the execution of a step.
@@ -1,24 +1,18 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.388720 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.865842 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
12
  import metaflow.decorators
12
- import metaflow.metaflow_current
13
13
 
14
- current: metaflow.metaflow_current.Current
15
-
16
- class MetaflowException(Exception, metaclass=type):
17
- def __init__(self, msg = "", lineno = None):
18
- ...
19
- def __str__(self):
20
- ...
21
- ...
14
+ from ..metaflow_current import current as current
15
+ from ..exception import MetaflowException as MetaflowException
22
16
 
23
17
  class TriggerDecorator(metaflow.decorators.FlowDecorator, metaclass=type):
24
18
  """
@@ -1,9 +1,11 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.387855 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.864038 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
 
10
+ from . import pytorch as pytorch
11
+
@@ -1,55 +1,18 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.426782 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.891132 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
- import metaflow.decorators
12
- import metaflow.metaflow_current
13
12
  import metaflow.plugins.parallel_decorator
14
13
 
15
- current: metaflow.metaflow_current.Current
16
-
17
- class ParallelDecorator(metaflow.decorators.StepDecorator, metaclass=type):
18
- """
19
- MF Add To Current
20
- -----------------
21
- parallel -> metaflow.metaflow_current.Parallel
22
- Returns a namedtuple with relevant information about the parallel task.
23
-
24
- @@ Returns
25
- -------
26
- Parallel
27
- `namedtuple` with the following fields:
28
- - main_ip (`str`)
29
- The IP address of the control task.
30
- - num_nodes (`int`)
31
- The total number of tasks created by @parallel
32
- - node_index (`int`)
33
- The index of the current task in all the @parallel tasks.
34
- - control_task_id (`Optional[str]`)
35
- The task ID of the control task. Available to all tasks.
36
-
37
- is_parallel -> bool
38
- True if the current step is a @parallel step.
39
- """
40
- def __init__(self, attributes = None, statically_defined = False):
41
- ...
42
- def runtime_step_cli(self, cli_args, retry_count, max_user_code_retries, ubf_context):
43
- ...
44
- def step_init(self, flow, graph, step_name, decorators, environment, flow_datastore, logger):
45
- ...
46
- 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):
47
- ...
48
- def task_decorate(self, step_func, flow, graph, retry_count, max_user_code_retries, ubf_context):
49
- ...
50
- def setup_distributed_env(self, flow):
51
- ...
52
- ...
14
+ from ...metaflow_current import current as current
15
+ from ..parallel_decorator import ParallelDecorator as ParallelDecorator
53
16
 
54
17
  class PytorchParallelDecorator(metaflow.plugins.parallel_decorator.ParallelDecorator, metaclass=type):
55
18
  def task_decorate(self, step_func, flow, graph, retry_count, max_user_code_retries, ubf_context):
@@ -1,12 +1,16 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.384985 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.860210 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
 
10
- def get_credentials(scopes, *args, **kwargs):
11
- ...
10
+ from . import gs_storage_client_factory as gs_storage_client_factory
11
+ from .gs_storage_client_factory import get_credentials as get_credentials
12
+ from . import gs_exceptions as gs_exceptions
13
+ from . import gs_utils as gs_utils
14
+ from . import includefile_support as includefile_support
15
+ from . import gcp_secret_manager_secrets_provider as gcp_secret_manager_secrets_provider
12
16
 
@@ -1,35 +1,22 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.401155 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.880763 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
10
+ import abc
9
11
  import typing
10
12
  if typing.TYPE_CHECKING:
13
+ import metaflow.exception
11
14
  import metaflow.plugins.secrets
12
15
  import abc
13
- import metaflow.exception
14
-
15
- class MetaflowException(Exception, metaclass=type):
16
- def __init__(self, msg = "", lineno = None):
17
- ...
18
- def __str__(self):
19
- ...
20
- ...
21
16
 
22
- class SecretsProvider(abc.ABC, metaclass=abc.ABCMeta):
23
- def get_secret_as_dict(self, secret_id, options = {}, role = None) -> typing.Dict[str, str]:
24
- """
25
- Retrieve the secret from secrets backend, and return a dictionary of
26
- environment variables.
27
- """
28
- ...
29
- ...
30
-
31
- def get_credentials(scopes, *args, **kwargs):
32
- ...
17
+ from ...exception import MetaflowException as MetaflowException
18
+ from ..secrets import SecretsProvider as SecretsProvider
19
+ from .gs_storage_client_factory import get_credentials as get_credentials
33
20
 
34
21
  GCP_SECRET_MANAGER_PREFIX: None
35
22
 
@@ -1,21 +1,17 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.400443 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-13T23:34:52.879818 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
12
  import metaflow.exception
12
13
 
13
- class MetaflowException(Exception, metaclass=type):
14
- def __init__(self, msg = "", lineno = None):
15
- ...
16
- def __str__(self):
17
- ...
18
- ...
14
+ from ...exception import MetaflowException as MetaflowException
19
15
 
20
16
  class MetaflowGSPackageError(metaflow.exception.MetaflowException, metaclass=type):
21
17
  ...