wandb 0.22.1__py3-none-win_amd64.whl → 0.22.3__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 (166) hide show
  1. wandb/__init__.py +1 -1
  2. wandb/__init__.pyi +7 -4
  3. wandb/_pydantic/__init__.py +8 -1
  4. wandb/_pydantic/base.py +54 -18
  5. wandb/_pydantic/field_types.py +8 -3
  6. wandb/_pydantic/pagination.py +46 -0
  7. wandb/_pydantic/utils.py +2 -2
  8. wandb/apis/public/api.py +24 -19
  9. wandb/apis/public/artifacts.py +259 -270
  10. wandb/apis/public/registries/_utils.py +40 -54
  11. wandb/apis/public/registries/registries_search.py +70 -85
  12. wandb/apis/public/registries/registry.py +173 -156
  13. wandb/apis/public/runs.py +27 -6
  14. wandb/apis/public/utils.py +43 -20
  15. wandb/automations/_generated/create_automation.py +2 -2
  16. wandb/automations/_generated/create_generic_webhook_integration.py +4 -4
  17. wandb/automations/_generated/delete_automation.py +2 -2
  18. wandb/automations/_generated/fragments.py +31 -52
  19. wandb/automations/_generated/generic_webhook_integrations_by_entity.py +3 -3
  20. wandb/automations/_generated/get_automations.py +3 -3
  21. wandb/automations/_generated/get_automations_by_entity.py +3 -3
  22. wandb/automations/_generated/input_types.py +9 -9
  23. wandb/automations/_generated/integrations_by_entity.py +3 -3
  24. wandb/automations/_generated/operations.py +6 -6
  25. wandb/automations/_generated/slack_integrations_by_entity.py +3 -3
  26. wandb/automations/_generated/update_automation.py +2 -2
  27. wandb/automations/_utils.py +3 -3
  28. wandb/automations/actions.py +3 -3
  29. wandb/automations/automations.py +6 -5
  30. wandb/bin/gpu_stats.exe +0 -0
  31. wandb/bin/wandb-core +0 -0
  32. wandb/cli/beta.py +23 -3
  33. wandb/cli/beta_leet.py +75 -0
  34. wandb/cli/beta_sync.py +1 -1
  35. wandb/cli/cli.py +34 -7
  36. wandb/errors/term.py +8 -8
  37. wandb/jupyter.py +0 -51
  38. wandb/old/settings.py +6 -6
  39. wandb/proto/v3/wandb_api_pb2.py +86 -0
  40. wandb/proto/v3/wandb_server_pb2.py +38 -37
  41. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  42. wandb/proto/v3/wandb_sync_pb2.py +19 -6
  43. wandb/proto/v4/wandb_api_pb2.py +37 -0
  44. wandb/proto/v4/wandb_server_pb2.py +38 -37
  45. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  46. wandb/proto/v4/wandb_sync_pb2.py +10 -6
  47. wandb/proto/v5/wandb_api_pb2.py +38 -0
  48. wandb/proto/v5/wandb_server_pb2.py +38 -37
  49. wandb/proto/v5/wandb_settings_pb2.py +2 -2
  50. wandb/proto/v5/wandb_sync_pb2.py +10 -6
  51. wandb/proto/v6/wandb_api_pb2.py +48 -0
  52. wandb/proto/v6/wandb_server_pb2.py +38 -37
  53. wandb/proto/v6/wandb_settings_pb2.py +2 -2
  54. wandb/proto/v6/wandb_sync_pb2.py +10 -6
  55. wandb/proto/wandb_api_pb2.py +18 -0
  56. wandb/proto/wandb_generate_proto.py +1 -0
  57. wandb/sdk/artifacts/_generated/__init__.py +96 -40
  58. wandb/sdk/artifacts/_generated/add_aliases.py +3 -3
  59. wandb/sdk/artifacts/_generated/add_artifact_collection_tags.py +26 -0
  60. wandb/sdk/artifacts/_generated/artifact_by_id.py +2 -2
  61. wandb/sdk/artifacts/_generated/artifact_by_name.py +3 -3
  62. wandb/sdk/artifacts/_generated/artifact_collection_membership_file_urls.py +27 -8
  63. wandb/sdk/artifacts/_generated/artifact_collection_membership_files.py +27 -8
  64. wandb/sdk/artifacts/_generated/artifact_created_by.py +7 -20
  65. wandb/sdk/artifacts/_generated/artifact_file_urls.py +19 -6
  66. wandb/sdk/artifacts/_generated/artifact_membership_by_name.py +26 -0
  67. wandb/sdk/artifacts/_generated/artifact_type.py +5 -5
  68. wandb/sdk/artifacts/_generated/artifact_used_by.py +8 -17
  69. wandb/sdk/artifacts/_generated/artifact_version_files.py +19 -8
  70. wandb/sdk/artifacts/_generated/delete_aliases.py +3 -3
  71. wandb/sdk/artifacts/_generated/delete_artifact.py +4 -4
  72. wandb/sdk/artifacts/_generated/delete_artifact_collection_tags.py +23 -0
  73. wandb/sdk/artifacts/_generated/delete_artifact_portfolio.py +4 -4
  74. wandb/sdk/artifacts/_generated/delete_artifact_sequence.py +4 -4
  75. wandb/sdk/artifacts/_generated/delete_registry.py +21 -0
  76. wandb/sdk/artifacts/_generated/fetch_artifact_manifest.py +8 -20
  77. wandb/sdk/artifacts/_generated/fetch_linked_artifacts.py +13 -35
  78. wandb/sdk/artifacts/_generated/fetch_org_info_from_entity.py +28 -0
  79. wandb/sdk/artifacts/_generated/fetch_registries.py +18 -8
  80. wandb/sdk/{projects → artifacts}/_generated/fetch_registry.py +4 -4
  81. wandb/sdk/artifacts/_generated/fragments.py +183 -333
  82. wandb/sdk/artifacts/_generated/input_types.py +133 -7
  83. wandb/sdk/artifacts/_generated/link_artifact.py +5 -5
  84. wandb/sdk/artifacts/_generated/operations.py +1053 -548
  85. wandb/sdk/artifacts/_generated/project_artifact_collection.py +9 -77
  86. wandb/sdk/artifacts/_generated/project_artifact_collections.py +21 -9
  87. wandb/sdk/artifacts/_generated/project_artifact_type.py +3 -3
  88. wandb/sdk/artifacts/_generated/project_artifact_types.py +19 -6
  89. wandb/sdk/artifacts/_generated/project_artifacts.py +7 -8
  90. wandb/sdk/artifacts/_generated/registry_collections.py +21 -9
  91. wandb/sdk/artifacts/_generated/registry_versions.py +20 -9
  92. wandb/sdk/artifacts/_generated/rename_registry.py +25 -0
  93. wandb/sdk/artifacts/_generated/run_input_artifacts.py +5 -9
  94. wandb/sdk/artifacts/_generated/run_output_artifacts.py +5 -9
  95. wandb/sdk/artifacts/_generated/type_info.py +2 -2
  96. wandb/sdk/artifacts/_generated/unlink_artifact.py +3 -5
  97. wandb/sdk/artifacts/_generated/update_artifact.py +3 -3
  98. wandb/sdk/artifacts/_generated/update_artifact_collection_type.py +28 -0
  99. wandb/sdk/artifacts/_generated/update_artifact_portfolio.py +7 -16
  100. wandb/sdk/artifacts/_generated/update_artifact_sequence.py +7 -16
  101. wandb/sdk/artifacts/_generated/upsert_registry.py +25 -0
  102. wandb/sdk/artifacts/_gqlutils.py +170 -6
  103. wandb/sdk/artifacts/_models/__init__.py +9 -0
  104. wandb/sdk/artifacts/_models/artifact_collection.py +109 -0
  105. wandb/sdk/artifacts/_models/manifest.py +26 -0
  106. wandb/sdk/artifacts/_models/pagination.py +26 -0
  107. wandb/sdk/artifacts/_models/registry.py +100 -0
  108. wandb/sdk/artifacts/_validators.py +45 -27
  109. wandb/sdk/artifacts/artifact.py +249 -244
  110. wandb/sdk/artifacts/artifact_file_cache.py +1 -1
  111. wandb/sdk/artifacts/artifact_manifest.py +37 -32
  112. wandb/sdk/artifacts/artifact_manifest_entry.py +82 -133
  113. wandb/sdk/artifacts/artifact_manifests/artifact_manifest_v1.py +43 -61
  114. wandb/sdk/artifacts/storage_handler.py +18 -12
  115. wandb/sdk/artifacts/storage_handlers/azure_handler.py +11 -6
  116. wandb/sdk/artifacts/storage_handlers/gcs_handler.py +17 -12
  117. wandb/sdk/artifacts/storage_handlers/http_handler.py +9 -4
  118. wandb/sdk/artifacts/storage_handlers/local_file_handler.py +10 -6
  119. wandb/sdk/artifacts/storage_handlers/multi_handler.py +5 -4
  120. wandb/sdk/artifacts/storage_handlers/s3_handler.py +10 -8
  121. wandb/sdk/artifacts/storage_handlers/tracking_handler.py +6 -4
  122. wandb/sdk/artifacts/storage_handlers/wb_artifact_handler.py +24 -21
  123. wandb/sdk/artifacts/storage_handlers/wb_local_artifact_handler.py +4 -2
  124. wandb/sdk/artifacts/storage_policies/_multipart.py +187 -0
  125. wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +61 -242
  126. wandb/sdk/artifacts/storage_policy.py +25 -12
  127. wandb/sdk/data_types/image.py +2 -2
  128. wandb/sdk/data_types/object_3d.py +67 -2
  129. wandb/sdk/interface/interface.py +72 -64
  130. wandb/sdk/interface/interface_queue.py +27 -18
  131. wandb/sdk/interface/interface_shared.py +61 -23
  132. wandb/sdk/interface/interface_sock.py +9 -5
  133. wandb/sdk/internal/_generated/server_features_query.py +4 -4
  134. wandb/sdk/internal/job_builder.py +27 -10
  135. wandb/sdk/internal/sender.py +4 -1
  136. wandb/sdk/launch/create_job.py +2 -1
  137. wandb/sdk/launch/inputs/schema.py +13 -10
  138. wandb/sdk/lib/apikey.py +8 -12
  139. wandb/sdk/lib/asyncio_compat.py +1 -1
  140. wandb/sdk/lib/asyncio_manager.py +5 -5
  141. wandb/sdk/lib/console_capture.py +38 -30
  142. wandb/sdk/lib/progress.py +151 -125
  143. wandb/sdk/lib/retry.py +3 -2
  144. wandb/sdk/lib/service/service_connection.py +2 -2
  145. wandb/sdk/lib/wb_logging.py +2 -1
  146. wandb/sdk/mailbox/mailbox.py +1 -1
  147. wandb/sdk/wandb_init.py +11 -14
  148. wandb/sdk/wandb_run.py +14 -48
  149. wandb/sdk/wandb_settings.py +114 -30
  150. {wandb-0.22.1.dist-info → wandb-0.22.3.dist-info}/METADATA +2 -1
  151. {wandb-0.22.1.dist-info → wandb-0.22.3.dist-info}/RECORD +154 -146
  152. wandb/sdk/artifacts/_generated/artifact_via_membership_by_name.py +0 -26
  153. wandb/sdk/artifacts/_generated/create_artifact_collection_tag_assignments.py +0 -36
  154. wandb/sdk/artifacts/_generated/delete_artifact_collection_tag_assignments.py +0 -25
  155. wandb/sdk/artifacts/_generated/move_artifact_collection.py +0 -35
  156. wandb/sdk/projects/_generated/__init__.py +0 -26
  157. wandb/sdk/projects/_generated/delete_project.py +0 -22
  158. wandb/sdk/projects/_generated/enums.py +0 -4
  159. wandb/sdk/projects/_generated/fragments.py +0 -41
  160. wandb/sdk/projects/_generated/input_types.py +0 -13
  161. wandb/sdk/projects/_generated/operations.py +0 -88
  162. wandb/sdk/projects/_generated/rename_project.py +0 -27
  163. wandb/sdk/projects/_generated/upsert_registry_project.py +0 -27
  164. {wandb-0.22.1.dist-info → wandb-0.22.3.dist-info}/WHEEL +0 -0
  165. {wandb-0.22.1.dist-info → wandb-0.22.3.dist-info}/entry_points.txt +0 -0
  166. {wandb-0.22.1.dist-info → wandb-0.22.3.dist-info}/licenses/LICENSE +0 -0
