ob-metaflow-stubs 6.0.3.117__py2.py3-none-any.whl → 6.0.3.119__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 +318 -2738
  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 +7 -6
  9. metaflow-stubs/exception.pyi +8 -6
  10. metaflow-stubs/flowspec.pyi +20 -104
  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 +45 -44
  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 +17 -129
  64. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
  65. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +11 -403
  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 +14 -76
  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 +15 -263
  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 +9 -34
  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 +7 -16
  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.119.dist-info}/METADATA +1 -1
  171. ob_metaflow_stubs-6.0.3.119.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.119.dist-info}/WHEEL +0 -0
  175. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/top_level.txt +0 -0
@@ -1,499 +1,30 @@
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.406117 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.2+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-21T22:12:20.852447 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- import typing
10
- if typing.TYPE_CHECKING:
11
- import datetime
12
- import typing
13
- import metaflow.client.core
14
- import metaflow.parameters
15
- import metaflow.exception
16
9
 
17
- class Task(metaflow.client.core.MetaflowObject, metaclass=type):
18
- """
19
- A `Task` represents an execution of a `Step`.
20
-
21
- It contains all `DataArtifact` objects produced by the task as
22
- well as metadata related to execution.
23
-
24
- Note that the `@retry` decorator may cause multiple attempts of
25
- the task to be present. Usually you want the latest attempt, which
26
- is what instantiating a `Task` object returns by default. If
27
- you need to e.g. retrieve logs from a failed attempt, you can
28
- explicitly get information about a specific attempt by using the
29
- following syntax when creating a task:
30
-
31
- `Task('flow/run/step/task', attempt=<attempt>)`
32
-
33
- where `attempt=0` corresponds to the first attempt etc.
34
-
35
- Attributes
36
- ----------
37
- metadata : List[Metadata]
38
- List of all metadata events associated with the task.
39
- metadata_dict : Dict[str, str]
40
- A condensed version of `metadata`: A dictionary where keys
41
- are names of metadata events and values the latest corresponding event.
42
- data : MetaflowData
43
- Container of all data artifacts produced by this task. Note that this
44
- call downloads all data locally, so it can be slower than accessing
45
- artifacts individually. See `MetaflowData` for more information.
46
- artifacts : MetaflowArtifacts
47
- Container of `DataArtifact` objects produced by this task.
48
- successful : bool
49
- True if the task completed successfully.
50
- finished : bool
51
- True if the task completed.
52
- exception : object
53
- Exception raised by this task if there was one.
54
- finished_at : datetime
55
- Time this task finished.
56
- runtime_name : str
57
- Runtime this task was executed on.
58
- stdout : str
59
- Standard output for the task execution.
60
- stderr : str
61
- Standard error output for the task execution.
62
- code : MetaflowCode
63
- Code package for this task (if present). See `MetaflowCode`.
64
- environment_info : Dict[str, str]
65
- Information about the execution environment.
66
- """
67
- def __init__(self, *args, **kwargs):
68
- ...
69
- @property
70
- def metadata(self) -> typing.List[metaflow.client.core.Metadata]:
71
- """
72
- Metadata events produced by this task across all attempts of the task
73
- *except* if you selected a specific task attempt.
74
-
75
- Note that Metadata is different from tags.
76
-
77
- Returns
78
- -------
79
- List[Metadata]
80
- Metadata produced by this task
81
- """
82
- ...
83
- @property
84
- def metadata_dict(self) -> typing.Dict[str, str]:
85
- """
86
- Dictionary mapping metadata names (keys) and their associated values.
87
-
88
- Note that unlike the metadata() method, this call will only return the latest
89
- metadata for a given name. For example, if a task executes multiple times (retries),
90
- the same metadata name will be generated multiple times (one for each execution of the
91
- task). The metadata() method returns all those metadata elements whereas this call will
92
- return the metadata associated with the latest execution of the task.
93
-
94
- Returns
95
- -------
96
- Dict[str, str]
97
- Dictionary mapping metadata name with value
98
- """
99
- ...
100
- @property
101
- def index(self) -> typing.Optional[int]:
102
- """
103
- Returns the index of the innermost foreach loop if this task is run inside at least
104
- one foreach.
105
-
106
- The index is what distinguishes the various tasks inside a given step.
107
- This call returns None if this task was not run in a foreach loop.
108
-
109
- Returns
110
- -------
111
- int, optional
112
- Index in the innermost loop for this task
113
- """
114
- ...
115
- @property
116
- def data(self) -> metaflow.client.core.MetaflowData:
117
- """
118
- Returns a container of data artifacts produced by this task.
119
-
120
- You can access data produced by this task as follows:
121
- ```
122
- print(task.data.my_var)
123
- ```
124
-
125
- Returns
126
- -------
127
- MetaflowData
128
- Container of all artifacts produced by this task
129
- """
130
- ...
131
- @property
132
- def artifacts(self) -> typing.NamedTuple:
133
- """
134
- Returns a container of DataArtifacts produced by this task.
135
-
136
- You can access each DataArtifact by name like so:
137
- ```
138
- print(task.artifacts.my_var)
139
- ```
140
- This method differs from data() because it returns DataArtifact objects
141
- (which contain additional metadata) as opposed to just the data.
142
-
143
- Returns
144
- -------
145
- MetaflowArtifacts
146
- Container of all DataArtifacts produced by this task
147
- """
148
- ...
149
- @property
150
- def successful(self) -> bool:
151
- """
152
- Indicates whether or not the task completed successfully.
153
-
154
- This information is always about the latest task to have completed (in case
155
- of retries).
156
-
157
- Returns
158
- -------
159
- bool
160
- True if the task completed successfully and False otherwise
161
- """
162
- ...
163
- @property
164
- def finished(self) -> bool:
165
- """
166
- Indicates whether or not the task completed.
167
-
168
- This information is always about the latest task to have completed (in case
169
- of retries).
170
-
171
- Returns
172
- -------
173
- bool
174
- True if the task completed and False otherwise
175
- """
176
- ...
177
- @property
178
- def exception(self) -> typing.Optional[typing.Any]:
179
- """
180
- Returns the exception that caused the task to fail, if any.
181
-
182
- This information is always about the latest task to have completed (in case
183
- of retries). If successful() returns False and finished() returns True,
184
- this method can help determine what went wrong.
185
-
186
- Returns
187
- -------
188
- object
189
- Exception raised by the task or None if not applicable
190
- """
191
- ...
192
- @property
193
- def finished_at(self) -> typing.Optional[datetime.datetime]:
194
- """
195
- Returns the datetime object of when the task finished (successfully or not).
196
-
197
- This information is always about the latest task to have completed (in case
198
- of retries). This call will return None if the task is not finished.
199
-
200
- Returns
201
- -------
202
- datetime
203
- Datetime of when the task finished
204
- """
205
- ...
206
- @property
207
- def runtime_name(self) -> typing.Optional[str]:
208
- """
209
- Returns the name of the runtime this task executed on.
210
-
211
-
212
- Returns
213
- -------
214
- str
215
- Name of the runtime this task executed on
216
- """
217
- ...
218
- @property
219
- def stdout(self) -> str:
220
- """
221
- Returns the full standard out of this task.
222
-
223
- If you specify a specific attempt for this task, it will return the
224
- standard out for that attempt. If you do not specify an attempt,
225
- this will return the current standard out for the latest *started*
226
- attempt of the task. In both cases, multiple calls to this
227
- method will return the most up-to-date log (so if an attempt is not
228
- done, each call will fetch the latest log).
229
-
230
- Returns
231
- -------
232
- str
233
- Standard output of this task
234
- """
235
- ...
236
- @property
237
- def stdout_size(self) -> int:
238
- """
239
- Returns the size of the stdout log of this task.
240
-
241
- Similar to `stdout`, the size returned is the latest size of the log
242
- (so for a running attempt, this value will increase as the task produces
243
- more output).
244
-
245
- Returns
246
- -------
247
- int
248
- Size of the stdout log content (in bytes)
249
- """
250
- ...
251
- @property
252
- def stderr(self) -> str:
253
- """
254
- Returns the full standard error of this task.
255
-
256
- If you specify a specific attempt for this task, it will return the
257
- standard error for that attempt. If you do not specify an attempt,
258
- this will return the current standard error for the latest *started*
259
- attempt. In both cases, multiple calls to this
260
- method will return the most up-to-date log (so if an attempt is not
261
- done, each call will fetch the latest log).
262
-
263
- Returns
264
- -------
265
- str
266
- Standard error of this task
267
- """
268
- ...
269
- @property
270
- def stderr_size(self) -> int:
271
- """
272
- Returns the size of the stderr log of this task.
273
-
274
- Similar to `stderr`, the size returned is the latest size of the log
275
- (so for a running attempt, this value will increase as the task produces
276
- more output).
277
-
278
- Returns
279
- -------
280
- int
281
- Size of the stderr log content (in bytes)
282
- """
283
- ...
284
- @property
285
- def current_attempt(self) -> int:
286
- """
287
- Get the relevant attempt for this Task.
288
-
289
- Returns the specific attempt used when
290
- initializing the instance, or the latest *started* attempt for the Task.
291
-
292
- Returns
293
- -------
294
- int
295
- attempt id for this task object
296
- """
297
- ...
298
- @property
299
- def code(self) -> typing.Optional[metaflow.client.core.MetaflowCode]:
300
- """
301
- Returns the MetaflowCode object for this task, if present.
302
-
303
- Not all tasks save their code so this call may return None in those cases.
304
-
305
- Returns
306
- -------
307
- MetaflowCode
308
- Code package for this task
309
- """
310
- ...
311
- @property
312
- def environment_info(self) -> typing.Dict[str, typing.Any]:
313
- """
314
- Returns information about the environment that was used to execute this task. As an
315
- example, if the Conda environment is selected, this will return information about the
316
- dependencies that were used in the environment.
317
-
318
- This environment information is only available for tasks that have a code package.
319
-
320
- Returns
321
- -------
322
- Dict
323
- Dictionary describing the environment
324
- """
325
- ...
326
- def loglines(self, stream: str, as_unicode: bool = True, meta_dict: typing.Optional[typing.Dict[str, typing.Any]] = None) -> typing.Iterator[typing.Tuple[datetime.datetime, str]]:
327
- """
328
- Return an iterator over (utc_timestamp, logline) tuples.
329
-
330
- Parameters
331
- ----------
332
- stream : str
333
- Either 'stdout' or 'stderr'.
334
- as_unicode : bool, default: True
335
- If as_unicode=False, each logline is returned as a byte object. Otherwise,
336
- it is returned as a (unicode) string.
337
-
338
- Yields
339
- ------
340
- Tuple[datetime, str]
341
- Tuple of timestamp, logline pairs.
342
- """
343
- ...
344
- def __iter__(self) -> typing.Iterator[metaflow.client.core.DataArtifact]:
345
- """
346
- Iterate over all children DataArtifact of this Task
347
-
348
- Yields
349
- ------
350
- DataArtifact
351
- A DataArtifact in this Step
352
- """
353
- ...
354
- def __getitem__(self, name: str) -> metaflow.client.core.DataArtifact:
355
- """
356
- Returns the DataArtifact object with the artifact name 'name'
357
-
358
- Parameters
359
- ----------
360
- name : str
361
- Data artifact name
362
-
363
- Returns
364
- -------
365
- DataArtifact
366
- DataArtifact for this artifact name in this task
367
-
368
- Raises
369
- ------
370
- KeyError
371
- If the name does not identify a valid DataArtifact object
372
- """
373
- ...
374
- def __getstate__(self):
375
- ...
376
- def __setstate__(self, state):
377
- ...
378
- ...
379
-
380
- JSONType: metaflow.parameters.JSONTypeClass
381
-
382
- def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
383
- """
384
- Switch namespace to the one provided.
385
-
386
- This call has a global effect. No objects outside this namespace
387
- will be accessible. To access all objects regardless of namespaces,
388
- pass None to this call.
389
-
390
- Parameters
391
- ----------
392
- ns : str, optional
393
- Namespace to switch to or None to ignore namespaces.
394
-
395
- Returns
396
- -------
397
- str, optional
398
- Namespace set (result of get_namespace()).
399
- """
400
- ...
401
-
402
- class CommandException(metaflow.exception.MetaflowException, metaclass=type):
403
- ...
404
-
405
- class MetaflowNotFound(metaflow.exception.MetaflowException, metaclass=type):
406
- ...
407
-
408
- class MetaflowNamespaceMismatch(metaflow.exception.MetaflowException, metaclass=type):
409
- def __init__(self, namespace):
410
- ...
411
- ...
412
-
413
- class CardDatastore(object, metaclass=type):
414
- @classmethod
415
- def get_storage_root(cls, storage_type):
416
- ...
417
- def __init__(self, flow_datastore, pathspec = None):
418
- ...
419
- @classmethod
420
- def get_card_location(cls, base_path, card_name, uuid, card_id = None, suffix = "html"):
421
- ...
422
- @staticmethod
423
- def info_from_path(path, suffix = "html"):
424
- """
425
- Args:
426
- path (str): The path to the card
427
-
428
- Raises:
429
- Exception: When the card_path is invalid
430
-
431
- Returns:
432
- CardInfo
433
- """
434
- ...
435
- def save_data(self, uuid, card_type, json_data, card_id = None):
436
- ...
437
- def save_card(self, uuid, card_type, card_html, card_id = None, overwrite = True):
438
- ...
439
- def create_full_path(self, card_path):
440
- ...
441
- def get_card_names(self, card_paths):
442
- ...
443
- def get_card_html(self, path):
444
- ...
445
- def get_card_data(self, path):
446
- ...
447
- def cache_locally(self, path, save_path = None):
448
- """
449
- Saves the data present in the `path` the `metaflow_card_cache` directory or to the `save_path`.
450
- """
451
- ...
452
- def extract_data_paths(self, card_type = None, card_hash = None, card_id = None):
453
- ...
454
- def extract_card_paths(self, card_type = None, card_hash = None, card_id = None):
455
- ...
456
- ...
10
+ from ...client.core import Task as Task
11
+ from ...parameters import JSONTypeClass as JSONTypeClass
12
+ from ...client.core import namespace as namespace
13
+ from ...exception import CommandException as CommandException
14
+ from ...exception import MetaflowNotFound as MetaflowNotFound
15
+ from ...exception import MetaflowNamespaceMismatch as MetaflowNamespaceMismatch
16
+ from ..._vendor import click as click
17
+ from .card_datastore import CardDatastore as CardDatastore
18
+ from .exception import CardClassFoundException as CardClassFoundException
19
+ from .exception import IncorrectCardArgsException as IncorrectCardArgsException
20
+ from .exception import UnrenderableCardException as UnrenderableCardException
21
+ from .exception import CardNotPresentException as CardNotPresentException
22
+ from .exception import TaskNotFoundException as TaskNotFoundException
23
+ from .card_resolver import resolve_paths_from_task as resolve_paths_from_task
24
+ from .card_resolver import resumed_info as resumed_info
457
25
 
