metaflow-stubs 2.12.28__py2.py3-none-any.whl → 2.12.30__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. metaflow-stubs/__init__.pyi +279 -2983
  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 +19 -159
  6. metaflow-stubs/client/filecache.pyi +7 -11
  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 +21 -105
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +17 -565
  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 -11
  19. metaflow-stubs/metaflow_current.pyi +32 -31
  20. metaflow-stubs/mflog/__init__.pyi +6 -0
  21. metaflow-stubs/mflog/mflog.pyi +52 -5
  22. metaflow-stubs/multicore_utils.pyi +6 -5
  23. metaflow-stubs/parameters.pyi +12 -22
  24. metaflow-stubs/plugins/__init__.pyi +51 -163
  25. metaflow-stubs/plugins/airflow/__init__.pyi +12 -5
  26. metaflow-stubs/plugins/airflow/airflow.pyi +19 -130
  27. metaflow-stubs/plugins/airflow/airflow_cli.pyi +17 -136
  28. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +7 -26
  29. metaflow-stubs/plugins/airflow/airflow_utils.pyi +7 -6
  30. metaflow-stubs/plugins/airflow/exception.pyi +7 -11
  31. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +10 -97
  32. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +9 -30
  33. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +9 -40
  34. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +9 -40
  35. metaflow-stubs/plugins/argo/__init__.pyi +12 -5
  36. metaflow-stubs/plugins/argo/argo_client.pyi +8 -26
  37. metaflow-stubs/plugins/argo/argo_events.pyi +7 -11
  38. metaflow-stubs/plugins/argo/argo_workflows.pyi +17 -121
  39. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
  40. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +12 -404
  41. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +65 -322
  42. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +165 -0
  43. metaflow-stubs/plugins/aws/__init__.pyi +11 -5
  44. metaflow-stubs/plugins/aws/aws_client.pyi +6 -5
  45. metaflow-stubs/plugins/aws/aws_utils.pyi +6 -11
  46. metaflow-stubs/plugins/aws/batch/__init__.pyi +10 -5
  47. metaflow-stubs/plugins/aws/batch/batch.pyi +10 -55
  48. metaflow-stubs/plugins/aws/batch/batch_cli.pyi +10 -31
  49. metaflow-stubs/plugins/aws/batch/batch_client.pyi +7 -11
  50. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +15 -140
  51. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +7 -5
  52. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +10 -21
  53. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +15 -5
  54. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +6 -5
  55. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +6 -5
  56. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +6 -5
  57. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +7 -5
  58. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +11 -65
  59. metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +19 -175
  60. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +6 -5
  61. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +8 -37
  62. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +53 -290
  63. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +127 -0
  64. metaflow-stubs/plugins/azure/__init__.pyi +12 -7
  65. metaflow-stubs/plugins/azure/azure_credential.pyi +6 -5
  66. metaflow-stubs/plugins/azure/azure_exceptions.pyi +7 -11
  67. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +11 -24
  68. metaflow-stubs/plugins/azure/azure_utils.pyi +11 -29
  69. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +8 -23
  70. metaflow-stubs/plugins/azure/includefile_support.pyi +7 -17
  71. metaflow-stubs/plugins/cards/__init__.pyi +15 -5
  72. metaflow-stubs/plugins/cards/card_cli.pyi +22 -491
  73. metaflow-stubs/plugins/cards/card_client.pyi +14 -76
  74. metaflow-stubs/plugins/cards/card_creator.pyi +7 -10
  75. metaflow-stubs/plugins/cards/card_datastore.pyi +10 -18
  76. metaflow-stubs/plugins/cards/card_decorator.pyi +10 -126
  77. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +14 -81
  78. metaflow-stubs/plugins/cards/card_modules/basic.pyi +13 -96
  79. metaflow-stubs/plugins/cards/card_modules/card.pyi +6 -5
  80. metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +12 -73
  81. metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +6 -61
  82. metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +6 -5
  83. metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +8 -45
  84. metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +7 -6
  85. metaflow-stubs/plugins/cards/card_modules/components.pyi +24 -107
  86. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +6 -5
  87. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +6 -12
  88. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +11 -88
  89. metaflow-stubs/plugins/cards/card_resolver.pyi +6 -49
  90. metaflow-stubs/plugins/cards/component_serializer.pyi +13 -63
  91. metaflow-stubs/plugins/cards/exception.pyi +7 -11
  92. metaflow-stubs/plugins/catch_decorator.pyi +9 -29
  93. metaflow-stubs/plugins/datatools/__init__.pyi +13 -392
  94. metaflow-stubs/plugins/datatools/local.pyi +7 -11
  95. metaflow-stubs/plugins/datatools/s3/__init__.pyi +19 -653
  96. metaflow-stubs/plugins/datatools/s3/s3.pyi +15 -263
  97. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +7 -10
  98. metaflow-stubs/plugins/datatools/s3/s3util.pyi +6 -11
  99. metaflow-stubs/plugins/debug_logger.pyi +7 -5
  100. metaflow-stubs/plugins/debug_monitor.pyi +7 -5
  101. metaflow-stubs/plugins/environment_decorator.pyi +7 -5
  102. metaflow-stubs/plugins/events_decorator.pyi +8 -14
  103. metaflow-stubs/plugins/frameworks/__init__.pyi +7 -5
  104. metaflow-stubs/plugins/frameworks/pytorch.pyi +8 -45
  105. metaflow-stubs/plugins/gcp/__init__.pyi +11 -7
  106. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +11 -24
  107. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +7 -11
  108. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +6 -5
  109. metaflow-stubs/plugins/gcp/gs_utils.pyi +8 -20
  110. metaflow-stubs/plugins/gcp/includefile_support.pyi +7 -17
  111. metaflow-stubs/plugins/kubernetes/__init__.pyi +13 -5
  112. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +6 -10
  113. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +9 -29
  114. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +16 -155
  115. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +9 -72
  116. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +19 -142
  117. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +8 -41
  118. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +7 -11
  119. metaflow-stubs/plugins/logs_cli.pyi +10 -9
  120. metaflow-stubs/plugins/package_cli.pyi +7 -5
  121. metaflow-stubs/plugins/parallel_decorator.pyi +11 -59
  122. metaflow-stubs/plugins/project_decorator.pyi +8 -14
  123. metaflow-stubs/plugins/pypi/__init__.pyi +12 -11
  124. metaflow-stubs/plugins/pypi/conda_decorator.pyi +8 -27
  125. metaflow-stubs/plugins/pypi/conda_environment.pyi +13 -19
  126. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +7 -5
  127. metaflow-stubs/plugins/pypi/pypi_environment.pyi +7 -39
  128. metaflow-stubs/plugins/pypi/utils.pyi +7 -11
  129. metaflow-stubs/plugins/resources_decorator.pyi +7 -5
  130. metaflow-stubs/plugins/retry_decorator.pyi +7 -11
  131. metaflow-stubs/plugins/secrets/__init__.pyi +9 -5
  132. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +9 -14
  133. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +7 -11
  134. metaflow-stubs/plugins/storage_executor.pyi +6 -11
  135. metaflow-stubs/plugins/tag_cli.pyi +14 -396
  136. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +9 -34
  137. metaflow-stubs/plugins/timeout_decorator.pyi +7 -11
  138. metaflow-stubs/procpoll.pyi +7 -5
  139. metaflow-stubs/pylint_wrapper.pyi +7 -11
  140. metaflow-stubs/runner/__init__.pyi +13 -5
  141. metaflow-stubs/runner/deployer.pyi +102 -210
  142. metaflow-stubs/runner/deployer_impl.pyi +87 -0
  143. metaflow-stubs/runner/metaflow_runner.pyi +23 -507
  144. metaflow-stubs/runner/nbdeploy.pyi +16 -60
  145. metaflow-stubs/runner/nbrun.pyi +11 -148
  146. metaflow-stubs/runner/subprocess_manager.pyi +9 -10
  147. metaflow-stubs/runner/utils.pyi +44 -9
  148. metaflow-stubs/system/__init__.pyi +9 -87
  149. metaflow-stubs/system/system_logger.pyi +7 -6
  150. metaflow-stubs/system/system_monitor.pyi +6 -5
  151. metaflow-stubs/tagging_util.pyi +6 -10
  152. metaflow-stubs/tuple_util.pyi +6 -5
  153. metaflow-stubs/version.pyi +6 -5
  154. {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.30.dist-info}/METADATA +2 -2
  155. metaflow_stubs-2.12.30.dist-info/RECORD +158 -0
  156. {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.30.dist-info}/WHEEL +1 -1
  157. metaflow-stubs/metadata/util.pyi +0 -18
  158. metaflow_stubs-2.12.28.dist-info/RECORD +0 -152
  159. {metaflow_stubs-2.12.28.dist-info → metaflow_stubs-2.12.30.dist-info}/top_level.txt +0 -0
@@ -1,499 +1,30 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.28 #
4
- # Generated on 2024-11-01T10:21:04.519892 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30 #
4
+ # Generated on 2024-11-13T13:50:31.335212 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- import typing
10
- if typing.TYPE_CHECKING:
11
- import typing
12
- import datetime
13
- import metaflow.client.core
14
- import metaflow.exception
15
- import metaflow.parameters
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.28 #
4
- # Generated on 2024-11-01T10:21:04.493057 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30 #
4
+ # Generated on 2024-11-13T13:50:31.324542 #
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.28 #
4
- # Generated on 2024-11-01T10:21:04.514777 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30 #
4
+ # Generated on 2024-11-13T13:50:31.332216 #
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