@@ -157,9 +157,11 @@ def _path_convert(*args: str) -> str:
157
157
 
158
158
 
159
159
  CLIENT_ONLY_SETTINGS = (
160
- "reinit",
160
+ "files_dir",
161
161
  "max_end_of_run_history_metrics",
162
162
  "max_end_of_run_summary_metrics",
163
+ "reinit",
164
+ "x_files_dir",
163
165
  "x_sync_dir_suffix",
164
166
  )
165
167
  """Python-only keys that are not fields on the settings proto."""
@@ -239,25 +241,53 @@ class Settings(BaseModel, validate_assignment=True):
239
241
  """The type of console capture to be applied.
240
242
 
241
243
  Possible values are:
242
- "auto" - Automatically selects the console capture method based on the
244
+ - "auto" - Automatically selects the console capture method based on the
243
245
  system environment and settings.
246
+ - "off" - Disables console capture.
247
+ - "redirect" - Redirects low-level file descriptors for capturing output.
248
+ - "wrap" - Overrides the write methods of sys.stdout/sys.stderr. Will be
249
+ mapped to either "wrap_raw" or "wrap_emu" based on the state of the system.
250
+ - "wrap_raw" - Same as "wrap" but captures raw output directly instead of
251
+ through an emulator. Derived from the `wrap` setting and should not be set manually.
252
+ - "wrap_emu" - Same as "wrap" but captures output through an emulator.
253
+ Derived from the `wrap` setting and should not be set manually.
254
+ """
244
255
 