458
26
  NUM_SHORT_HASH_CHARS: int
459
27
 
460
- class CardClassFoundException(metaflow.exception.MetaflowException, metaclass=type):
461
- """
462
- This exception is raised with MetaflowCard class is not present for a particular card type.
463
- """
464
- def __init__(self, card_name):
465
- ...
466
- ...
467
-
468
- class IncorrectCardArgsException(metaflow.exception.MetaflowException, metaclass=type):
469
- def __init__(self, card_type, args):
470
- ...
471
- ...
472
-
473
- class UnrenderableCardException(metaflow.exception.MetaflowException, metaclass=type):
474
- def __init__(self, card_type, args):
475
- ...
476
- ...
477
-
478
- class CardNotPresentException(metaflow.exception.MetaflowException, metaclass=type):
479
- """
480
- This exception is raised with a card is not present in the datastore.
481
- """
482
- def __init__(self, pathspec, card_type = None, card_hash = None, card_id = None):
483
- ...
484
- ...
485
-
486
- class TaskNotFoundException(metaflow.exception.MetaflowException, metaclass=type):
487
- def __init__(self, pathspec_query, resolved_from, run_id = None):
488
- ...
489
- ...
490
-
491
- def resolve_paths_from_task(flow_datastore, pathspec = None, type = None, hash = None, card_id = None):
492
- ...
493
-
494
- def resumed_info(task):
495
- ...
496
-
497
28
  class CardRenderInfo(tuple, metaclass=type):
