wandb 0.20.2rc20250616__py3-none-any.whl → 0.21.0__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 (71) hide show
  1. wandb/__init__.py +1 -1
  2. wandb/__init__.pyi +24 -23
  3. wandb/apis/internal.py +3 -0
  4. wandb/apis/paginator.py +17 -4
  5. wandb/apis/public/api.py +83 -2
  6. wandb/apis/public/artifacts.py +10 -8
  7. wandb/apis/public/files.py +5 -5
  8. wandb/apis/public/projects.py +44 -3
  9. wandb/apis/public/reports.py +64 -8
  10. wandb/apis/public/runs.py +16 -23
  11. wandb/automations/__init__.py +10 -10
  12. wandb/automations/_filters/run_metrics.py +0 -2
  13. wandb/automations/_utils.py +0 -2
  14. wandb/automations/actions.py +0 -2
  15. wandb/automations/automations.py +0 -2
  16. wandb/automations/events.py +0 -2
  17. wandb/bin/gpu_stats +0 -0
  18. wandb/integration/catboost/catboost.py +6 -2
  19. wandb/integration/kfp/kfp_patch.py +3 -1
  20. wandb/integration/sb3/sb3.py +3 -3
  21. wandb/integration/ultralytics/callback.py +6 -2
  22. wandb/plot/__init__.py +2 -0
  23. wandb/plot/bar.py +30 -29
  24. wandb/plot/confusion_matrix.py +75 -71
  25. wandb/plot/histogram.py +26 -25
  26. wandb/plot/line.py +33 -32
  27. wandb/plot/line_series.py +100 -103
  28. wandb/plot/pr_curve.py +33 -32
  29. wandb/plot/roc_curve.py +38 -38
  30. wandb/plot/scatter.py +27 -27
  31. wandb/proto/v3/wandb_internal_pb2.py +366 -385
  32. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  33. wandb/proto/v4/wandb_internal_pb2.py +352 -356
  34. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  35. wandb/proto/v5/wandb_internal_pb2.py +352 -356
  36. wandb/proto/v5/wandb_settings_pb2.py +2 -2
  37. wandb/proto/v6/wandb_internal_pb2.py +352 -356
  38. wandb/proto/v6/wandb_settings_pb2.py +2 -2
  39. wandb/sdk/artifacts/_generated/__init__.py +12 -1
  40. wandb/sdk/artifacts/_generated/input_types.py +20 -2
  41. wandb/sdk/artifacts/_generated/link_artifact.py +21 -0
  42. wandb/sdk/artifacts/_generated/operations.py +9 -0
  43. wandb/sdk/artifacts/_validators.py +40 -2
  44. wandb/sdk/artifacts/artifact.py +163 -21
  45. wandb/sdk/data_types/base_types/media.py +9 -7
  46. wandb/sdk/data_types/base_types/wb_value.py +6 -6
  47. wandb/sdk/data_types/saved_model.py +3 -3
  48. wandb/sdk/data_types/table.py +41 -41
  49. wandb/sdk/data_types/trace_tree.py +12 -12
  50. wandb/sdk/interface/interface.py +8 -19
  51. wandb/sdk/interface/interface_shared.py +7 -16
  52. wandb/sdk/internal/datastore.py +18 -18
  53. wandb/sdk/internal/handler.py +3 -5
  54. wandb/sdk/internal/internal_api.py +54 -0
  55. wandb/sdk/internal/sender.py +23 -3
  56. wandb/sdk/internal/sender_config.py +9 -0
  57. wandb/sdk/launch/_project_spec.py +3 -3
  58. wandb/sdk/launch/agent/agent.py +3 -3
  59. wandb/sdk/launch/agent/job_status_tracker.py +3 -1
  60. wandb/sdk/launch/utils.py +3 -3
  61. wandb/sdk/lib/console_capture.py +66 -19
  62. wandb/sdk/wandb_init.py +1 -2
  63. wandb/sdk/wandb_require.py +0 -1
  64. wandb/sdk/wandb_run.py +23 -113
  65. wandb/sdk/wandb_settings.py +234 -72
  66. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.0.dist-info}/METADATA +1 -1
  67. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.0.dist-info}/RECORD +70 -70
  68. wandb/sdk/wandb_metadata.py +0 -623
  69. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.0.dist-info}/WHEEL +0 -0
  70. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.0.dist-info}/entry_points.txt +0 -0
  71. {wandb-0.20.2rc20250616.dist-info → wandb-0.21.0.dist-info}/licenses/LICENSE +0 -0