245
- "off" - Disables console capture.
256
+ console_multipart: bool = False
257
+ """Enable multipart console logging.
246
258
 
247
- "redirect" - Redirects low-level file descriptors for capturing output.
259
+ When True, the SDK writes console output to timestamped files
260
+ under the `logs/` directory instead of a single `output.log`.
248
261
 
249
- "wrap" - Overrides the write methods of sys.stdout/sys.stderr. Will be
250
- mapped to either "wrap_raw" or "wrap_emu" based on the state of the system.
262
+ Each part is uploaded as soon as it is closed, giving users live
263
+ access to logs while the run is active. Rollover cadence is
264
+ controlled by `console_chunk_max_bytes` and/or `console_chunk_max_seconds`.
265
+ If both limits are `0`, all logs are uploaded once at run finish.
251
266
 
252
- "wrap_raw" - Same as "wrap" but captures raw output directly instead of
253
- through an emulator. Derived from the `wrap` setting and should not be set manually.
267
+ Note: Uploaded chunks are immutable; terminal control sequences
268
+ that modify previous lines (e.g., progress bars using carriage returns)
269
+ only affect the current chunk.
270
+ """
254
271
 
255
- "wrap_emu" - Same as "wrap" but captures output through an emulator.
256
- Derived from the `wrap` setting and should not be set manually.
272
+ console_chunk_max_bytes: int = 0
273
+ """Size-based rollover threshold for multipart console logs, in bytes.
274
+
275
+ Starts a new console log file when the current part reaches this
276
+ size. Has an effect only when `console_multipart` is `True`.
277
+ Can be combined with `console_chunk_max_seconds`; whichever limit is
278
+ hit first triggers the rollover. A value of `0` disables the
279
+ size-based limit.
257
280
  """
