wandb 0.20.1rc20250604__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 (124) hide show
  1. wandb/__init__.py +3 -6
  2. wandb/__init__.pyi +24 -23
  3. wandb/analytics/sentry.py +2 -2
  4. wandb/apis/importers/internals/internal.py +0 -3
  5. wandb/apis/internal.py +3 -0
  6. wandb/apis/paginator.py +17 -4
  7. wandb/apis/public/api.py +85 -4
  8. wandb/apis/public/artifacts.py +10 -8
  9. wandb/apis/public/files.py +5 -5
  10. wandb/apis/public/projects.py +44 -3
  11. wandb/apis/public/registries/{utils.py → _utils.py} +12 -12
  12. wandb/apis/public/registries/registries_search.py +2 -2
  13. wandb/apis/public/registries/registry.py +19 -18
  14. wandb/apis/public/reports.py +64 -8
  15. wandb/apis/public/runs.py +16 -23
  16. wandb/automations/__init__.py +10 -10
  17. wandb/automations/_filters/run_metrics.py +0 -2
  18. wandb/automations/_utils.py +0 -2
  19. wandb/automations/actions.py +0 -2
  20. wandb/automations/automations.py +0 -2
  21. wandb/automations/events.py +0 -2
  22. wandb/bin/gpu_stats +0 -0
  23. wandb/cli/beta.py +1 -7
  24. wandb/cli/cli.py +0 -30
  25. wandb/env.py +0 -6
  26. wandb/integration/catboost/catboost.py +6 -2
  27. wandb/integration/kfp/kfp_patch.py +3 -1
  28. wandb/integration/sb3/sb3.py +3 -3
  29. wandb/integration/ultralytics/callback.py +6 -2
  30. wandb/plot/__init__.py +2 -0
  31. wandb/plot/bar.py +30 -29
  32. wandb/plot/confusion_matrix.py +75 -71
  33. wandb/plot/histogram.py +26 -25
  34. wandb/plot/line.py +33 -32
  35. wandb/plot/line_series.py +100 -103
  36. wandb/plot/pr_curve.py +33 -32
  37. wandb/plot/roc_curve.py +38 -38
  38. wandb/plot/scatter.py +27 -27
  39. wandb/proto/v3/wandb_internal_pb2.py +366 -385
  40. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  41. wandb/proto/v3/wandb_telemetry_pb2.py +10 -10
  42. wandb/proto/v4/wandb_internal_pb2.py +352 -356
  43. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  44. wandb/proto/v4/wandb_telemetry_pb2.py +10 -10
  45. wandb/proto/v5/wandb_internal_pb2.py +352 -356
  46. wandb/proto/v5/wandb_settings_pb2.py +2 -2
  47. wandb/proto/v5/wandb_telemetry_pb2.py +10 -10
  48. wandb/proto/v6/wandb_internal_pb2.py +352 -356
  49. wandb/proto/v6/wandb_settings_pb2.py +2 -2
  50. wandb/proto/v6/wandb_telemetry_pb2.py +10 -10
  51. wandb/sdk/artifacts/_generated/__init__.py +12 -1
  52. wandb/sdk/artifacts/_generated/input_types.py +20 -2
  53. wandb/sdk/artifacts/_generated/link_artifact.py +21 -0
  54. wandb/sdk/artifacts/_generated/operations.py +9 -0
  55. wandb/sdk/artifacts/_validators.py +40 -2
  56. wandb/sdk/artifacts/artifact.py +163 -21
  57. wandb/sdk/artifacts/storage_handlers/s3_handler.py +42 -1
  58. wandb/sdk/backend/backend.py +1 -1
  59. wandb/sdk/data_types/base_types/media.py +9 -7
  60. wandb/sdk/data_types/base_types/wb_value.py +6 -6
  61. wandb/sdk/data_types/saved_model.py +3 -3
  62. wandb/sdk/data_types/table.py +41 -41
  63. wandb/sdk/data_types/trace_tree.py +12 -12
  64. wandb/sdk/interface/interface.py +8 -19
  65. wandb/sdk/interface/interface_shared.py +7 -16
  66. wandb/sdk/internal/datastore.py +18 -18
  67. wandb/sdk/internal/handler.py +4 -74
  68. wandb/sdk/internal/internal_api.py +54 -0
  69. wandb/sdk/internal/sender.py +23 -3
  70. wandb/sdk/internal/sender_config.py +9 -0
  71. wandb/sdk/launch/_project_spec.py +3 -3
  72. wandb/sdk/launch/agent/agent.py +3 -3
  73. wandb/sdk/launch/agent/job_status_tracker.py +3 -1
  74. wandb/sdk/launch/utils.py +3 -3
  75. wandb/sdk/lib/console_capture.py +66 -19
  76. wandb/sdk/lib/printer.py +6 -7
  77. wandb/sdk/lib/progress.py +1 -3
  78. wandb/sdk/lib/service/ipc_support.py +13 -0
  79. wandb/sdk/lib/{service_connection.py → service/service_connection.py} +20 -56
  80. wandb/sdk/lib/service/service_port_file.py +105 -0
  81. wandb/sdk/lib/service/service_process.py +111 -0
  82. wandb/sdk/lib/service/service_token.py +164 -0
  83. wandb/sdk/lib/sock_client.py +8 -12
  84. wandb/sdk/wandb_init.py +1 -5
  85. wandb/sdk/wandb_require.py +9 -21
  86. wandb/sdk/wandb_run.py +23 -137
  87. wandb/sdk/wandb_settings.py +233 -80
  88. wandb/sdk/wandb_setup.py +2 -13
  89. {wandb-0.20.1rc20250604.dist-info → wandb-0.21.0.dist-info}/METADATA +1 -3
  90. {wandb-0.20.1rc20250604.dist-info → wandb-0.21.0.dist-info}/RECORD +93 -119
  91. wandb/sdk/internal/flow_control.py +0 -263
  92. wandb/sdk/internal/internal.py +0 -401
  93. wandb/sdk/internal/internal_util.py +0 -97
  94. wandb/sdk/internal/system/__init__.py +0 -0
  95. wandb/sdk/internal/system/assets/__init__.py +0 -25
  96. wandb/sdk/internal/system/assets/aggregators.py +0 -31
  97. wandb/sdk/internal/system/assets/asset_registry.py +0 -20
  98. wandb/sdk/internal/system/assets/cpu.py +0 -163
  99. wandb/sdk/internal/system/assets/disk.py +0 -210
  100. wandb/sdk/internal/system/assets/gpu.py +0 -416
  101. wandb/sdk/internal/system/assets/gpu_amd.py +0 -233
  102. wandb/sdk/internal/system/assets/interfaces.py +0 -205
  103. wandb/sdk/internal/system/assets/ipu.py +0 -177
  104. wandb/sdk/internal/system/assets/memory.py +0 -166
  105. wandb/sdk/internal/system/assets/network.py +0 -125
  106. wandb/sdk/internal/system/assets/open_metrics.py +0 -293
  107. wandb/sdk/internal/system/assets/tpu.py +0 -154
  108. wandb/sdk/internal/system/assets/trainium.py +0 -393
  109. wandb/sdk/internal/system/env_probe_helpers.py +0 -13
  110. wandb/sdk/internal/system/system_info.py +0 -248
  111. wandb/sdk/internal/system/system_monitor.py +0 -224
  112. wandb/sdk/internal/writer.py +0 -204
  113. wandb/sdk/lib/service_token.py +0 -93
  114. wandb/sdk/service/__init__.py +0 -0
  115. wandb/sdk/service/_startup_debug.py +0 -22
  116. wandb/sdk/service/port_file.py +0 -53
  117. wandb/sdk/service/server.py +0 -107
  118. wandb/sdk/service/server_sock.py +0 -286
  119. wandb/sdk/service/service.py +0 -252
  120. wandb/sdk/service/streams.py +0 -425
  121. wandb/sdk/wandb_metadata.py +0 -623
  122. {wandb-0.20.1rc20250604.dist-info → wandb-0.21.0.dist-info}/WHEEL +0 -0
  123. {wandb-0.20.1rc20250604.dist-info → wandb-0.21.0.dist-info}/entry_points.txt +0 -0
  124. {wandb-0.20.1rc20250604.dist-info → wandb-0.21.0.dist-info}/licenses/LICENSE +0 -0