@@ -299,7 +299,10 @@ class Settings(BaseModel, validate_assignment=True):
299
299
  """Root directory of the git repository."""
300
300
 
301
301
  heartbeat_seconds: int = 30
302
- """Interval in seconds between heartbeat signals sent to the W&B servers."""
302
+ """Interval in seconds between heartbeat signals sent to the W&B servers.
303
+
304
+ <!-- lazydoc-ignore-class-attributes -->
305
+ """
303
306
 
304
307
  host: Optional[str] = None
305
308
  """Hostname of the machine running the script."""
@@ -310,7 +313,6 @@ class Settings(BaseModel, validate_assignment=True):
310
313
  https_proxy: Optional[str] = None
311
314
  """Custom proxy servers for https requests to W&B."""
312
315
 
313
- # Path to file containing an identity token (JWT) for authentication.
314
316
  identity_token_file: Optional[str] = None
315
317
  """Path to file containing an identity token (JWT) for authentication."""
316
318
 
@@ -333,7 +335,10 @@ class Settings(BaseModel, validate_assignment=True):
333
335
  """Whether to disable automatic labeling features."""
334
336
 
335
337
  launch: bool = False
336
- """Flag to indicate if the run is being launched through W&B Launch."""
338
+ """Flag to indicate if the run is being launched through W&B Launch.
339
+
340
+ <!-- lazydoc-ignore-class-attributes -->
341
+ """
337
342
 
338
343
  launch_config_path: Optional[str] = None
339
344
  """Path to the launch configuration file."""
@@ -341,7 +346,7 @@ class Settings(BaseModel, validate_assignment=True):
341
346
  login_timeout: Optional[float] = None
342
347
  """Time in seconds to wait for login operations before timing out."""
343
348
 
