wandb 0.19.0__py3-none-macosx_11_0_arm64.whl → 0.19.1__py3-none-macosx_11_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- wandb/__init__.py +1 -7
- wandb/__init__.pyi +211 -209
- wandb/apis/attrs.py +15 -4
- wandb/apis/public/api.py +8 -4
- wandb/apis/public/files.py +65 -12
- wandb/apis/public/runs.py +52 -7
- wandb/apis/public/sweeps.py +1 -1
- wandb/bin/gpu_stats +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +2 -1
- wandb/env.py +1 -1
- wandb/errors/term.py +60 -1
- wandb/integration/keras/callbacks/tables_builder.py +3 -1
- wandb/integration/kfp/kfp_patch.py +25 -15
- wandb/integration/lightning/fabric/logger.py +3 -1
- wandb/integration/tensorboard/monkeypatch.py +3 -2
- wandb/jupyter.py +4 -5
- wandb/plot/bar.py +5 -6
- wandb/plot/histogram.py +1 -1
- wandb/plot/line_series.py +3 -3
- wandb/plot/pr_curve.py +7 -3
- wandb/plot/scatter.py +2 -1
- wandb/proto/v3/wandb_settings_pb2.py +25 -15
- wandb/proto/v4/wandb_settings_pb2.py +17 -15
- wandb/proto/v5/wandb_settings_pb2.py +17 -15
- wandb/sdk/artifacts/_validators.py +1 -3
- wandb/sdk/artifacts/artifact_manifest_entry.py +1 -1
- wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +12 -2
- wandb/sdk/data_types/helper_types/image_mask.py +8 -2
- wandb/sdk/data_types/histogram.py +3 -3
- wandb/sdk/data_types/image.py +3 -1
- wandb/sdk/interface/interface.py +34 -5
- wandb/sdk/interface/interface_sock.py +2 -2
- wandb/sdk/internal/file_stream.py +4 -1
- wandb/sdk/internal/sender.py +4 -1
- wandb/sdk/internal/settings_static.py +17 -4
- wandb/sdk/launch/utils.py +1 -0
- wandb/sdk/lib/ipython.py +5 -27
- wandb/sdk/lib/printer.py +33 -20
- wandb/sdk/lib/progress.py +7 -1
- wandb/sdk/lib/sparkline.py +1 -2
- wandb/sdk/wandb_config.py +2 -2
- wandb/sdk/wandb_init.py +236 -243
- wandb/sdk/wandb_run.py +172 -231
- wandb/sdk/wandb_settings.py +104 -15
- {wandb-0.19.0.dist-info → wandb-0.19.1.dist-info}/METADATA +1 -1
- {wandb-0.19.0.dist-info → wandb-0.19.1.dist-info}/RECORD +50 -50
- {wandb-0.19.0.dist-info → wandb-0.19.1.dist-info}/WHEEL +0 -0
- {wandb-0.19.0.dist-info → wandb-0.19.1.dist-info}/entry_points.txt +0 -0
- {wandb-0.19.0.dist-info → wandb-0.19.1.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/lib/ipython.py
CHANGED
@@ -71,36 +71,14 @@ def in_notebook() -> bool:
|
|
71
71
|
return _get_python_type() != "python"
|
72
72
|
|
73
73
|
|
74
|
-
def display_html(html: str): # type: ignore
|
75
|
-
"""Display HTML in notebooks, is a noop outside a jupyter context."""
|
76
|
-
if wandb.run and wandb.run._settings.silent:
|
77
|
-
return
|
78
|
-
try:
|
79
|
-
from IPython.core.display import HTML, display # type: ignore
|
80
|
-
except ImportError:
|
81
|
-
wandb.termwarn("Unable to render HTML, can't import display from ipython.core")
|
82
|
-
return False
|
83
|
-
return display(HTML(html))
|
84
|
-
|
85
|
-
|
86
|
-
def display_widget(widget):
|
87
|
-
"""Display ipywidgets in notebooks, is a noop outside of a jupyter context."""
|
88
|
-
if wandb.run and wandb.run._settings.silent:
|
89
|
-
return
|
90
|
-
try:
|
91
|
-
from IPython.core.display import display
|
92
|
-
except ImportError:
|
93
|
-
wandb.termwarn(
|
94
|
-
"Unable to render Widget, can't import display from ipython.core"
|
95
|
-
)
|
96
|
-
return False
|
97
|
-
return display(widget)
|
98
|
-
|
99
|
-
|
100
74
|
class ProgressWidget:
|
101
75
|
"""A simple wrapper to render a nice progress bar with a label."""
|
102
76
|
|
103
77
|
def __init__(self, widgets, min, max):
|
78
|
+
from IPython import display
|
79
|
+
|
80
|
+
self._ipython_display = display
|
81
|
+
|
104
82
|
self.widgets = widgets
|
105
83
|
self._progress = widgets.FloatProgress(min=min, max=max)
|
106
84
|
self._label = widgets.Label()
|
@@ -116,7 +94,7 @@ class ProgressWidget:
|
|
116
94
|
self._label.value = label
|
117
95
|
if not self._displayed:
|
118
96
|
self._displayed = True
|
119
|
-
|
97
|
+
self._ipython_display.display(self._widget)
|
120
98
|
except Exception as e:
|
121
99
|
self._disabled = True
|
122
100
|
logger.exception(e)
|
wandb/sdk/lib/printer.py
CHANGED
@@ -426,11 +426,24 @@ class _PrinterJupyter(Printer):
|
|
426
426
|
super().__init__()
|
427
427
|
self._progress = ipython.jupyter_progress_bar()
|
428
428
|
|
429
|
+
from IPython import display
|
430
|
+
|
431
|
+
self._ipython_display = display
|
432
|
+
|
429
433
|
@override
|
430
434
|
@contextlib.contextmanager
|
431
435
|
def dynamic_text(self) -> Iterator[DynamicText | None]:
|
432
|
-
|
433
|
-
|
436
|
+
handle = self._ipython_display.display(
|
437
|
+
self._ipython_display.HTML(""),
|
438
|
+
display_id=True,
|
439
|
+
)
|
440
|
+
|
441
|
+
if handle:
|
442
|
+
yield _DynamicJupyterText(handle)
|
443
|
+
else:
|
444
|
+
yield None
|
445
|
+
|
446
|
+
handle.update(self._ipython_display.HTML(""))
|
434
447
|
|
435
448
|
@override
|
436
449
|
def display(
|
@@ -439,25 +452,12 @@ class _PrinterJupyter(Printer):
|
|
439
452
|
*,
|
440
453
|
level: str | int | None = None,
|
441
454
|
) -> None:
|
442
|
-
|
443
|
-
|
455
|
+
if wandb.run and wandb.run._settings.silent:
|
456
|
+
return
|
444
457
|
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
if level >= CRITICAL:
|
450
|
-
return ipython.display_html
|
451
|
-
elif ERROR <= level < CRITICAL:
|
452
|
-
return ipython.display_html
|
453
|
-
elif WARNING <= level < ERROR:
|
454
|
-
return ipython.display_html
|
455
|
-
elif INFO <= level < WARNING:
|
456
|
-
return ipython.display_html
|
457
|
-
elif DEBUG <= level < INFO:
|
458
|
-
return ipython.display_html
|
459
|
-
else:
|
460
|
-
return ipython.display_html
|
458
|
+
text = "<br>".join(text) if isinstance(text, (list, tuple)) else text
|
459
|
+
text = "<br>".join(text.splitlines())
|
460
|
+
self._ipython_display.display(self._ipython_display.HTML(text))
|
461
461
|
|
462
462
|
@override
|
463
463
|
@property
|
@@ -533,3 +533,16 @@ class _PrinterJupyter(Printer):
|
|
533
533
|
def panel(self, columns: list[str]) -> str:
|
534
534
|
row = "".join([f'<div class="wandb-col">{col}</div>' for col in columns])
|
535
535
|
return f'{_JUPYTER_PANEL_STYLES}<div class="wandb-row">{row}</div>'
|
536
|
+
|
537
|
+
|
538
|
+
class _DynamicJupyterText(DynamicText):
|
539
|
+
def __init__(self, handle) -> None:
|
540
|
+
from IPython import display
|
541
|
+
|
542
|
+
self._ipython_to_html = display.HTML
|
543
|
+
self._handle: display.DisplayHandle = handle
|
544
|
+
|
545
|
+
@override
|
546
|
+
def set_text(self, text: str) -> None:
|
547
|
+
text = "<br>".join(text.splitlines())
|
548
|
+
self._handle.update(self._ipython_to_html(text))
|
wandb/sdk/lib/progress.py
CHANGED
@@ -6,6 +6,7 @@ import contextlib
|
|
6
6
|
from typing import Iterable, Iterator
|
7
7
|
|
8
8
|
import wandb
|
9
|
+
from wandb import env
|
9
10
|
from wandb.proto import wandb_internal_pb2 as pb
|
10
11
|
|
11
12
|
from . import printer as p
|
@@ -50,7 +51,12 @@ class ProgressPrinter:
|
|
50
51
|
progress_text_area: p.DynamicText | None,
|
51
52
|
settings: wandb.Settings | None,
|
52
53
|
) -> None:
|
53
|
-
self._show_operation_stats =
|
54
|
+
self._show_operation_stats = (
|
55
|
+
settings
|
56
|
+
and settings.x_show_operation_stats
|
57
|
+
# Not implemented by the legacy service.
|
58
|
+
and not env.is_require_legacy_service()
|
59
|
+
)
|
54
60
|
self._printer = printer
|
55
61
|
self._progress_text_area = progress_text_area
|
56
62
|
self._tick = 0
|
wandb/sdk/lib/sparkline.py
CHANGED
@@ -16,8 +16,7 @@ def sparkify(series: List[Union[float, int]]) -> str:
|
|
16
16
|
"""Convert <series> to a sparkline string.
|
17
17
|
|
18
18
|
Example:
|
19
|
-
>>> sparkify([
|
20
|
-
... 1.9 ])
|
19
|
+
>>> sparkify([0.5, 1.2, 3.5, 7.3, 8.0, 12.5, 13.2, 15.0, 14.2, 11.8, 6.1, 1.9])
|
21
20
|
u'▁▁▂▄▅▇▇██▆▄▂'
|
22
21
|
|
23
22
|
>>> sparkify([1, 1, -2, 3, -5, 8, -13])
|
wandb/sdk/wandb_config.py
CHANGED
@@ -61,8 +61,8 @@ class Config:
|
|
61
61
|
|
62
62
|
Using absl flags
|
63
63
|
```
|
64
|
-
flags.DEFINE_string("model", None, "model to run")
|
65
|
-
wandb.config.update(flags.FLAGS)
|
64
|
+
flags.DEFINE_string("model", None, "model to run") # name, default, help
|
65
|
+
wandb.config.update(flags.FLAGS) # adds all absl flags to config
|
66
66
|
```
|
67
67
|
|
68
68
|
Argparse flags
|