258
281
 
259
- console_multipart: bool = False
260
- """Whether to produce multipart console log files."""
282
+ console_chunk_max_seconds: int = 0
283
+ """Time-based rollover threshold for multipart console logs, in seconds.
284
+
285
+ Starts a new console log file after this many seconds have elapsed
286
+ since the current part began. Requires `console_multipart` to be
287
+ `True`. May be used with `console_chunk_max_bytes`; the first limit
288
+ reached closes the part. A value of `0` disables the time-based
289
+ limit.
290
+ """
261
291
 
262
292
  credentials_file: str = Field(
263
293
  default_factory=lambda: str(credentials.DEFAULT_WANDB_CREDENTIALS_FILE)
@@ -661,6 +691,9 @@ class Settings(BaseModel, validate_assignment=True):
661
691
  x_files_dir: Optional[str] = None
662
692
  """Override setting for the computed files_dir.
663
693
 
694
+ DEPRECATED, DO NOT USE. This private setting is not respected by wandb-core
695
+ but will continue to work for some legacy Python code.
696
+
664
697
  <!-- lazydoc-ignore-class-attributes -->
665
698
  """
666
699
 
@@ -1084,6 +1117,30 @@ class Settings(BaseModel, validate_assignment=True):
1084
1117
 
1085
1118
  return "wrap"
1086
1119
 
1120
+ @field_validator("console_chunk_max_bytes", mode="after")
1121
+ @classmethod
1122
+ def validate_console_chunk_max_bytes(cls, value):
1123
+ """Validate the console_chunk_max_bytes value.
1124
+
1125
+ <!-- lazydoc-ignore: internal -->
1126
+ """
1127
+ if value < 0:
1128
+ raise ValueError("console_chunk_max_bytes must be non-negative")
1129
+
1130
+ return value
1131
+
1132
+ @field_validator("console_chunk_max_seconds", mode="after")
1133
+ @classmethod
1134
+ def validate_console_chunk_max_seconds(cls, value):
1135
+ """Validate the console_chunk_max_seconds value.
1136
+
1137
+ <!-- lazydoc-ignore: internal -->
1138
+ """
1139
+ if value < 0:
1140
+ raise ValueError("console_chunk_max_seconds must be non-negative")
1141
+
1142
+ return value
1143
+
1087
1144
  @field_validator("x_executable", mode="before")
1088
1145
  @classmethod
1089
1146
  def validate_x_executable(cls, value):
@@ -1652,6 +1709,7 @@ class Settings(BaseModel, validate_assignment=True):
1652
1709
  @property
1653
1710
  def files_dir(self) -> str:
1654
1711
  """Absolute path to the local directory where the run's files are stored."""
1712
+ # Must match the logic in settings.go in the service process.
1655
1713
  return self.x_files_dir or _path_convert(self.sync_dir, "files")
1656
1714
 
1657
1715
  @computed_field # type: ignore[prop-decorator]
@@ -1913,24 +1971,7 @@ class Settings(BaseModel, validate_assignment=True):
1913
1971
  program = self.program or self._get_program()
1914
1972
 
1915
1973
  if program is not None:
1916
- try:
1917
- root = (
1918
- GitRepo().root or os.getcwd()
1919
- if not self.disable_git
1920
- else os.getcwd()
1921
- )
1922
- except Exception:
1923
- # if the git command fails, fall back to the current working directory
1924
- root = os.getcwd()
1925
-
1926
- self.program_relpath = self.program_relpath or self._get_program_relpath(
1927
- program, root
1928
- )
1929
- program_abspath = os.path.abspath(
1930
- os.path.join(root, os.path.relpath(os.getcwd(), root), program)
1931
- )
1932
- if os.path.exists(program_abspath):
1933
- self.program_abspath = program_abspath
1974
+ self._setup_code_paths(program)
1934
1975
  else:
1935
1976
  program = "<python with no main file>"
1936
1977
 
@@ -2195,3 +2236,46 @@ class Settings(BaseModel, validate_assignment=True):
2195
2236
  This is a compatibility property for Pydantic v1 to mimic v2's model_fields_set.
2196
2237
  """
2197
2238
  return getattr(self, "__fields_set__", set())
2239
+
2240
+ def _setup_code_paths(self, program: str):
2241
+ """Sets the program_abspath and program_relpath settings."""
2242
+ if self._jupyter and self.x_jupyter_root:
2243
+ self._infer_code_paths_for_jupyter(program)
2244
+ else:
2245
+ self._infer_code_path_for_program(program)
2246
+
2247
+ def _infer_code_path_for_program(self, program: str):
2248
+ """Finds the program's absolute and relative paths."""
2249
+ try:
2250
+ root = (
2251
+ GitRepo().root or os.getcwd() if not self.disable_git else os.getcwd()
2252
+ )
2253
+ except Exception:
2254
+ # if the git command fails, fall back to the current working directory
2255
+ root = os.getcwd()
2256
+
2257
+ self.program_relpath = self.program_relpath or self._get_program_relpath(
2258
+ program, root
2259
+ )
2260
+
2261
+ program_abspath = os.path.abspath(
2262
+ os.path.join(root, os.path.relpath(os.getcwd(), root), program)
2263
+ )
2264
+
2265
+ if os.path.exists(program_abspath):
2266
+ self.program_abspath = program_abspath
2267
+
2268
+ def _infer_code_paths_for_jupyter(self, program: str):
2269
+ """Find the notebook's absolute and relative paths.
2270
+
2271
+ Since the notebook's execution environment
2272
+ is not the same as the current working directory.
2273
+ We utilize the metadata provided by the jupyter server.
2274
+ """
2275
+ if not self.x_jupyter_root or not program:
2276
+ return None
2277
+
2278
+ self.program_abspath = os.path.abspath(
2279
+ os.path.join(self.x_jupyter_root, program)
2280
+ )
2281
+ self.program_relpath = program
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wandb
3
- Version: 0.22.1
3
+ Version: 0.22.3
4
4
  Summary: A CLI and library for interacting with the Weights & Biases API.
5
5
  Project-URL: Source, https://github.com/wandb/wandb
6
6
  Project-URL: Bug Reports, https://github.com/wandb/wandb/issues
@@ -42,6 +42,7 @@ Classifier: Programming Language :: Python :: 3.10
42
42
  Classifier: Programming Language :: Python :: 3.11
43
43
  Classifier: Programming Language :: Python :: 3.12
44
44
  Classifier: Programming Language :: Python :: 3.13
45
+ Classifier: Programming Language :: Python :: 3.14
45
46
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
46
47
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
47
48
  Classifier: Topic :: System :: Logging