wandb 0.20.2rc20250616__py3-none-macosx_11_0_arm64.whl → 0.21.1__py3-none-macosx_11_0_arm64.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.
- wandb/__init__.py +16 -14
- wandb/__init__.pyi +450 -472
- wandb/agents/pyagent.py +41 -12
- wandb/analytics/sentry.py +7 -2
- wandb/apis/importers/mlflow.py +1 -1
- wandb/apis/internal.py +3 -0
- wandb/apis/paginator.py +17 -4
- wandb/apis/public/__init__.py +1 -1
- wandb/apis/public/api.py +606 -359
- wandb/apis/public/artifacts.py +214 -16
- wandb/apis/public/automations.py +19 -3
- wandb/apis/public/files.py +177 -38
- wandb/apis/public/history.py +67 -15
- wandb/apis/public/integrations.py +25 -2
- wandb/apis/public/jobs.py +90 -2
- wandb/apis/public/projects.py +161 -69
- wandb/apis/public/query_generator.py +11 -1
- wandb/apis/public/registries/registries_search.py +7 -15
- wandb/apis/public/reports.py +147 -13
- wandb/apis/public/runs.py +315 -128
- wandb/apis/public/sweeps.py +222 -22
- wandb/apis/public/teams.py +41 -4
- wandb/apis/public/users.py +45 -4
- wandb/automations/__init__.py +10 -10
- wandb/automations/_filters/run_metrics.py +0 -2
- wandb/automations/_utils.py +0 -2
- wandb/automations/actions.py +0 -2
- wandb/automations/automations.py +0 -2
- wandb/automations/events.py +0 -2
- wandb/beta/workflows.py +66 -30
- wandb/bin/gpu_stats +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +80 -1
- wandb/env.py +8 -0
- wandb/errors/errors.py +4 -1
- wandb/integration/catboost/catboost.py +6 -2
- wandb/integration/kfp/kfp_patch.py +3 -1
- wandb/integration/lightning/fabric/logger.py +3 -4
- wandb/integration/metaflow/__init__.py +6 -0
- wandb/integration/metaflow/data_pandas.py +74 -0
- wandb/integration/metaflow/errors.py +13 -0
- wandb/integration/metaflow/metaflow.py +205 -190
- wandb/integration/openai/fine_tuning.py +1 -2
- wandb/integration/sb3/sb3.py +3 -3
- wandb/integration/ultralytics/callback.py +6 -2
- wandb/jupyter.py +5 -5
- wandb/plot/__init__.py +2 -0
- wandb/plot/bar.py +30 -29
- wandb/plot/confusion_matrix.py +75 -71
- wandb/plot/custom_chart.py +30 -7
- wandb/plot/histogram.py +26 -25
- wandb/plot/line.py +33 -32
- wandb/plot/line_series.py +100 -103
- wandb/plot/pr_curve.py +33 -32
- wandb/plot/roc_curve.py +38 -38
- wandb/plot/scatter.py +27 -27
- wandb/proto/v3/wandb_internal_pb2.py +366 -385
- wandb/proto/v3/wandb_settings_pb2.py +2 -2
- wandb/proto/v3/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v4/wandb_internal_pb2.py +352 -356
- wandb/proto/v4/wandb_settings_pb2.py +2 -2
- wandb/proto/v4/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v5/wandb_internal_pb2.py +352 -356
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v6/wandb_internal_pb2.py +352 -356
- wandb/proto/v6/wandb_settings_pb2.py +2 -2
- wandb/proto/v6/wandb_telemetry_pb2.py +4 -4
- wandb/proto/wandb_deprecated.py +6 -0
- wandb/sdk/artifacts/_generated/__init__.py +12 -1
- wandb/sdk/artifacts/_generated/input_types.py +20 -2
- wandb/sdk/artifacts/_generated/link_artifact.py +21 -0
- wandb/sdk/artifacts/_generated/operations.py +9 -0
- wandb/sdk/artifacts/_internal_artifact.py +19 -8
- wandb/sdk/artifacts/_validators.py +48 -2
- wandb/sdk/artifacts/artifact.py +269 -96
- wandb/sdk/data_types/audio.py +38 -10
- wandb/sdk/data_types/base_types/media.py +15 -63
- wandb/sdk/data_types/base_types/wb_value.py +6 -6
- wandb/sdk/data_types/graph.py +48 -14
- wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +1 -3
- wandb/sdk/data_types/helper_types/image_mask.py +1 -3
- wandb/sdk/data_types/histogram.py +34 -21
- wandb/sdk/data_types/html.py +35 -12
- wandb/sdk/data_types/image.py +104 -68
- wandb/sdk/data_types/molecule.py +32 -19
- wandb/sdk/data_types/object_3d.py +36 -17
- wandb/sdk/data_types/plotly.py +18 -5
- wandb/sdk/data_types/saved_model.py +7 -9
- wandb/sdk/data_types/table.py +99 -70
- wandb/sdk/data_types/trace_tree.py +12 -12
- wandb/sdk/data_types/video.py +53 -26
- wandb/sdk/integration_utils/auto_logging.py +2 -2
- wandb/sdk/interface/interface.py +8 -19
- wandb/sdk/interface/interface_shared.py +7 -16
- wandb/sdk/internal/datastore.py +18 -18
- wandb/sdk/internal/handler.py +3 -5
- wandb/sdk/internal/internal_api.py +60 -0
- wandb/sdk/internal/job_builder.py +6 -0
- wandb/sdk/internal/sender.py +23 -3
- wandb/sdk/internal/sender_config.py +9 -0
- wandb/sdk/launch/_project_spec.py +3 -3
- wandb/sdk/launch/agent/agent.py +11 -4
- wandb/sdk/launch/agent/job_status_tracker.py +3 -1
- wandb/sdk/launch/agent/run_queue_item_file_saver.py +2 -2
- wandb/sdk/launch/create_job.py +3 -1
- wandb/sdk/launch/inputs/internal.py +3 -4
- wandb/sdk/launch/inputs/schema.py +1 -0
- wandb/sdk/launch/runner/kubernetes_monitor.py +1 -0
- wandb/sdk/launch/runner/kubernetes_runner.py +328 -1
- wandb/sdk/launch/sweeps/scheduler.py +2 -3
- wandb/sdk/launch/utils.py +3 -3
- wandb/sdk/lib/asyncio_compat.py +3 -0
- wandb/sdk/lib/console_capture.py +66 -19
- wandb/sdk/lib/deprecate.py +1 -7
- wandb/sdk/lib/disabled.py +1 -1
- wandb/sdk/lib/hashutil.py +14 -1
- wandb/sdk/lib/module.py +7 -13
- wandb/sdk/lib/progress.py +0 -19
- wandb/sdk/lib/sock_client.py +0 -4
- wandb/sdk/wandb_init.py +67 -93
- wandb/sdk/wandb_login.py +18 -14
- wandb/sdk/wandb_metric.py +2 -0
- wandb/sdk/wandb_require.py +0 -1
- wandb/sdk/wandb_run.py +429 -527
- wandb/sdk/wandb_settings.py +364 -74
- wandb/sdk/wandb_setup.py +28 -28
- wandb/sdk/wandb_sweep.py +14 -13
- wandb/sdk/wandb_watch.py +4 -6
- wandb/sync/sync.py +10 -0
- wandb/util.py +57 -0
- wandb/wandb_run.py +1 -2
- {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/METADATA +1 -1
- {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/RECORD +137 -137
- wandb/sdk/wandb_metadata.py +0 -623
- wandb/vendor/pynvml/__init__.py +0 -0
- wandb/vendor/pynvml/pynvml.py +0 -4779
- {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/WHEEL +0 -0
- {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/entry_points.txt +0 -0
- {wandb-0.20.2rc20250616.dist-info → wandb-0.21.1.dist-info}/licenses/LICENSE +0 -0
wandb/plot/pr_curve.py
CHANGED
@@ -34,24 +34,24 @@ def pr_curve(
|
|
34
34
|
a model's performance.
|
35
35
|
|
36
36
|
Args:
|
37
|
-
y_true
|
38
|
-
y_probas
|
37
|
+
y_true: True binary labels. The shape should be (`num_samples`,).
|
38
|
+
y_probas: Predicted scores or probabilities for each class.
|
39
39
|
These can be probability estimates, confidence scores, or non-thresholded
|
40
40
|
decision values. The shape should be (`num_samples`, `num_classes`).
|
41
|
-
labels
|
41
|
+
labels: Optional list of class names to replace
|
42
42
|
numeric values in `y_true` for easier plot interpretation.
|
43
43
|
For example, `labels = ['dog', 'cat', 'owl']` will replace 0 with
|
44
44
|
'dog', 1 with 'cat', and 2 with 'owl' in the plot. If not provided,
|
45
45
|
numeric values from `y_true` will be used.
|
46
|
-
classes_to_plot
|
46
|
+
classes_to_plot: Optional list of unique class values from
|
47
47
|
y_true to be included in the plot. If not specified, all unique
|
48
48
|
classes in y_true will be plotted.
|
49
|
-
interp_size
|
49
|
+
interp_size: Number of points to interpolate recall values. The
|
50
50
|
recall values will be fixed to `interp_size` uniformly distributed
|
51
51
|
points in the range [0, 1], and the precision will be interpolated
|
52
52
|
accordingly.
|
53
|
-
title
|
54
|
-
split_table
|
53
|
+
title: Title of the plot. Defaults to "Precision-Recall Curve".
|
54
|
+
split_table: Whether the table should be split into a separate section
|
55
55
|
in the W&B UI. If `True`, the table will be displayed in a section named
|
56
56
|
"Custom Chart Tables". Default is `False`.
|
57
57
|
|
@@ -60,34 +60,35 @@ def pr_curve(
|
|
60
60
|
chart, pass it to `wandb.log()`.
|
61
61
|
|
62
62
|
Raises:
|
63
|
-
wandb.Error: If
|
63
|
+
wandb.Error: If NumPy, pandas, or scikit-learn is not installed.
|
64
64
|
|
65
65
|
|
66
66
|
Example:
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
]
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
67
|
+
|
68
|
+
```python
|
69
|
+
import wandb
|
70
|
+
|
71
|
+
# Example for spam detection (binary classification)
|
72
|
+
y_true = [0, 1, 1, 0, 1] # 0 = not spam, 1 = spam
|
73
|
+
y_probas = [
|
74
|
+
[0.9, 0.1], # Predicted probabilities for the first sample (not spam)
|
75
|
+
[0.2, 0.8], # Second sample (spam), and so on
|
76
|
+
[0.1, 0.9],
|
77
|
+
[0.8, 0.2],
|
78
|
+
[0.3, 0.7],
|
79
|
+
]
|
80
|
+
|
81
|
+
labels = ["not spam", "spam"] # Optional class names for readability
|
82
|
+
|
83
|
+
with wandb.init(project="spam-detection") as run:
|
84
|
+
pr_curve = wandb.plot.pr_curve(
|
85
|
+
y_true=y_true,
|
86
|
+
y_probas=y_probas,
|
87
|
+
labels=labels,
|
88
|
+
title="Precision-Recall Curve for Spam Detection",
|
89
|
+
)
|
90
|
+
run.log({"pr-curve": pr_curve})
|
91
|
+
```
|
91
92
|
"""
|
92
93
|
np = util.get_module(
|
93
94
|
"numpy",
|
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
|
26
|
+
y_true: The true class labels (ground truth)
|
27
27
|
for the target variable. Shape should be (num_samples,).
|
28
|
-
y_probas
|
28
|
+
y_probas: The predicted probabilities or
|
29
29
|
decision scores for each class. Shape should be (num_samples, num_classes).
|
30
|
-
labels
|
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
|
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
|
39
|
-
split_table
|
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
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
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
|
23
|
-
x
|
24
|
-
y
|
25
|
-
title
|
26
|
-
split_table
|
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
|
-
|
36
|
-
|
37
|
-
|
34
|
+
```python
|
35
|
+
import math
|
36
|
+
import random
|
37
|
+
import wandb
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
-
|
46
|
-
|
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
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
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,
|