wandb 0.20.2rc20250616__py3-none-musllinux_1_2_aarch64.whl → 0.21.1__py3-none-musllinux_1_2_aarch64.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 (140) hide show
  1. wandb/__init__.py +16 -14
  2. wandb/__init__.pyi +450 -472
  3. wandb/agents/pyagent.py +41 -12
  4. wandb/analytics/sentry.py +7 -2
  5. wandb/apis/importers/mlflow.py +1 -1
  6. wandb/apis/internal.py +3 -0
  7. wandb/apis/paginator.py +17 -4
  8. wandb/apis/public/__init__.py +1 -1
  9. wandb/apis/public/api.py +606 -359
  10. wandb/apis/public/artifacts.py +214 -16
  11. wandb/apis/public/automations.py +19 -3
  12. wandb/apis/public/files.py +177 -38
  13. wandb/apis/public/history.py +67 -15
  14. wandb/apis/public/integrations.py +25 -2
  15. wandb/apis/public/jobs.py +90 -2
  16. wandb/apis/public/projects.py +161 -69
  17. wandb/apis/public/query_generator.py +11 -1
  18. wandb/apis/public/registries/registries_search.py +7 -15
  19. wandb/apis/public/reports.py +147 -13
  20. wandb/apis/public/runs.py +315 -128
  21. wandb/apis/public/sweeps.py +222 -22
  22. wandb/apis/public/teams.py +41 -4
  23. wandb/apis/public/users.py +45 -4
  24. wandb/automations/__init__.py +10 -10
  25. wandb/automations/_filters/run_metrics.py +0 -2
  26. wandb/automations/_utils.py +0 -2
  27. wandb/automations/actions.py +0 -2
  28. wandb/automations/automations.py +0 -2
  29. wandb/automations/events.py +0 -2
  30. wandb/beta/workflows.py +66 -30
  31. wandb/bin/gpu_stats +0 -0
  32. wandb/bin/wandb-core +0 -0
  33. wandb/cli/cli.py +80 -1
  34. wandb/env.py +8 -0
  35. wandb/errors/errors.py +4 -1
  36. wandb/integration/catboost/catboost.py +6 -2
  37. wandb/integration/kfp/kfp_patch.py +3 -1
  38. wandb/integration/lightning/fabric/logger.py +3 -4
  39. wandb/integration/metaflow/__init__.py +6 -0
  40. wandb/integration/metaflow/data_pandas.py +74 -0
  41. wandb/integration/metaflow/errors.py +13 -0
  42. wandb/integration/metaflow/metaflow.py +205 -190
  43. wandb/integration/openai/fine_tuning.py +1 -2
  44. wandb/integration/sb3/sb3.py +3 -3
  45. wandb/integration/ultralytics/callback.py +6 -2
  46. wandb/jupyter.py +5 -5
  47. wandb/plot/__init__.py +2 -0
  48. wandb/plot/bar.py +30 -29
  49. wandb/plot/confusion_matrix.py +75 -71
  50. wandb/plot/custom_chart.py +30 -7
  51. wandb/plot/histogram.py +26 -25
  52. wandb/plot/line.py +33 -32
  53. wandb/plot/line_series.py +100 -103
  54. wandb/plot/pr_curve.py +33 -32
  55. wandb/plot/roc_curve.py +38 -38
  56. wandb/plot/scatter.py +27 -27
  57. wandb/proto/v3/wandb_internal_pb2.py +366 -385
  58. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  59. wandb/proto/v3/wandb_telemetry_pb2.py +4 -4
  60. wandb/proto/v4/wandb_internal_pb2.py +352 -356
  61. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  62. wandb/proto/v4/wandb_telemetry_pb2.py +4 -4
  63. wandb/proto/v5/wandb_internal_pb2.py +352 -356
  64. wandb/proto/v5/wandb_settings_pb2.py +2 -2
  65. wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
  66. wandb/proto/v6/wandb_internal_pb2.py +352 -356
  67. wandb/proto/v6/wandb_settings_pb2.py +2 -2
  68. wandb/proto/v6/wandb_telemetry_pb2.py +4 -4
  69. wandb/proto/wandb_deprecated.py +6 -0
  70. wandb/sdk/artifacts/_generated/__init__.py +12 -1
  71. wandb/sdk/artifacts/_generated/input_types.py +20 -2
  72. wandb/sdk/artifacts/_generated/link_artifact.py +21 -0
  73. wandb/sdk/artifacts/_generated/operations.py +9 -0
  74. wandb/sdk/artifacts/_internal_artifact.py +19 -8
  75. wandb/sdk/artifacts/_validators.py +48 -2
  76. wandb/sdk/artifacts/artifact.py +269 -96
  77. wandb/sdk/data_types/audio.py +38 -10
  78. wandb/sdk/data_types/base_types/media.py +15 -63
  79. wandb/sdk/data_types/base_types/wb_value.py +6 -6
  80. wandb/sdk/data_types/graph.py +48 -14
  81. wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +1 -3
  82. wandb/sdk/data_types/helper_types/image_mask.py +1 -3
  83. wandb/sdk/data_types/histogram.py +34 -21
  84. wandb/sdk/data_types/html.py +35 -12
  85. wandb/sdk/data_types/image.py +104 -68
  86. wandb/sdk/data_types/molecule.py +32 -19
  87. wandb/sdk/data_types/object_3d.py +36 -17
  88. wandb/sdk/data_types/plotly.py +18 -5
  89. wandb/sdk/data_types/saved_model.py +7 -9
  90. wandb/sdk/data_types/table.py +99 -70
  91. wandb/sdk/data_types/trace_tree.py +12 -12
  92. wandb/sdk/data_types/video.py +53 -26
  93. wandb/sdk/integration_utils/auto_logging.py +2 -2
  94. wandb/sdk/interface/interface.py +8 -19
  95. wandb/sdk/interface/interface_shared.py +7 -16
  96. wandb/sdk/internal/datastore.py +18 -18
  97. wandb/sdk/internal/handler.py +3 -5
  98. wandb/sdk/internal/internal_api.py +60 -0
  99. wandb/sdk/internal/job_builder.py +6 -0
  100. wandb/sdk/internal/sender.py +23 -3
  101. wandb/sdk/internal/sender_config.py +9 -0
  102. wandb/sdk/launch/_project_spec.py +3 -3
  103. wandb/sdk/launch/agent/agent.py +11 -4
  104. wandb/sdk/launch/agent/job_status_tracker.py +3 -1
  105. wandb/sdk/launch/agent/run_queue_item_file_saver.py +2 -2
  106. wandb/sdk/launch/create_job.py +3 -1
  107. wandb/sdk/launch/inputs/internal.py +3 -4
  108. wandb/sdk/launch/inputs/schema.py +1 -0
  109. wandb/sdk/launch/runner/kubernetes_monitor.py +1 -0
  110. wandb/sdk/launch/runner/kubernetes_runner.py +328 -1
  111. wandb/sdk/launch/sweeps/scheduler.py +2 -3
  112. wandb/sdk/launch/utils.py +3 -3
  113. wandb/sdk/lib/asyncio_compat.py +3 -0
  114. wandb/sdk/lib/console_capture.py +66 -19
  115. wandb/sdk/lib/deprecate.py +1 -7
  116. wandb/sdk/lib/disabled.py +1 -1
  117. wandb/sdk/lib/hashutil.py +14 -1
  118. wandb/sdk/lib/module.py +7 -13
  119. wandb/sdk/lib/progress.py +0 -19
  120. wandb/sdk/lib/sock_client.py +0 -4
  121. wandb/sdk/wandb_init.py +67 -93
  122. wandb/sdk/wandb_login.py +18 -14
  123. wandb/sdk/wandb_metric.py +2 -0
  124. wandb/sdk/wandb_require.py +0 -1
  125. wandb/sdk/wandb_run.py +429 -527
  126. wandb/sdk/wandb_settings.py +364 -74
  127. wandb/sdk/wandb_setup.py +28 -28
  128. wandb/sdk/wandb_sweep.py +14 -13
  129. wandb/sdk/wandb_watch.py +4 -6
  130. wandb/sync/sync.py +10 -0
  131. wandb/util.py +57 -0
  132. wandb/wandb_run.py +1 -2
  133. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/METADATA +1 -1
  134. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/RECORD +793 -793
  135. wandb/sdk/wandb_metadata.py +0 -623
  136. wandb/vendor/pynvml/__init__.py +0 -0
  137. wandb/vendor/pynvml/pynvml.py +0 -4779
  138. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/WHEEL +0 -0
  139. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/entry_points.txt +0 -0
  140. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,8 @@