498
29
  """
499
30
  CardRenderInfo(mode, is_implemented, data, timed_out, timeout_stack_trace)
@@ -556,10 +87,10 @@ def timeout(time):
556
87
  def raise_timeout(signum, frame):
557
88
  ...
558
89
 
559
- def list_available_cards(ctx, pathspec, card_paths, card_datastore, command = "view", show_list_as_json = False, list_many = False, file = None):
90
+ def list_available_cards(ctx, pathspec, card_paths, card_datastore, command = 'view', show_list_as_json = False, list_many = False, file = None):
560
91
  ...
561
92
 
562
- def make_command(script_name, taskspec, command = "get", hash = None):
93
+ def make_command(script_name, taskspec, command = 'get', hash = None):
563
94
  ...
564
95
 
565
96
  def list_many_cards(ctx, type = None, hash = None, card_id = None, follow_resumed = None, as_json = None, file = None):
@@ -1,90 +1,28 @@
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.372636 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.2+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-21T22:12:20.819686 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
- import metaflow.plugins.cards.card_client
12
11
  import metaflow
13
- import metaflow.exception
12
+ import metaflow.plugins.cards.card_client
13
+
14
+ from .card_resolver import resolve_paths_from_task as resolve_paths_from_task
15
+ from .card_resolver import resumed_info as resumed_info
16
+ from .card_datastore import CardDatastore as CardDatastore
17
+ from .card_datastore import CardNameSuffix as CardNameSuffix
18
+ from .exception import UnresolvableDatastoreException as UnresolvableDatastoreException
19
+ from .exception import IncorrectArgumentException as IncorrectArgumentException
20
+ from .exception import IncorrectPathspecException as IncorrectPathspecException
14
21
 
15
22
  TYPE_CHECKING: bool
16
23
 
17
24
  CARD_SUFFIX: str
18
25
 
19
- def resolve_paths_from_task(flow_datastore, pathspec = None, type = None, hash = None, card_id = None):
20
- ...
21
-
22
- def resumed_info(task):
23
- ...
24
-
25
- class CardDatastore(object, metaclass=type):
26
- @classmethod
27
- def get_storage_root(cls, storage_type):
28
- ...
29
- def __init__(self, flow_datastore, pathspec = None):
30
- ...
31
- @classmethod
32
- def get_card_location(cls, base_path, card_name, uuid, card_id = None, suffix = "html"):
33
- ...
34
- @staticmethod
35
- def info_from_path(path, suffix = "html"):
36
- """
37
- Args:
38
- path (str): The path to the card
39
-
40
- Raises:
41
- Exception: When the card_path is invalid
42
-
43
- Returns:
44
- CardInfo
45
- """
46
- ...
47
- def save_data(self, uuid, card_type, json_data, card_id = None):
48
- ...
49
- def save_card(self, uuid, card_type, card_html, card_id = None, overwrite = True):
50
- ...
51
- def create_full_path(self, card_path):
52
- ...
53
- def get_card_names(self, card_paths):
54
- ...
55
- def get_card_html(self, path):
56
- ...
57
- def get_card_data(self, path):
58
- ...
59
- def cache_locally(self, path, save_path = None):
60
- """
61
- Saves the data present in the `path` the `metaflow_card_cache` directory or to the `save_path`.
62
- """
63
- ...
64
- def extract_data_paths(self, card_type = None, card_hash = None, card_id = None):
65
- ...
66
- def extract_card_paths(self, card_type = None, card_hash = None, card_id = None):
67
- ...
68
- ...
69
-
70
- class CardNameSuffix(object, metaclass=type):
71
- ...
72
-
73
- class UnresolvableDatastoreException(metaflow.exception.MetaflowException, metaclass=type):
74
- def __init__(self, task):
75
- ...
76
- ...
77
-
78
- class IncorrectArgumentException(metaflow.exception.MetaflowException, metaclass=type):
79
- def __init__(self, obj_type):
80
- ...
81
- ...
82
-
83
- class IncorrectPathspecException(metaflow.exception.MetaflowException, metaclass=type):
84
- def __init__(self, pthspec):
85
- ...
86
- ...
87
-
88
26
  class Card(object, metaclass=type):
89
27
  """
90
28
  `Card` represents an individual Metaflow Card, a single HTML file, produced by
@@ -1,16 +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.403239 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.2+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-21T22:12:20.851203 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- import typing
10
- if typing.TYPE_CHECKING:
11
- import metaflow.metaflow_current
12
9
 
13
- current: metaflow.metaflow_current.Current
10
+ from ...metaflow_current import current as current
14
11
 
15
12
  ASYNC_TIMEOUT: int
16
13
 
@@ -23,7 +20,7 @@ class CardProcessManager(object, metaclass=type):
23
20
  class CardCreator(object, metaclass=type):
24
21
  def __init__(self, top_level_options):
25
22
  ...
26
- def create(self, card_uuid = None, user_set_card_id = None, runtime_card = False, decorator_attributes = None, card_options = None, logger = None, mode = "render", final = False, sync = False):
23
+ def create(self, card_uuid = None, user_set_card_id = None, runtime_card = False, decorator_attributes = None, card_options = None, logger = None, mode = 'render', final = False, sync = False):
27
24
  ...
28
25
  ...
29
26