wandb/plot/roc_curve.py CHANGED
@@ -23,20 +23,20 @@ def roc_curve(
23
23
  """Constructs Receiver Operating Characteristic (ROC) curve chart.
24
24
 
25
25
  Args:
26
- y_true (Sequence[numbers.Number]): The true class labels (ground truth)
26
+ y_true: The true class labels (ground truth)
27
27
  for the target variable. Shape should be (num_samples,).
28
- y_probas (Sequence[Sequence[float]]): The predicted probabilities or
28
+ y_probas: The predicted probabilities or
29
29
  decision scores for each class. Shape should be (num_samples, num_classes).
30
- labels (list[str]): Human-readable labels corresponding to the class
30
+ labels: Human-readable labels corresponding to the class
31
31
  indices in `y_true`. For example, if `labels=['dog', 'cat']`,
32
32
  class 0 will be displayed as 'dog' and class 1 as 'cat' in the plot.
33
33
  If None, the raw class indices from `y_true` will be used.
34
34
  Default is None.
35
- classes_to_plot (list[numbers.Number]): A subset of unique class labels
35
+ classes_to_plot: A subset of unique class labels
36
36
  to include in the ROC curve. If None, all classes in `y_true` will
37
37
  be plotted. Default is None.
38
- title (str): Title of the ROC curve plot. Default is "ROC Curve".
39
- split_table (bool): Whether the table should be split into a separate
38
+ title: Title of the ROC curve plot. Default is "ROC Curve".
39
+ split_table: Whether the table should be split into a separate
40
40
  section in the W&B UI. If `True`, the table will be displayed in a
41
41
  section named "Custom Chart Tables". Default is `False`.
42
42
 
@@ -48,38 +48,38 @@ def roc_curve(
48
48
  wandb.Error: If numpy, pandas, or scikit-learn are not found.
49
49
 
50
50
  Example:
51
- ```
52
- import numpy as np
53
- import wandb
54
-
55
- # Simulate a medical diagnosis classification problem with three diseases
56
- n_samples = 200
57
- n_classes = 3
58
-
59
- # True labels: assign "Diabetes", "Hypertension", or "Heart Disease" to
60
- # each sample
61
- disease_labels = ["Diabetes", "Hypertension", "Heart Disease"]
62
- # 0: Diabetes, 1: Hypertension, 2: Heart Disease
63
- y_true = np.random.choice([0, 1, 2], size=n_samples)
64
-
65
- # Predicted probabilities: simulate predictions, ensuring they sum to 1
66
- # for each sample
67
- y_probas = np.random.dirichlet(np.ones(n_classes), size=n_samples)
68
-
69
- # Specify classes to plot (plotting all three diseases)
70
- classes_to_plot = [0, 1, 2]
71
-
72
- # Initialize a W&B run and log a ROC curve plot for disease classification
73
- with wandb.init(project="medical_diagnosis") as run:
74
- roc_plot = wandb.plot.roc_curve(
75
- y_true=y_true,
76
- y_probas=y_probas,
77
- labels=disease_labels,
78
- classes_to_plot=classes_to_plot,
79
- title="ROC Curve for Disease Classification",
80
- )
81
- run.log({"roc-curve": roc_plot})
82
- ```
51
+ ```python
52
+ import numpy as np
53
+ import wandb
54
+
55
+ # Simulate a medical diagnosis classification problem with three diseases
56
+ n_samples = 200
57
+ n_classes = 3
58
+
59
+ # True labels: assign "Diabetes", "Hypertension", or "Heart Disease" to
60
+ # each sample
61
+ disease_labels = ["Diabetes", "Hypertension", "Heart Disease"]
62
+ # 0: Diabetes, 1: Hypertension, 2: Heart Disease
63
+ y_true = np.random.choice([0, 1, 2], size=n_samples)
64
+
65
+ # Predicted probabilities: simulate predictions, ensuring they sum to 1
66
+ # for each sample
67
+ y_probas = np.random.dirichlet(np.ones(n_classes), size=n_samples)
68
+
69
+ # Specify classes to plot (plotting all three diseases)
70
+ classes_to_plot = [0, 1, 2]
71
+
72
+ # Initialize a W&B run and log a ROC curve plot for disease classification
73
+ with wandb.init(project="medical_diagnosis") as run:
74
+ roc_plot = wandb.plot.roc_curve(
75
+ y_true=y_true,
76
+ y_probas=y_probas,
77
+ labels=disease_labels,
78
+ classes_to_plot=classes_to_plot,
79
+ title="ROC Curve for Disease Classification",
80
+ )
81
+ run.log({"roc-curve": roc_plot})
82
+ ```
83
83
  """
84
84
  np = util.get_module(
85
85
  "numpy",
wandb/plot/scatter.py CHANGED
@@ -19,11 +19,11 @@ def scatter(
19
19
  """Constructs a scatter plot from a wandb.Table of data.
20
20
 
21
21
  Args:
22
- table (wandb.Table): The W&B Table containing the data to visualize.
23
- x (str): The name of the column used for the x-axis.
24
- y (str): The name of the column used for the y-axis.
25
- title (str): The title of the scatter chart.
26
- split_table (bool): Whether the table should be split into a separate section
22
+ table: The W&B Table containing the data to visualize.
23
+ x: The name of the column used for the x-axis.
24
+ y: The name of the column used for the y-axis.
25
+ title: The title of the scatter chart.
26
+ split_table: Whether the table should be split into a separate section
27
27
  in the W&B UI. If `True`, the table will be displayed in a section named
28
28
  "Custom Chart Tables". Default is `False`.
29
29
 
@@ -31,31 +31,31 @@ def scatter(
31
31
  CustomChart: A custom chart object that can be logged to W&B. To log the
32
32
  chart, pass it to `wandb.log()`.
33
33
  Example:
34
- ```
35
- import math
36
- import random
37
- import wandb
34
+ ```python
35
+ import math
36
+ import random
37
+ import wandb
38
38
 
39
- # Simulate temperature variations at different altitudes over time
40
- data = [
41
- [i, random.uniform(-10, 20) - 0.005 * i + 5 * math.sin(i / 50)]
42
- for i in range(300)
43
- ]
39
+ # Simulate temperature variations at different altitudes over time
40
+ data = [
41
+ [i, random.uniform(-10, 20) - 0.005 * i + 5 * math.sin(i / 50)]
42
+ for i in range(300)
43
+ ]
44
44
 
45
- # Create W&B table with altitude (m) and temperature (°C) columns
46
- table = wandb.Table(data=data, columns=["altitude (m)", "temperature (°C)"])
45
+ # Create W&B table with altitude (m) and temperature (°C) columns
46
+ table = wandb.Table(data=data, columns=["altitude (m)", "temperature (°C)"])
47
47
 
48
- # Initialize W&B run and log the scatter plot
49
- with wandb.init(project="temperature-altitude-scatter") as run:
50
- # Create and log the scatter plot
51
- scatter_plot = wandb.plot.scatter(
52
- table=table,
53
- x="altitude (m)",
54
- y="temperature (°C)",
55
- title="Altitude vs Temperature",
56
- )
57
- run.log({"altitude-temperature-scatter": scatter_plot})
58
- ```
48
+ # Initialize W&B run and log the scatter plot
49
+ with wandb.init(project="temperature-altitude-scatter") as run:
50
+ # Create and log the scatter plot
51
+ scatter_plot = wandb.plot.scatter(
52
+ table=table,
53
+ x="altitude (m)",
54
+ y="temperature (°C)",
55
+ title="Altitude vs Temperature",
56
+ )
57
+ run.log({"altitude-temperature-scatter": scatter_plot})
58
+ ```
59
59
  """
60
60
  return plot_table(
61
61
  data_table=table,