1
- """Public API: artifacts."""
1
+ """W&B Public API for Artifact objects.
2
+
3
+ This module provides classes for interacting with W&B artifacts and their
4
+ collections.
5
+ """
2
6
 
3
7
  from __future__ import annotations
4
8
 
@@ -67,6 +71,11 @@ if TYPE_CHECKING:
67
71
 
68
72
 
69
73
  class ArtifactTypes(Paginator["ArtifactType"]):
74
+ """An lazy iterator of `ArtifactType` objects for a specific project.
75
+
76
+ <!-- lazydoc-ignore-init: internal -->
77
+ """
78
+
70
79
  QUERY = gql(PROJECT_ARTIFACT_TYPES_GQL)
71
80
 
72
81
  last_response: ArtifactTypesFragment | None
@@ -100,26 +109,46 @@ class ArtifactTypes(Paginator["ArtifactType"]):
100
109
  self.last_response = ArtifactTypesFragment.model_validate(conn)
101
110
 
102
111
  @property
103
- def length(self) -> None:
112
+ def _length(self) -> None:
113
+ """Returns `None`.
114
+
115
+ <!-- lazydoc-ignore: internal -->
116
+ """
104
117
  # TODO
105
118
  return None
106
119
 
107
120
  @property
108
121
  def more(self) -> bool:
122
+ """Returns whether there are more artifact types to fetch.
123
+
124
+ <!-- lazydoc-ignore: internal -->
125
+ """
109
126
  if self.last_response is None:
110
127
  return True
111
128
  return self.last_response.page_info.has_next_page
112
129
 
113
130
  @property
114
131
  def cursor(self) -> str | None:
132
+ """Returns the cursor for the next page of results.
133
+
134
+ <!-- lazydoc-ignore: internal -->
135
+ """
115
136
  if self.last_response is None:
116
137
  return None
117
138
  return self.last_response.edges[-1].cursor
118
139
 
119
140
  def update_variables(self) -> None:
141
+ """Update the cursor variable for pagination.
142
+
143
+ <!-- lazydoc-ignore: internal -->
144
+ """
120
145
  self.variables.update({"cursor": self.cursor})
121
146
 
122
147
  def convert_objects(self) -> list[ArtifactType]:
148
+ """Convert the raw response data into a list of ArtifactType objects.
149
+
150
+ <!-- lazydoc-ignore: internal -->
151
+ """
123
152
  if self.last_response is None:
124
153
  return []
125
154
 
@@ -137,6 +166,19 @@ class ArtifactTypes(Paginator["ArtifactType"]):
137
166
 
138
167
 
139
168
  class ArtifactType:
169
+ """An artifact object that satisfies query based on the specified type.
170
+
171
+ Args:
172
+ client: The client instance to use for querying W&B.
173
+ entity: The entity (user or team) that owns the project.
174
+ project: The name of the project to query for artifact types.
175
+ type_name: The name of the artifact type.
176
+ attrs: Optional mapping of attributes to initialize the artifact type. If not provided,
177
+ the object will load its attributes from W&B upon initialization.
178
+
179
+ <!-- lazydoc-ignore-init: internal -->
180
+ """
181
+
140
182
  def __init__(
141
183
  self,
142
184
  client: Client,
@@ -154,6 +196,10 @@ class ArtifactType:
154
196
  self.load()
155
197
 
156
198
  def load(self) -> Mapping[str, Any]:
199
+ """Load the artifact type attributes from W&B.
200
+
201
+ <!-- lazydoc-ignore: internal -->
202
+ """
157
203
  data: Mapping[str, Any] | None = self.client.execute(
158
204
  gql(PROJECT_ARTIFACT_TYPE_GQL),
159
205
  variable_values={
@@ -171,18 +217,30 @@ class ArtifactType:
171
217
 
172
218
  @property
173
219
  def id(self) -> str:
220
+ """The unique identifier of the artifact type."""
174
221
  return self._attrs["id"]
175
222
 
176
223
  @property
177
224
  def name(self) -> str:
225
+ """The name of the artifact type."""
178
226
  return self._attrs["name"]
179
227
 
180
228
  @normalize_exceptions
181
229
  def collections(self, per_page: int = 50) -> ArtifactCollections:
182
- """Artifact collections."""
230
+ """Get all artifact collections associated with this artifact type.
231
+
232
+ Args:
233
+ per_page (int): The number of artifact collections to fetch per page.
234
+ Default is 50.
235
+ """
183
236
  return ArtifactCollections(self.client, self.entity, self.project, self.type)
184
237
 
185
238
  def collection(self, name: str) -> ArtifactCollection:
239
+ """Get a specific artifact collection by name.
240
+
241
+ Args:
242
+ name (str): The name of the artifact collection to retrieve.
243
+ """
186
244
  return ArtifactCollection(
187
245
  self.client, self.entity, self.project, name, self.type
188
246
  )
@@ -192,6 +250,18 @@ class ArtifactType:
192
250
 
193
251
 
194
252
  class ArtifactCollections(SizedPaginator["ArtifactCollection"]):
253
+ """Artifact collections of a specific type in a project.
254
+
255
+ Args:
256
+ client: The client instance to use for querying W&B.
257
+ entity: The entity (user or team) that owns the project.
258
+ project: The name of the project to query for artifact collections.
259
+ type_name: The name of the artifact type for which to fetch collections.
260
+ per_page: The number of artifact collections to fetch per page. Default is 50.
261
+
262
+ <!-- lazydoc-ignore-init: internal -->
263
+ """
264
+
195
265
  last_response: ArtifactCollectionsFragment | None
196
266
 
197
267
  def __init__(
@@ -240,30 +310,49 @@ class ArtifactCollections(SizedPaginator["ArtifactCollection"]):
240
310
  self.last_response = ArtifactCollectionsFragment.model_validate(conn)
241
311
 
242
312
  @property
243
- def length(self):
313
+ def _length(self) -> int:
314
+ """Returns the total number of artifact collections.
315
+
316
+ <!-- lazydoc-ignore: internal -->
317
+ """
244
318
  if self.last_response is None:
245
- return None
319
+ self._load_page()
246
320
  return self.last_response.total_count
247
321
 
248
322
  @property
249
323
  def more(self):
324
+ """Returns whether there are more artifacts to fetch.
325
+
326
+ <!-- lazydoc-ignore: internal -->
327
+ """
250
328
  if self.last_response is None:
251
329
  return True
252
330
  return self.last_response.page_info.has_next_page
253
331
 
254
332
  @property
255
333
  def cursor(self):
334
+ """Returns the cursor for the next page of results.
335
+
336
+ <!-- lazydoc-ignore: internal -->
337
+ """
256
338
  if self.last_response is None:
257
339
  return None
258
340
  return self.last_response.edges[-1].cursor
259
341
 
260
342
  def update_variables(self) -> None:
343
+ """Update the cursor variable for pagination.
344
+
345
+ <!-- lazydoc-ignore: internal -->
346
+ """
261
347
  self.variables.update({"cursor": self.cursor})
262
348
 
263
349
  def convert_objects(self) -> list[ArtifactCollection]:
350
+ """Convert the raw response data into a list of ArtifactCollection objects.
351
+
352
+ <!-- lazydoc-ignore: internal -->
353
+ """
264
354
  if self.last_response is None:
265
355
  return []
266
-
267
356
  return [
268
357
  ArtifactCollection(
269
358
  client=self.client,
@@ -278,6 +367,22 @@ class ArtifactCollections(SizedPaginator["ArtifactCollection"]):
278
367
 
279
368
 
280
369
  class ArtifactCollection:
370
+ """An artifact collection that represents a group of related artifacts.
371
+
372
+ Args:
373
+ client: The client instance to use for querying W&B.
374
+ entity: The entity (user or team) that owns the project.
375
+ project: The name of the project to query for artifact collections.
376
+ name: The name of the artifact collection.
377
+ type: The type of the artifact collection (e.g., "dataset", "model").
378
+ organization: Optional organization name if applicable.
379
+ attrs: Optional mapping of attributes to initialize the artifact collection.
380
+ If not provided, the object will load its attributes from W&B upon
381
+ initialization.
382
+
383
+ <!-- lazydoc-ignore-init: internal -->
384
+ """
385
+
281
386
  def __init__(
282
387
  self,
283
388
  client: Client,
@@ -310,11 +415,12 @@ class ArtifactCollection:
310
415
 
311
416
  @property
312
417
  def id(self) -> str:
418
+ """The unique identifier of the artifact collection."""
313
419
  return self._attrs["id"]
314
420
 
315
421
  @normalize_exceptions
316
422
  def artifacts(self, per_page: int = 50) -> Artifacts:
317
- """Artifacts."""
423
+ """Get all artifacts in the collection."""
318
424
  return Artifacts(
319
425
  client=self.client,
320
426
  entity=self.entity,
@@ -331,9 +437,14 @@ class ArtifactCollection:
331
437
 
332
438
  @property
333
439
  def created_at(self) -> str:
440
+ """The creation date of the artifact collection."""
334
441
  return self._created_at
335
442
 
336
443
  def load(self):
444
+ """Load the artifact collection attributes from W&B.
445
+
446
+ <!-- lazydoc-ignore: internal -->
447
+ """
337
448
  if server_supports_artifact_collections_gql_edges(self.client):
338
449
  rename_fields = None
339
450
  else:
@@ -425,6 +536,7 @@ class ArtifactCollection:
425
536
 
426
537
  @description.setter
427
538
  def description(self, description: str | None) -> None:
539
+ """Set the description of the artifact collection."""
428
540
  self._description = description
429
541
 
430
542
  @property
@@ -434,6 +546,7 @@ class ArtifactCollection:
434
546
 
435
547
  @tags.setter
436
548
  def tags(self, tags: list[str]) -> None:
549
+ """Set the tags associated with the artifact collection."""
437
550
  if any(not re.match(r"^[-\w]+([ ]+[-\w]+)*$", tag) for tag in tags):
438
551
  raise ValueError(
439
552
  "Tags must only contain alphanumeric characters or underscores separated by spaces or hyphens"
@@ -447,15 +560,17 @@ class ArtifactCollection:
447
560
 
448
561
  @name.setter
449
562
  def name(self, name: str) -> None:
563
+ """Set the name of the artifact collection."""
450
564
  self._name = validate_artifact_name(name)
451
565
 
452
566
  @property
453
567
  def type(self):
454
- """The type of the artifact collection."""
568
+ """Returns the type of the artifact collection."""
455
569
  return self._type
456
570
 
457
571
  @type.setter
458
572
  def type(self, type: list[str]) -> None:
573
+ """Set the type of the artifact collection."""
459
574
  if not self.is_sequence():
460
575
  raise ValueError(
461
576
  "Type can only be changed if the artifact collection is a sequence."
@@ -543,9 +658,23 @@ class ArtifactCollection:
543
658
 
544
659
 
545
660
  class Artifacts(SizedPaginator["Artifact"]):
546
- """An iterable collection of artifact versions associated with a project and optional filter.
547
-
548
- This is generally used indirectly via the `Api`.artifact_versions method.
661
+ """An iterable collection of artifact versions associated with a project.
662
+
663
+ Optionally pass in filters to narrow down the results based on specific criteria.
664
+
665
+ Args:
666
+ client: The client instance to use for querying W&B.
667
+ entity: The entity (user or team) that owns the project.
668
+ project: The name of the project to query for artifacts.
669
+ collection_name: The name of the artifact collection to query.
670
+ type: The type of the artifacts to query. Common examples include
671
+ "dataset" or "model".
672
+ filters: Optional mapping of filters to apply to the query.
673
+ order: Optional string to specify the order of the results.
674
+ per_page: The number of artifact versions to fetch per page. Default is 50.
675
+ tags: Optional string or list of strings to filter artifacts by tags.
676
+
677
+ <!-- lazydoc-ignore-init: internal -->
549
678
  """
550
679
 
551
680
  last_response: ArtifactsFragment | None
@@ -608,24 +737,40 @@ class Artifacts(SizedPaginator["Artifact"]):
608
737
  self.last_response = ArtifactsFragment.model_validate(conn)
609
738
 
610
739
  @property
611
- def length(self) -> int | None:
740
+ def _length(self) -> int:
741
+ """Returns the total number of artifacts in the collection.
742
+
743
+ <!-- lazydoc-ignore: internal -->
744
+ """
612
745
  if self.last_response is None:
613
- return None
746
+ self._load_page()
614
747
  return self.last_response.total_count
615
748
 
616
749
  @property
617
750
  def more(self) -> bool:
751
+ """Returns whether there are more files to fetch.
752
+
753
+ <!-- lazydoc-ignore: internal -->
754
+ """
618
755
  if self.last_response is None:
619
756
  return True
620
757
  return self.last_response.page_info.has_next_page
621
758
 
622
759
  @property
623
760
  def cursor(self) -> str | None:
761
+ """Returns the cursor for the next page of results.
762
+
763
+ <!-- lazydoc-ignore: internal -->
764
+ """
624
765
  if self.last_response is None:
625
766
  return None
626
767
  return self.last_response.edges[-1].cursor
627
768
 
628
769
  def convert_objects(self) -> list[Artifact]:
770
+ """Convert the raw response data into a list of wandb.Artifact objects.
771
+
772
+ <!-- lazydoc-ignore: internal -->
773
+ """
629
774
  if self.last_response is None:
630
775
  return []
631
776
 
@@ -645,6 +790,11 @@ class Artifacts(SizedPaginator["Artifact"]):
645
790
 
646
791
 
647
792
  class RunArtifacts(SizedPaginator["Artifact"]):
793
+ """An iterable collection of artifacts associated with a specific run.
794
+
795
+ <!-- lazydoc-ignore-init: internal -->
796
+ """
797
+
648
798
  last_response: (
649
799
  RunOutputArtifactsProjectRunOutputArtifacts
650
800
  | RunInputArtifactsProjectRunInputArtifacts
@@ -698,24 +848,40 @@ class RunArtifacts(SizedPaginator["Artifact"]):
698
848
  self.last_response = self._response_cls.model_validate(inner_data)
699
849
 
700
850
  @property
701
- def length(self) -> int | None:
851
+ def _length(self) -> int:
852
+ """Returns the total number of artifacts in the collection.
853
+
854
+ <!-- lazydoc-ignore: internal -->
855
+ """
702
856
  if self.last_response is None:
703
- return None
857
+ self._load_page()
704
858
  return self.last_response.total_count
705
859
 
706
860
  @property
707
861
  def more(self) -> bool:
862
+ """Returns whether there are more artifacts to fetch.
863
+
864
+ <!-- lazydoc-ignore: internal -->
865
+ """
708
866
  if self.last_response is None:
709
867
  return True
710
868
  return self.last_response.page_info.has_next_page
711
869
 
712
870
  @property
713
871
  def cursor(self) -> str | None:
872
+ """Returns the cursor for the next page of results.
873
+
874
+ <!-- lazydoc-ignore: internal -->
875
+ """
714
876
  if self.last_response is None:
715
877
  return None
716
878
  return self.last_response.edges[-1].cursor
717
879
 
718
880
  def convert_objects(self) -> list[Artifact]:
881
+ """Convert the raw response data into a list of wandb.Artifact objects.
882
+
883
+ <!-- lazydoc-ignore: internal -->
884
+ """
719
885
  if self.last_response is None:
720
886
  return []
721
887
 
@@ -735,6 +901,11 @@ class RunArtifacts(SizedPaginator["Artifact"]):
735
901
 
736
902
 
737
903
  class ArtifactFiles(SizedPaginator["public.File"]):
904
+ """A paginator for files in an artifact.
905
+
906
+ <!-- lazydoc-ignore-init: internal -->
907
+ """
908
+
738
909
  last_response: FilesFragment | None
739
910
 
740
911
  def __init__(
@@ -796,28 +967,51 @@ class ArtifactFiles(SizedPaginator["public.File"]):
796
967
 
797
968
  @property
798
969
  def path(self) -> list[str]:
970
+ """Returns the path of the artifact."""
799
971
  return [self.artifact.entity, self.artifact.project, self.artifact.name]
800
972
 
801
973
  @property
802
- def length(self) -> int:
974
+ def _length(self) -> int:
975
+ if self.last_response is None:
976
+ self._load_page()
977
+ """Returns the total number of files in the artifact.
978
+
979
+ <!-- lazydoc-ignore: internal -->
980
+ """
803
981
  return self.artifact.file_count
804
982
 
805
983
  @property
806
984
  def more(self) -> bool:
985
+ """Returns whether there are more files to fetch.
986
+
987
+ <!-- lazydoc-ignore: internal -->
988
+ """
807
989
  if self.last_response is None:
808
990
  return True
809
991
  return self.last_response.page_info.has_next_page
810
992
 
811
993
  @property
812
994
  def cursor(self) -> str | None:
995
+ """Returns the cursor for the next page of results.
996
+
997
+ <!-- lazydoc-ignore: internal -->
998
+ """
813
999
  if self.last_response is None:
814
1000
  return None
815
1001
  return self.last_response.edges[-1].cursor
816
1002
 
817
1003
  def update_variables(self) -> None:
1004
+ """Update the variables dictionary with the cursor.
1005
+
1006
+ <!-- lazydoc-ignore: internal -->
1007
+ """
818
1008
  self.variables.update({"fileLimit": self.per_page, "fileCursor": self.cursor})
819
1009
 
820
1010
  def convert_objects(self) -> list[public.File]:
1011
+ """Convert the raw response data into a list of public.File objects.
1012
+
1013
+ <!-- lazydoc-ignore: internal -->
1014
+ """
821
1015
  if self.last_response is None:
822
1016
  return []
823
1017
 
@@ -838,6 +1032,10 @@ class ArtifactFiles(SizedPaginator["public.File"]):
838
1032
  def server_supports_artifact_collections_gql_edges(
839
1033
  client: RetryingClient, warn: bool = False
840
1034
  ) -> bool:
1035
+ """Check if W&B server supports GraphQL edges for artifact collections.
1036
+
1037
+ <!-- lazydoc-ignore-function: internal -->
1038
+ """
841
1039
  # TODO: Validate this version
842
1040
  # Edges were merged into core on Mar 2, 2022: https://github.com/wandb/core/commit/81c90b29eaacfe0a96dc1ebd83c53560ca763e8b
843
1041
  # CLI version was bumped to "0.12.11" on Mar 3, 2022: https://github.com/wandb/core/commit/328396fa7c89a2178d510a1be9c0d4451f350d7b
@@ -1,3 +1,5 @@
1
+ """W&B Public API for Automation objects."""
2
+
1
3
  from __future__ import annotations
2
4
 
3
5
  from itertools import chain
@@ -15,6 +17,11 @@ if TYPE_CHECKING:
15
17
 
16
18
 
17
19
  class Automations(Paginator["Automation"]):
20
+ """An lazy iterator of `Automation` objects.
21
+
22
+ <!-- lazydoc-ignore-init: internal -->
23
+ """
24
+
18
25
  last_response: ProjectConnectionFields | None
19
26
  _query: Document
20
27
 
@@ -32,14 +39,20 @@ class Automations(Paginator["Automation"]):
32
39
 
33
40
  @property
34
41
  def more(self) -> bool:
35
- """Whether there are more items to fetch."""
42
+ """Whether there are more items to fetch.
43
+
44
+ <!-- lazydoc-ignore: internal -->
45
+ """
36
46
  if self.last_response is None:
37
47
  return True
38
48
  return self.last_response.page_info.has_next_page
39
49
 
40
50
  @property
41
51
  def cursor(self) -> str | None:
42
- """The start cursor to use for the next page."""
52
+ """The start cursor to use for the next page.
53
+
54
+ <!-- lazydoc-ignore: internal -->
55
+ """
43
56
  if self.last_response is None:
44
57
  return None
45
58
  return self.last_response.page_info.end_cursor
@@ -59,7 +72,10 @@ class Automations(Paginator["Automation"]):
59
72
  raise ValueError("Unexpected response data") from e
60
73
 
61
74
  def convert_objects(self) -> Iterable[Automation]:
62
- """Parse the page data into a list of objects."""
75
+ """Parse the page data into a list of objects.
76
+
77
+ <!-- lazydoc-ignore: internal -->
78
+ """
63
79
  from wandb.automations import Automation
64
80
 
65
81
  page = self.last_response