wandb 0.21.0__py3-none-win_amd64.whl → 0.21.2__py3-none-win_amd64.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 (153) hide show
  1. wandb/__init__.py +16 -14
  2. wandb/__init__.pyi +427 -450
  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/public/__init__.py +1 -1
  7. wandb/apis/public/api.py +525 -360
  8. wandb/apis/public/artifacts.py +207 -13
  9. wandb/apis/public/automations.py +19 -3
  10. wandb/apis/public/files.py +172 -33
  11. wandb/apis/public/history.py +67 -15
  12. wandb/apis/public/integrations.py +25 -2
  13. wandb/apis/public/jobs.py +90 -2
  14. wandb/apis/public/projects.py +130 -79
  15. wandb/apis/public/query_generator.py +11 -1
  16. wandb/apis/public/registries/_utils.py +14 -16
  17. wandb/apis/public/registries/registries_search.py +183 -304
  18. wandb/apis/public/reports.py +96 -15
  19. wandb/apis/public/runs.py +299 -105
  20. wandb/apis/public/sweeps.py +222 -22
  21. wandb/apis/public/teams.py +41 -4
  22. wandb/apis/public/users.py +45 -4
  23. wandb/automations/_generated/delete_automation.py +1 -3
  24. wandb/automations/_generated/enums.py +13 -11
  25. wandb/beta/workflows.py +66 -30
  26. wandb/bin/gpu_stats.exe +0 -0
  27. wandb/bin/wandb-core +0 -0
  28. wandb/cli/cli.py +127 -3
  29. wandb/env.py +8 -0
  30. wandb/errors/errors.py +4 -1
  31. wandb/integration/lightning/fabric/logger.py +3 -4
  32. wandb/integration/metaflow/__init__.py +6 -0
  33. wandb/integration/metaflow/data_pandas.py +74 -0
  34. wandb/integration/metaflow/data_pytorch.py +75 -0
  35. wandb/integration/metaflow/data_sklearn.py +76 -0
  36. wandb/integration/metaflow/errors.py +13 -0
  37. wandb/integration/metaflow/metaflow.py +167 -223
  38. wandb/integration/openai/fine_tuning.py +1 -2
  39. wandb/integration/weave/__init__.py +6 -0
  40. wandb/integration/weave/interface.py +49 -0
  41. wandb/integration/weave/weave.py +63 -0
  42. wandb/jupyter.py +5 -5
  43. wandb/plot/custom_chart.py +30 -7
  44. wandb/proto/v3/wandb_internal_pb2.py +281 -280
  45. wandb/proto/v3/wandb_telemetry_pb2.py +4 -4
  46. wandb/proto/v4/wandb_internal_pb2.py +280 -280
  47. wandb/proto/v4/wandb_telemetry_pb2.py +4 -4
  48. wandb/proto/v5/wandb_internal_pb2.py +280 -280
  49. wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
  50. wandb/proto/v6/wandb_internal_pb2.py +280 -280
  51. wandb/proto/v6/wandb_telemetry_pb2.py +4 -4
  52. wandb/proto/wandb_deprecated.py +6 -0
  53. wandb/sdk/artifacts/_factories.py +17 -0
  54. wandb/sdk/artifacts/_generated/__init__.py +221 -13
  55. wandb/sdk/artifacts/_generated/artifact_by_id.py +17 -0
  56. wandb/sdk/artifacts/_generated/artifact_by_name.py +22 -0
  57. wandb/sdk/artifacts/_generated/artifact_collection_membership_file_urls.py +43 -0
  58. wandb/sdk/artifacts/_generated/artifact_created_by.py +47 -0
  59. wandb/sdk/artifacts/_generated/artifact_file_urls.py +22 -0
  60. wandb/sdk/artifacts/_generated/artifact_type.py +31 -0
  61. wandb/sdk/artifacts/_generated/artifact_used_by.py +43 -0
  62. wandb/sdk/artifacts/_generated/artifact_via_membership_by_name.py +26 -0
  63. wandb/sdk/artifacts/_generated/delete_artifact.py +28 -0
  64. wandb/sdk/artifacts/_generated/enums.py +5 -0
  65. wandb/sdk/artifacts/_generated/fetch_artifact_manifest.py +38 -0
  66. wandb/sdk/artifacts/_generated/fetch_registries.py +32 -0
  67. wandb/sdk/artifacts/_generated/fragments.py +279 -41
  68. wandb/sdk/artifacts/_generated/link_artifact.py +6 -0
  69. wandb/sdk/artifacts/_generated/operations.py +654 -51
  70. wandb/sdk/artifacts/_generated/registry_collections.py +34 -0
  71. wandb/sdk/artifacts/_generated/registry_versions.py +34 -0
  72. wandb/sdk/artifacts/_generated/unlink_artifact.py +25 -0
  73. wandb/sdk/artifacts/_graphql_fragments.py +3 -86
  74. wandb/sdk/artifacts/_internal_artifact.py +19 -8
  75. wandb/sdk/artifacts/_validators.py +14 -4
  76. wandb/sdk/artifacts/artifact.py +512 -618
  77. wandb/sdk/artifacts/artifact_file_cache.py +10 -6
  78. wandb/sdk/artifacts/artifact_manifest.py +10 -9
  79. wandb/sdk/artifacts/artifact_manifest_entry.py +9 -10
  80. wandb/sdk/artifacts/artifact_manifests/artifact_manifest_v1.py +5 -3
  81. wandb/sdk/artifacts/storage_handlers/http_handler.py +1 -1
  82. wandb/sdk/artifacts/storage_handlers/s3_handler.py +1 -1
  83. wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +1 -1
  84. wandb/sdk/data_types/audio.py +38 -10
  85. wandb/sdk/data_types/base_types/media.py +6 -56
  86. wandb/sdk/data_types/graph.py +48 -14
  87. wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +1 -3
  88. wandb/sdk/data_types/helper_types/image_mask.py +1 -3
  89. wandb/sdk/data_types/histogram.py +34 -21
  90. wandb/sdk/data_types/html.py +35 -12
  91. wandb/sdk/data_types/image.py +104 -68
  92. wandb/sdk/data_types/molecule.py +32 -19
  93. wandb/sdk/data_types/object_3d.py +36 -17
  94. wandb/sdk/data_types/plotly.py +18 -5
  95. wandb/sdk/data_types/saved_model.py +4 -6
  96. wandb/sdk/data_types/table.py +59 -30
  97. wandb/sdk/data_types/video.py +53 -26
  98. wandb/sdk/integration_utils/auto_logging.py +2 -2
  99. wandb/sdk/interface/interface_queue.py +1 -4
  100. wandb/sdk/interface/interface_shared.py +26 -37
  101. wandb/sdk/interface/interface_sock.py +24 -14
  102. wandb/sdk/internal/internal_api.py +6 -0
  103. wandb/sdk/internal/job_builder.py +6 -0
  104. wandb/sdk/internal/settings_static.py +2 -3
  105. wandb/sdk/launch/agent/agent.py +8 -1
  106. wandb/sdk/launch/agent/run_queue_item_file_saver.py +2 -2
  107. wandb/sdk/launch/create_job.py +15 -2
  108. wandb/sdk/launch/inputs/internal.py +3 -4
  109. wandb/sdk/launch/inputs/schema.py +1 -0
  110. wandb/sdk/launch/runner/kubernetes_monitor.py +1 -0
  111. wandb/sdk/launch/runner/kubernetes_runner.py +323 -1
  112. wandb/sdk/launch/sweeps/scheduler.py +2 -3
  113. wandb/sdk/lib/asyncio_compat.py +19 -16
  114. wandb/sdk/lib/asyncio_manager.py +252 -0
  115. wandb/sdk/lib/deprecate.py +1 -7
  116. wandb/sdk/lib/disabled.py +1 -1
  117. wandb/sdk/lib/hashutil.py +27 -5
  118. wandb/sdk/lib/module.py +7 -13
  119. wandb/sdk/lib/printer.py +2 -2
  120. wandb/sdk/lib/printer_asyncio.py +3 -1
  121. wandb/sdk/lib/progress.py +0 -19
  122. wandb/sdk/lib/retry.py +185 -78
  123. wandb/sdk/lib/service/service_client.py +106 -0
  124. wandb/sdk/lib/service/service_connection.py +20 -26
  125. wandb/sdk/lib/service/service_token.py +30 -13
  126. wandb/sdk/mailbox/mailbox.py +13 -5
  127. wandb/sdk/mailbox/mailbox_handle.py +22 -13
  128. wandb/sdk/mailbox/response_handle.py +42 -106
  129. wandb/sdk/mailbox/wait_with_progress.py +7 -42
  130. wandb/sdk/wandb_init.py +77 -116
  131. wandb/sdk/wandb_login.py +19 -15
  132. wandb/sdk/wandb_metric.py +2 -0
  133. wandb/sdk/wandb_run.py +497 -469
  134. wandb/sdk/wandb_settings.py +145 -4
  135. wandb/sdk/wandb_setup.py +204 -124
  136. wandb/sdk/wandb_sweep.py +14 -13
  137. wandb/sdk/wandb_watch.py +4 -6
  138. wandb/sync/sync.py +10 -0
  139. wandb/util.py +58 -1
  140. wandb/wandb_run.py +1 -2
  141. {wandb-0.21.0.dist-info → wandb-0.21.2.dist-info}/METADATA +1 -1
  142. {wandb-0.21.0.dist-info → wandb-0.21.2.dist-info}/RECORD +145 -129
  143. wandb/sdk/interface/interface_relay.py +0 -38
  144. wandb/sdk/interface/router.py +0 -89
  145. wandb/sdk/interface/router_queue.py +0 -43
  146. wandb/sdk/interface/router_relay.py +0 -50
  147. wandb/sdk/interface/router_sock.py +0 -32
  148. wandb/sdk/lib/sock_client.py +0 -236
  149. wandb/vendor/pynvml/__init__.py +0 -0
  150. wandb/vendor/pynvml/pynvml.py +0 -4779
  151. {wandb-0.21.0.dist-info → wandb-0.21.2.dist-info}/WHEEL +0 -0
  152. {wandb-0.21.0.dist-info → wandb-0.21.2.dist-info}/entry_points.txt +0 -0
  153. {wandb-0.21.0.dist-info → wandb-0.21.2.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,8 @@
1
- """Public API: reports."""
1
+ """W&B Public API for Report objects.
2
+
3
+ This module provides classes for interacting with W&B reports and
4
+ managing report-related data.
5
+ """
2
6
 
3
7
  import ast
4
8
  import json
@@ -15,7 +19,17 @@ from wandb.sdk.lib import ipython
15
19
 
16
20
 
17
21
  class Reports(SizedPaginator["BetaReport"]):
18
- """Reports is an iterable collection of `BetaReport` objects."""
22
+ """Reports is a lazy iterator of `BetaReport` objects.
23
+
24
+ Args:
25
+ client (`wandb.apis.internal.Api`): The API client instance to use.
26
+ project (`wandb.sdk.internal.Project`): The project to fetch reports from.
27
+ name (str, optional): The name of the report to filter by. If `None`,
28
+ fetches all reports.
29
+ entity (str, optional): The entity name for the project. Defaults to
30
+ the project entity.
31
+ per_page (int): Number of reports to fetch per page (default is 50).
32
+ """
19
33
 
20
34
  QUERY = gql(
21
35
  """
@@ -64,6 +78,10 @@ class Reports(SizedPaginator["BetaReport"]):
64
78
 
65
79
  @property
66
80
  def _length(self):
81
+ """The number of reports in the project.
82
+
83
+ <!-- lazydoc-ignore: internal -->
84
+ """
67
85
  # TODO: Add the count the backend
68
86
  if self.last_response:
69
87
  return len(self.objects)
@@ -71,25 +89,37 @@ class Reports(SizedPaginator["BetaReport"]):
71
89
  return None
72
90
 
73
91
  @property
74
- def more(self):
92
+ def more(self) -> bool:
93
+ """Returns whether there are more files to fetch.
94
+
95
+ <!-- lazydoc-ignore: internal -->
96
+ """
75
97
  if self.last_response:
76
- return self.last_response["project"]["allViews"]["pageInfo"]["hasNextPage"]
98
+ return bool(
99
+ self.last_response["project"]["allViews"]["pageInfo"]["hasNextPage"]
100
+ )
77
101
  else:
78
102
  return True
79
103
 
80
104
  @property
81
105
  def cursor(self):
106
+ """Returns the cursor position for pagination of file results.
107
+
108
+ <!-- lazydoc-ignore: internal -->
109
+ """
82
110
  if self.last_response:
83
111
  return self.last_response["project"]["allViews"]["edges"][-1]["cursor"]
84
112
  else:
85
113
  return None
86
114
 
87
115
  def update_variables(self):
116
+ """Updates the GraphQL query variables for pagination."""
88
117
  self.variables.update(
89
118
  {"reportCursor": self.cursor, "reportLimit": self.per_page}
90
119
  )
91
120
 
92
121
  def convert_objects(self):
122
+ """Converts GraphQL edges to File objects."""
93
123
  if self.last_response["project"] is None:
94
124
  raise ValueError(
95
125
  f"Project {self.variables['project']} does not exist under entity {self.variables['entity']}"
@@ -109,20 +139,23 @@ class Reports(SizedPaginator["BetaReport"]):
109
139
 
110
140
 
111
141
  class BetaReport(Attrs):
112
- """BetaReport is a class associated with reports created in wandb.
142
+ """BetaReport is a class associated with reports created in W&B.
113
143
 
114
- WARNING: this API will likely change in a future release
144
+ Provides access to report attributes (name, description, user, spec,
145
+ timestamps) and methods for retrieving associated runs,
146
+ sections, and for rendering the report as HTML.
115
147
 
116
148
  Attributes:
117
- id (string): unique identifier of the report
118
- name (string): report name
119
- display_name (string): display name of the report
120
- description (string): report description
121
- user (User): the user that created the report (contains username and email)
122
- spec (dict): the spec of the report
123
- url (string): the url of the report
124
- updated_at (string): timestamp of last update
125
- created_at (string): timestamp when the report was created
149
+ id (string): Unique identifier of the report.
150
+ display_name (string): Human-readable display name of the report.
151
+ name (string): The name of the report. Use `display_name` for a more user-friendly name.
152
+ description (string): Description of the report.
153
+ user (User): Dictionary containing user info (username, email) who
154
+ created the report.
155
+ spec (dict): The spec of the report.
156
+ url (string): The URL of the report.
157
+ updated_at (string): Timestamp of last update.
158
+ created_at (string): Timestamp when the report was created.
126
159
  """
127
160
 
128
161
  def __init__(self, client, attrs, entity=None, project=None):
@@ -144,9 +177,11 @@ class BetaReport(Attrs):
144
177
 
145
178
  @property
146
179
  def sections(self):
180
+ """Get the panel sections (groups) from the report."""
147
181
  return self.spec["panelGroups"]
148
182
 
149
183
  def runs(self, section, per_page=50, only_selected=True):
184
+ """Get runs associated with a section of the report."""
150
185
  run_set_idx = section.get("openRunSet", 0)
151
186
  run_set = section["runSets"][run_set_idx]
152
187
  order = self.query_generator.key_to_server_path(run_set["sort"]["key"])
@@ -244,6 +279,11 @@ class BetaReport(Attrs):
244
279
 
245
280
 
246
281
  class PythonMongoishQueryGenerator:
282
+ """Converts Python-style query expressions to MongoDB-style queries for W&B reports.
283
+
284
+ <!-- lazydoc-ignore-class: internal -->
285
+ """
286
+
247
287
  SPACER = "----------"
248
288
  DECIMAL_SPACER = ";;;"
249
289
  FRONTEND_NAME_MAPPING = {
@@ -354,6 +394,10 @@ class PythonMongoishQueryGenerator:
354
394
  return field_name.replace(self.SPACER, ".") # Allow dotted fields
355
395
 
356
396
  def python_to_mongo(self, filterstr):
397
+ """Convert Python expresion to MongoDB filter.
398
+
399
+ <!-- lazydoc-ignore: internal -->
400
+ """
357
401
  try:
358
402
  tree = ast.parse(self._convert(filterstr), mode="eval")
359
403
  except SyntaxError as e:
@@ -372,6 +416,10 @@ class PythonMongoishQueryGenerator:
372
416
  return {"$or": [{op: values}]}
373
417
 
374
418
  def front_to_back(self, name):
419
+ """Convert frontend metric names to backend field names.
420
+
421
+ <!-- lazydoc-ignore: internal -->
422
+ """
375
423
  name, *rest = name.split(".")
376
424
  rest = "." + ".".join(rest) if rest else ""
377
425
 
@@ -385,6 +433,10 @@ class PythonMongoishQueryGenerator:
385
433
  return f"summary_metrics.{name}{rest}"
386
434
 
387
435
  def back_to_front(self, name):
436
+ """Convert backend field names to frontend metric names.
437
+
438
+ <!-- lazydoc-ignore: internal -->
439
+ """
388
440
  if name in self.FRONTEND_NAME_MAPPING_REVERSED:
389
441
  return self.FRONTEND_NAME_MAPPING_REVERSED[name]
390
442
  elif name in self.FRONTEND_NAME_MAPPING:
@@ -401,6 +453,10 @@ class PythonMongoishQueryGenerator:
401
453
 
402
454
  # These are only used for ParallelCoordinatesPlot because it has weird backend names...
403
455
  def pc_front_to_back(self, name):
456
+ """Convert ParallelCoordinatesPlot to backend field names.
457
+
458
+ <!-- lazydoc-ignore: internal -->
459
+ """
404
460
  name, *rest = name.split(".")
405
461
  rest = "." + ".".join(rest) if rest else ""
406
462
  if name is None:
@@ -417,6 +473,10 @@ class PythonMongoishQueryGenerator:
417
473
  return f"summary:{name}{rest}"
418
474
 
419
475
  def pc_back_to_front(self, name):
476
+ """Convert backend backend field names to ParallelCoordinatesPlot names.
477
+
478
+ <!-- lazydoc-ignore: internal -->
479
+ """
420
480
  if name is None:
421
481
  return None
422
482
  elif "summary:" in name:
@@ -436,6 +496,11 @@ class PythonMongoishQueryGenerator:
436
496
 
437
497
 
438
498
  class PanelMetricsHelper:
499
+ """Converts Python-style query expressions to MongoDB-style queries for W&B reports.
500
+
501
+ <!-- lazydoc-ignore-class: internal -->
502
+ """
503
+
439
504
  FRONTEND_NAME_MAPPING = {
440
505
  "Step": "_step",
441
506
  "Relative Time (Wall)": "_absolute_runtime",
@@ -448,17 +513,29 @@ class PanelMetricsHelper:
448
513
  RUN_MAPPING_REVERSED = {v: k for k, v in RUN_MAPPING.items()}
449
514
 
450
515
  def front_to_back(self, name):
516
+ """Convert frontend metric names to backend field names.
517
+
518
+ <!-- lazydoc-ignore: internal -->
519
+ """
451
520
  if name in self.FRONTEND_NAME_MAPPING:
452
521
  return self.FRONTEND_NAME_MAPPING[name]
453
522
  return name
454
523
 
455
524
  def back_to_front(self, name):
525
+ """Convert backend field names to frontend metric names.
526
+
527
+ <!-- lazydoc-ignore: internal -->
528
+ """
456
529
  if name in self.FRONTEND_NAME_MAPPING_REVERSED:
457
530
  return self.FRONTEND_NAME_MAPPING_REVERSED[name]
458
531
  return name
459
532
 
460
533
  # ScatterPlot and ParallelCoords have weird conventions
461
534
  def special_front_to_back(self, name):
535
+ """Convert frontend metric names to backend field names.
536
+
537
+ <!-- lazydoc-ignore: internal -->
538
+ """
462
539
  if name is None:
463
540
  return name
464
541
 
@@ -485,6 +562,10 @@ class PanelMetricsHelper:
485
562
  return "summary:" + name
486
563
 
487
564
  def special_back_to_front(self, name):
565
+ """Convert backend field names to frontend metric names.
566
+
567
+ <!-- lazydoc-ignore: internal -->
568
+ """
488
569
  if name is not None:
489
570
  kind, rest = name.split(":", 1)
490
571