344
- mode: Literal["online", "offline", "dryrun", "disabled", "run", "shared"] = Field(
349
+ mode: Literal["online", "offline", "shared", "disabled", "dryrun", "run"] = Field(
345
350
  default="online",
346
351
  validate_default=True,
347
352
  )
@@ -403,19 +408,15 @@ class Settings(BaseModel, validate_assignment=True):
403
408
  resume: Optional[Literal["allow", "must", "never", "auto"]] = None
404
409
  """Specifies the resume behavior for the run.
405
410
 
406
- The available options are:
407
-
408
- "must": Resumes from an existing run with the same ID. If no such run exists,
409
- it will result in failure.
410
-
411
- "allow": Attempts to resume from an existing run with the same ID. If none is
412
- found, a new run will be created.
413
-
414
- "never": Always starts a new run. If a run with the same ID already exists,
415
- it will result in failure.
416
-
417
- "auto": Automatically resumes from the most recent failed run on the same
418
- machine.
411
+ Options:
412
+ - "must": Resumes from an existing run with the same ID. If no such run exists,
413
+ it will result in failure.
414
+ - "allow": Attempts to resume from an existing run with the same ID. If none is
415
+ found, a new run will be created.
416
+ - "never": Always starts a new run. If a run with the same ID already exists,
417
+ it will result in failure.
418
+ - "auto": Automatically resumes from the most recent failed run on the same
419
+ machine.
419
420
  """
420
421
 
421
422
  resume_from: Optional[RunMoment] = None
@@ -429,6 +430,7 @@ class Settings(BaseModel, validate_assignment=True):
429
430
  """Indication from the server about the state of the run.
430
431
 
431
432
  This is different from resume, a user provided flag.
433
+ <!-- lazydoc-ignore-class-attributes -->
432
434
  """
433
435
 
434
436
  root_dir: str = Field(default_factory=lambda: os.path.abspath(os.getcwd()))
@@ -468,10 +470,16 @@ class Settings(BaseModel, validate_assignment=True):
468
470
  """Path to the system-wide settings file."""
469
471
 
470
472
  show_colors: Optional[bool] = None
471
- """Whether to use colored output in the console."""
473
+ """Whether to use colored output in the console.
474
+
475
+ <!-- lazydoc-ignore-class-attributes -->
476
+ """
472
477
 
473
478
  show_emoji: Optional[bool] = None
474
- """Whether to show emoji in the console output."""
479
+ """Whether to show emoji in the console output.
480
+
481
+ <!-- lazydoc-ignore-class-attributes -->
482
+ """
475
483
 
476
484
  show_errors: bool = True
477
485
  """Whether to display error messages."""
@@ -486,7 +494,11 @@ class Settings(BaseModel, validate_assignment=True):
486
494
  """Flag to suppress all output."""
487
495
 
488
496
  start_method: Optional[str] = None
489
- """Method to use for starting subprocesses."""
497
+ """Method to use for starting subprocesses.
498
+
499
+ This is deprecated and will be removed in a future release.
500
+ <!-- lazydoc-ignore-class-attributes -->
501
+ """
490
502
 
491
503
  strict: Optional[bool] = None
492
504
  """Whether to enable strict mode for validation and error checking."""
@@ -494,8 +506,11 @@ class Settings(BaseModel, validate_assignment=True):
494
506
  summary_timeout: int = 60
495
507
  """Time in seconds to wait for summary operations before timing out."""
496
508
 
497
- summary_warnings: int = 5 # TODO: kill this with fire
498
- """Maximum number of summary warnings to display."""
509
+ summary_warnings: int = 5
510
+ """Maximum number of summary warnings to display.
511
+
512
+ <!-- lazydoc-ignore-class-attributes -->
513
+ """
499
514
 
500
515
  sweep_id: Optional[str] = None
501
516
  """Identifier of the sweep this run belongs to."""
@@ -523,7 +538,10 @@ class Settings(BaseModel, validate_assignment=True):
523
538
  # a part of the public API as they may change or be removed in future versions.
524
539
 
525
540
  x_cli_only_mode: bool = False
526
- """Flag to indicate that the SDK is running in CLI-only mode."""
541
+ """Flag to indicate that the SDK is running in CLI-only mode.
542
+
543
+ <!-- lazydoc-ignore-class-attributes -->
544
+ """
527
545
 
528
546
  x_disable_meta: bool = False
529
547
  """Flag to disable the collection of system metadata."""
@@ -532,13 +550,22 @@ class Settings(BaseModel, validate_assignment=True):
532
550
  """Flag to disable the collection of system metrics."""
533
551
 
534
552
  x_disable_viewer: bool = False
535
- """Flag to disable the early viewer query."""
553
+ """Flag to disable the early viewer query.
554
+
555
+ <!-- lazydoc-ignore-class-attributes -->
556
+ """
536
557
 
537
558
  x_disable_machine_info: bool = False
538
- """Flag to disable automatic machine info collection."""
559
+ """Flag to disable automatic machine info collection.
560
+
561
+ <!-- lazydoc-ignore-class-attributes -->
562
+ """
539
563
 
540
564
  x_executable: Optional[str] = None
541
- """Path to the Python executable."""
565
+ """Path to the Python executable.
566
+
567
+ <!-- lazydoc-ignore-class-attributes -->
568
+ """
542
569
 
543
570
  x_extra_http_headers: Optional[Dict[str, str]] = None
544
571
  """Additional headers to add to all outgoing HTTP requests."""
@@ -549,82 +576,142 @@ class Settings(BaseModel, validate_assignment=True):
549
576
  Its purpose is to prevent HTTP requests from failing due to
550
577
  containing too much data. This number is approximate:
551
578
  requests will be slightly larger.
579
+ <!-- lazydoc-ignore-class-attributes -->
552
580
  """
553
581
 
554
582
  x_file_stream_max_line_bytes: Optional[int] = None
555
- """Maximum line length for filestream JSONL files."""
583
+ """Maximum line length for filestream JSONL files.
584
+
585
+ <!-- lazydoc-ignore-class-attributes -->
586
+ """
556
587
 
557
588
  x_file_stream_transmit_interval: Optional[float] = None
558
- """Interval in seconds between filestream transmissions."""
589
+ """Interval in seconds between filestream transmissions.
590
+
591
+ <!-- lazydoc-ignore-class-attributes -->
592
+ """
559
593
 
560
594
  # Filestream retry client configuration.
561
595
 
562
596
  x_file_stream_retry_max: Optional[int] = None
563
- """Max number of retries for filestream operations."""
597
+ """Max number of retries for filestream operations.
598
+
599
+ <!-- lazydoc-ignore-class-attributes -->
600
+ """
564
601
 
565
602
  x_file_stream_retry_wait_min_seconds: Optional[float] = None
566
- """Minimum wait time between retries for filestream operations."""
603
+ """Minimum wait time between retries for filestream operations.
604
+
605
+ <!-- lazydoc-ignore-class-attributes -->
606
+ """
567
607
 
568
608
  x_file_stream_retry_wait_max_seconds: Optional[float] = None
569
- """Maximum wait time between retries for filestream operations."""
609
+ """Maximum wait time between retries for filestream operations.
610
+
611
+ <!-- lazydoc-ignore-class-attributes -->
612
+ """
570
613
 
571
614
  x_file_stream_timeout_seconds: Optional[float] = None
572
- """Timeout in seconds for individual filestream HTTP requests."""
615
+ """Timeout in seconds for individual filestream HTTP requests.
616
+
617
+ <!-- lazydoc-ignore-class-attributes -->
618
+ """
573
619
 
574
620
  # file transfer retry client configuration
575
621
 
576
622
  x_file_transfer_retry_max: Optional[int] = None
577
- """Max number of retries for file transfer operations."""
623
+ """Max number of retries for file transfer operations.
624
+
625
+ <!-- lazydoc-ignore-class-attributes -->
626
+ """
578
627
 
579
628
  x_file_transfer_retry_wait_min_seconds: Optional[float] = None
580
- """Minimum wait time between retries for file transfer operations."""
629
+ """Minimum wait time between retries for file transfer operations.
630
+
631
+ <!-- lazydoc-ignore-class-attributes -->
632
+ """
581
633
 
582
634
  x_file_transfer_retry_wait_max_seconds: Optional[float] = None
583
- """Maximum wait time between retries for file transfer operations."""
635
+ """Maximum wait time between retries for file transfer operations.
636
+
637
+ <!-- lazydoc-ignore-class-attributes -->
638
+ """
584
639
 
585
640
  x_file_transfer_timeout_seconds: Optional[float] = None
586
- """Timeout in seconds for individual file transfer HTTP requests."""
641
+ """Timeout in seconds for individual file transfer HTTP requests.
642
+
643
+ <!-- lazydoc-ignore-class-attributes -->
644
+ """
587
645
 
588
646
  x_files_dir: Optional[str] = None
589
- """Override setting for the computed files_dir.."""
647
+ """Override setting for the computed files_dir.
648
+
649
+ <!-- lazydoc-ignore-class-attributes -->
650
+ """
590
651
 
591
652
  x_flow_control_custom: Optional[bool] = None
592
653
  """Flag indicating custom flow control for filestream.
593
654
 
594
655
  TODO: Not implemented in wandb-core.
656
+ <!-- lazydoc-ignore-class-attributes -->
595
657
  """
596
658
 
597
659
  x_flow_control_disabled: Optional[bool] = None
598
660
  """Flag indicating flow control is disabled for filestream.
599
661
 
600
662
  TODO: Not implemented in wandb-core.
663
+ <!-- lazydoc-ignore-class-attributes -->
601
664
  """
602
665
 
603
666
  # graphql retry client configuration
604
667
 
605
668
  x_graphql_retry_max: Optional[int] = None
606
- """Max number of retries for GraphQL operations."""
669
+ """Max number of retries for GraphQL operations.
670
+
671
+ <!-- lazydoc-ignore-class-attributes -->
672
+ """
607
673
 
608
674
  x_graphql_retry_wait_min_seconds: Optional[float] = None
609
- """Minimum wait time between retries for GraphQL operations."""
675
+ """Minimum wait time between retries for GraphQL operations.
676
+
677
+ <!-- lazydoc-ignore-class-attributes -->
678
+ """
610
679
 
611
680
  x_graphql_retry_wait_max_seconds: Optional[float] = None
612
- """Maximum wait time between retries for GraphQL operations."""
681
+ """Maximum wait time between retries for GraphQL operations.
682
+
683
+ <!-- lazydoc-ignore-class-attributes -->
684
+ """
613
685
 
614
686
  x_graphql_timeout_seconds: Optional[float] = None
615
- """Timeout in seconds for individual GraphQL requests."""
687
+ """Timeout in seconds for individual GraphQL requests.
688
+
689
+ <!-- lazydoc-ignore-class-attributes -->
690
+ """
616
691
 
617
692
  x_internal_check_process: float = 8.0
618
- """Interval for internal process health checks in seconds."""
693
+ """Interval for internal process health checks in seconds.
694
+
695
+ <!-- lazydoc-ignore-class-attributes -->
696
+ """
619
697
 
620
698
  x_jupyter_name: Optional[str] = None
621
- """Name of the Jupyter notebook."""
699
+ """Name of the Jupyter notebook.
700
+
701
+ <!-- lazydoc-ignore-class-attributes -->
702
+ """
622
703
 
623
704
  x_jupyter_path: Optional[str] = None
624
- """Path to the Jupyter notebook."""
705
+ """Path to the Jupyter notebook.
706
+
707
+ <!-- lazydoc-ignore-class-attributes -->
708
+ """
625
709
 
626
710
  x_jupyter_root: Optional[str] = None
627
- """Root directory of the Jupyter notebook."""
711
+ """Root directory of the Jupyter notebook.
712
+
713
+ <!-- lazydoc-ignore-class-attributes -->
714
+ """
628
715
 
629
716
  x_label: Optional[str] = None
630
717
  """Label to assign to system metrics and console logs collected for the run.
@@ -634,18 +721,28 @@ class Settings(BaseModel, validate_assignment=True):
634
721
  """
635
722
 
636
723
  x_live_policy_rate_limit: Optional[int] = None
637
- """Rate limit for live policy updates in seconds."""
724
+ """Rate limit for live policy updates in seconds.
725
+
726
+ <!-- lazydoc-ignore-class-attributes -->
727
+ """
638
728
 
639
729
  x_live_policy_wait_time: Optional[int] = None
640
- """Wait time between live policy updates in seconds."""
730
+ """Wait time between live policy updates in seconds.
731
+
732
+ <!-- lazydoc-ignore-class-attributes -->
733
+ """
641
734
 
642
735
  x_log_level: int = logging.INFO
643
- """Logging level for internal operations."""
736
+ """Logging level for internal operations.
737
+
738
+ <!-- lazydoc-ignore-class-attributes -->
739
+ """
644
740
 
645
741
  x_network_buffer: Optional[int] = None
646
742
  """Size of the network buffer used in flow control.
647
743
 
648
744
  TODO: Not implemented in wandb-core.
745
+ <!-- lazydoc-ignore-class-attributes -->
649
746
  """
650
747
 
651
748
  x_primary: bool = Field(
@@ -661,12 +758,16 @@ class Settings(BaseModel, validate_assignment=True):
661
758
  x_proxies: Optional[Dict[str, str]] = None
662
759
  """Custom proxy servers for requests to W&B.
663
760
 
664
- This is deprecated and will be removed in future versions.
761
+ This is deprecated and will be removed in a future release.
665
762
  Please use `http_proxy` and `https_proxy` instead.
763
+ <!-- lazydoc-ignore-class-attributes -->
666
764
  """
667
765
 
668
766
  x_runqueue_item_id: Optional[str] = None
669
- """ID of the Launch run queue item being processed."""
767
+ """ID of the Launch run queue item being processed.
768
+
769
+ <!-- lazydoc-ignore-class-attributes -->
770
+ """
670
771
 
671
772
  x_save_requirements: bool = True
672
773
  """Flag to save the requirements file."""
@@ -677,14 +778,18 @@ class Settings(BaseModel, validate_assignment=True):
677
778
  This does not disable user-provided summary updates.
678
779
  """
679
780
 
680
- x_server_side_expand_glob_metrics: bool = False
781
+ x_server_side_expand_glob_metrics: bool = True
681
782
  """Flag to delegate glob matching of metrics in define_metric to the server.
682
783
 
683
784
  If the server does not support this, the client will perform the glob matching.
785
+ <!-- lazydoc-ignore-class-attributes -->
684
786
  """
685
787
 
686
788
  x_service_transport: Optional[str] = None
687
- """Transport method for communication with the wandb service."""
789
+ """Transport method for communication with the wandb service.
790
+
791
+ <!-- lazydoc-ignore-class-attributes -->
792
+ """
688
793
 
689
794
  x_service_wait: float = 30.0
690
795
  """Time in seconds to wait for the wandb-core internal service to start."""
@@ -696,13 +801,20 @@ class Settings(BaseModel, validate_assignment=True):
696
801
  data written to disk.
697
802
 
698
803
  Should be used with caution, as it removes the gurantees about
699
- recoverability."""
804
+ recoverability.
805
+ """
700
806
 
701
807
  x_start_time: Optional[float] = None
702
- """The start time of the run in seconds since the Unix epoch."""
808
+ """The start time of the run in seconds since the Unix epoch.
809
+
810
+ <!-- lazydoc-ignore-class-attributes -->
811
+ """
703
812
 
704
813
  x_stats_pid: int = os.getpid()
705
- """PID of the process that started the wandb-core process to collect system stats for."""
814
+ """PID of the process that started the wandb-core process to collect system stats for.
815
+
816
+ <!-- lazydoc-ignore-class-attributes -->
817
+ """
706
818
 
707
819
  x_stats_sampling_interval: float = Field(default=15.0)
708
820
  """Sampling interval for the system monitor in seconds."""
@@ -711,20 +823,22 @@ class Settings(BaseModel, validate_assignment=True):
711
823
  """Path to the default config file for the neuron-monitor tool.
712
824
 
713
825
  This is used to monitor AWS Trainium devices.
826
+ <!-- lazydoc-ignore-class-attributes -->
714
827
  """
715
828
 
716
829
  x_stats_dcgm_exporter: Optional[str] = None
717
830
  """Endpoint to extract Nvidia DCGM metrics from.
718
831
 
719
- Two options are supported:
720
- - Extract DCGM-related metrics from a query to the Prometheus `/api/v1/query` endpoint.
721
- It is a common practice to aggregate metrics reported by the instances of the DCGM Exporter
722
- running on different nodes in a cluster using Prometheus.
723
- - TODO: Parse metrics directly from the `/metrics` endpoint of the DCGM Exporter.
832
+ Options:
833
+ - Extract DCGM-related metrics from a query to the Prometheus `/api/v1/query` endpoint.
834
+ It is a common practice to aggregate metrics reported by the instances of the DCGM Exporter
835
+ running on different nodes in a cluster using Prometheus.
836
+ - TODO: Parse metrics directly from the `/metrics` endpoint of the DCGM Exporter.
724
837
 
725
838
  Examples:
726
- - `http://localhost:9400/api/v1/query?query=DCGM_FI_DEV_GPU_TEMP{node="l1337", cluster="globular"}`.
727
- - TODO: `http://192.168.0.1:9400/metrics`.
839
+ - `http://localhost:9400/api/v1/query?query=DCGM_FI_DEV_GPU_TEMP{node="l1337", cluster="globular"}`.
840
+ - TODO: `http://192.168.0.1:9400/metrics`.
841
+ <!-- lazydoc-ignore-class-attributes -->
728
842
  """
729
843
 
730
844
  x_stats_open_metrics_endpoints: Optional[Dict[str, str]] = None
@@ -736,24 +850,44 @@ class Settings(BaseModel, validate_assignment=True):
736
850
  """Filter to apply to metrics collected from OpenMetrics `/metrics` endpoints.
737
851
 
738
852
  Supports two formats:
739
- - {"metric regex pattern, including endpoint name as prefix": {"label": "label value regex pattern"}}
740
- - ("metric regex pattern 1", "metric regex pattern 2", ...)
853
+ - {"metric regex pattern, including endpoint name as prefix": {"label": "label value regex pattern"}}
854
+ - ("metric regex pattern 1", "metric regex pattern 2", ...)
741
855
  """
742
856
 
743
857
  x_stats_open_metrics_http_headers: Optional[Dict[str, str]] = None
744
858
  """HTTP headers to add to OpenMetrics requests."""
745
859
 
746
- x_stats_disk_paths: Optional[Sequence[str]] = Field(
747
- default_factory=lambda: ("/", "/System/Volumes/Data")
748
- if platform.system() == "Darwin"
749
- else ("/",)
750
- )
860
+ x_stats_disk_paths: Optional[Sequence[str]] = ("/",)
751
861
  """System paths to monitor for disk usage."""
752
862
 
863
+ x_stats_cpu_count: Optional[int] = None
864
+ """System CPU count.
865
+
866
+ If set, overrides the auto-detected value in the run metadata.
867
+ """
868
+
869
+ x_stats_cpu_logical_count: Optional[int] = None
870
+ """Logical CPU count.
871
+
872
+ If set, overrides the auto-detected value in the run metadata.
873
+ """
874
+
875
+ x_stats_gpu_count: Optional[int] = None
876
+ """GPU device count.
877
+
878
+ If set, overrides the auto-detected value in the run metadata.
879
+ """
880
+
881
+ x_stats_gpu_type: Optional[str] = None
882
+ """GPU device type.
883
+
884
+ If set, overrides the auto-detected value in the run metadata.
885
+ """
886
+
753
887
  x_stats_gpu_device_ids: Optional[Sequence[int]] = None
754
888
  """GPU device indices to monitor.
755
889
 
756
- If not set, captures metrics for all GPUs.
890
+ If not set, the system monitor captures metrics for all GPUs.
757
891
  Assumes 0-based indexing matching CUDA/ROCm device enumeration.
758
892
  """
759
893
 
@@ -761,12 +895,14 @@ class Settings(BaseModel, validate_assignment=True):
761
895
  """Number of system metric samples to buffer in memory in the wandb-core process.
762
896
 
763
897
  Can be accessed via run._system_metrics.
898
+ <!-- lazydoc-ignore-class-attributes -->
764
899
  """
765
900
 
766
901
  x_stats_coreweave_metadata_base_url: str = "http://169.254.169.254"
767
902
  """The scheme and hostname for contacting the CoreWeave metadata server.
768
903
 
769
904
  Only accessible from within a CoreWeave cluster.
905
+ <!-- lazydoc-ignore-class-attributes -->
770
906
  """
771
907
 
772
908
  x_stats_coreweave_metadata_endpoint: str = "/api/v2/cloud-init/meta-data"
@@ -774,10 +910,22 @@ class Settings(BaseModel, validate_assignment=True):
774
910
 
775
911
  This must not include the schema and hostname prefix.
776
912
  Only accessible from within a CoreWeave cluster.
913
+ <!-- lazydoc-ignore-class-attributes -->
914
+ """
915
+
916
+ x_stats_track_process_tree: bool = False
917
+ """Monitor the entire process tree for resource usage, starting from `x_stats_pid`.
918
+
919
+ When `True`, the system monitor aggregates the RSS, CPU%, and thread count
920
+ from the process with PID `x_stats_pid` and all of its descendants.
921
+ This can have a performance overhead and is disabled by default.
777
922
  """
778
923
 
779
924
  x_sync: bool = False
780
- """Flag to indicate whether we are syncing a run from the transaction log."""
925
+ """Flag to indicate whether we are syncing a run from the transaction log.
926
+
927
+ <!-- lazydoc-ignore-class-attributes -->
928
+ """
781
929
 
782
930
  x_update_finish_state: bool = True
783
931
  """Flag to indicate whether this process can update the run's final state on the server.
@@ -896,6 +1044,13 @@ class Settings(BaseModel, validate_assignment=True):
896
1044
  return str(value)
897
1045
  return value
898
1046
 
1047
+ @field_validator("x_extra_http_headers", mode="before")
1048
+ @classmethod
1049
+ def validate_x_extra_http_headers(cls, value):
1050
+ if isinstance(value, str):
1051
+ return json.loads(value)
1052
+ return value
1053
+
899
1054
  @field_validator("x_file_stream_max_line_bytes", mode="after")
900
1055
  @classmethod
901
1056
  def validate_file_stream_max_line_bytes(cls, value):
@@ -1048,6 +1203,11 @@ class Settings(BaseModel, validate_assignment=True):
1048
1203
  raise UsageError("Run ID cannot start or end with whitespace")
1049
1204
  if not bool(value.strip()):
1050
1205
  raise UsageError("Run ID cannot contain only whitespace")
1206
+
1207
+ # check if the run id contains any reserved characters
1208
+ reserved_chars = ":;,#?/'"
1209
+ if any(char in reserved_chars for char in value):
1210
+ raise UsageError(f"Run ID cannot contain the characters: {reserved_chars}")
1051
1211
  return value
1052
1212
 
1053
1213
  @field_validator("settings_system", mode="after")
@@ -1354,7 +1514,9 @@ class Settings(BaseModel, validate_assignment=True):
1354
1514
  return ""
1355
1515
 
1356
1516
  query = self._get_url_query_string()
1357
- return f"{project_url}/runs/{quote(self.run_id or '')}{query}"
1517
+ # Exclude specific safe characters from URL encoding to prevent 404 errors
1518
+ safe_chars = "=+&$@"
1519
+ return f"{project_url}/runs/{quote(self.run_id or '', safe=safe_chars)}{query}"
1358
1520
 
1359
1521
  @computed_field # type: ignore[prop-decorator]
1360
1522
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wandb
3
- Version: 0.20.2rc20250616
3
+ Version: 0.21.0
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