wandb 0.18.6__py3-none-win32.whl → 0.19.0__py3-none-win32.whl
Sign up to get free protection for your applications and to get access to all the features.
- package_readme.md +8 -0
- wandb/__init__.py +5 -7
- wandb/__init__.pyi +51 -30
- wandb/analytics/sentry.py +4 -10
- wandb/apis/importers/internals/internal.py +6 -6
- wandb/apis/importers/internals/protocols.py +11 -7
- wandb/apis/public/api.py +5 -1
- wandb/apis/public/jobs.py +1 -7
- wandb/apis/public/reports.py +6 -17
- wandb/apis/public/runs.py +12 -10
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +9 -45
- wandb/env.py +3 -5
- wandb/errors/links.py +1 -1
- wandb/errors/term.py +1 -6
- wandb/filesync/dir_watcher.py +3 -3
- wandb/filesync/step_upload.py +2 -5
- wandb/integration/fastai/__init__.py +1 -6
- wandb/integration/gym/__init__.py +1 -7
- wandb/integration/keras/callbacks/metrics_logger.py +1 -8
- wandb/integration/keras/callbacks/model_checkpoint.py +1 -8
- wandb/integration/keras/keras.py +3 -5
- wandb/integration/lightgbm/__init__.py +1 -1
- wandb/integration/sb3/sb3.py +1 -7
- wandb/integration/sklearn/utils.py +1 -1
- wandb/integration/tensorboard/log.py +1 -2
- wandb/integration/torch/wandb_torch.py +1 -1
- wandb/integration/ultralytics/bbox_utils.py +9 -2
- wandb/jupyter.py +4 -4
- wandb/proto/v3/wandb_internal_pb2.py +31 -31
- 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 +31 -31
- 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 +31 -31
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
- wandb/proto/wandb_deprecated.py +3 -11
- wandb/proto/wandb_generate_deprecated.py +3 -7
- wandb/sdk/artifacts/artifact.py +3 -11
- wandb/sdk/artifacts/artifact_file_cache.py +2 -5
- wandb/sdk/artifacts/artifact_saver.py +2 -6
- wandb/sdk/artifacts/storage_handlers/gcs_handler.py +2 -4
- wandb/sdk/artifacts/storage_handlers/local_file_handler.py +2 -4
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +2 -4
- wandb/sdk/backend/backend.py +1 -1
- wandb/sdk/data_types/base_types/wb_value.py +20 -10
- wandb/sdk/data_types/histogram.py +1 -3
- wandb/sdk/data_types/object_3d.py +2 -6
- wandb/sdk/data_types/table.py +1 -1
- wandb/sdk/data_types/utils.py +1 -2
- wandb/sdk/data_types/video.py +15 -4
- wandb/sdk/integration_utils/auto_logging.py +1 -8
- wandb/sdk/interface/interface.py +12 -5
- wandb/sdk/interface/interface_queue.py +0 -6
- wandb/sdk/interface/interface_shared.py +9 -0
- wandb/sdk/interface/router.py +1 -2
- wandb/sdk/interface/router_queue.py +0 -3
- wandb/sdk/interface/router_relay.py +0 -2
- wandb/sdk/internal/file_stream.py +1 -4
- wandb/sdk/internal/flow_control.py +1 -1
- wandb/sdk/internal/handler.py +8 -5
- wandb/sdk/internal/internal.py +3 -17
- wandb/sdk/internal/internal_api.py +3 -10
- wandb/sdk/internal/internal_util.py +0 -3
- wandb/sdk/internal/job_builder.py +20 -12
- wandb/sdk/internal/progress.py +1 -5
- wandb/sdk/internal/sender.py +9 -15
- wandb/sdk/internal/settings_static.py +4 -10
- wandb/sdk/internal/system/assets/cpu.py +2 -2
- wandb/sdk/internal/system/assets/disk.py +3 -3
- wandb/sdk/internal/system/assets/gpu.py +7 -7
- wandb/sdk/internal/system/assets/gpu_amd.py +1 -7
- wandb/sdk/internal/system/assets/interfaces.py +11 -13
- wandb/sdk/internal/system/assets/ipu.py +1 -1
- wandb/sdk/internal/system/assets/memory.py +2 -2
- wandb/sdk/internal/system/assets/open_metrics.py +2 -8
- wandb/sdk/internal/system/assets/trainium.py +3 -9
- wandb/sdk/internal/system/system_info.py +14 -13
- wandb/sdk/internal/system/system_monitor.py +5 -12
- wandb/sdk/internal/tb_watcher.py +1 -1
- wandb/sdk/internal/writer.py +2 -4
- wandb/sdk/launch/__init__.py +2 -1
- wandb/sdk/launch/agent/run_queue_item_file_saver.py +1 -7
- wandb/sdk/launch/create_job.py +2 -3
- wandb/sdk/launch/runner/abstract.py +1 -6
- wandb/sdk/launch/runner/kubernetes_monitor.py +2 -4
- wandb/sdk/lib/apikey.py +2 -6
- wandb/sdk/lib/fsm.py +12 -6
- wandb/sdk/lib/ipython.py +1 -6
- wandb/sdk/lib/module.py +0 -3
- wandb/sdk/lib/progress.py +2 -3
- wandb/sdk/lib/run_moment.py +1 -7
- wandb/sdk/lib/server.py +10 -24
- wandb/sdk/lib/sock_client.py +0 -5
- wandb/sdk/service/server.py +3 -12
- wandb/sdk/service/server_sock.py +0 -2
- wandb/sdk/service/service.py +5 -5
- wandb/sdk/wandb_init.py +215 -166
- wandb/sdk/wandb_login.py +17 -27
- wandb/sdk/wandb_run.py +129 -161
- wandb/sdk/wandb_settings.py +978 -1760
- wandb/sdk/wandb_setup.py +87 -94
- wandb/sdk/wandb_watch.py +1 -1
- wandb/sync/sync.py +1 -2
- wandb/util.py +7 -40
- wandb/wandb_controller.py +10 -12
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/METADATA +14 -4
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/RECORD +114 -120
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/WHEEL +1 -1
- wandb/integration/magic.py +0 -556
- wandb/magic.py +0 -3
- wandb/sdk/lib/_settings_toposort_generate.py +0 -159
- wandb/sdk/lib/_settings_toposort_generated.py +0 -250
- wandb/sdk/lib/reporting.py +0 -99
- wandb/sdk/lib/tracelog.py +0 -255
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/entry_points.txt +0 -0
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/lib/progress.py
CHANGED
@@ -50,7 +50,7 @@ class ProgressPrinter:
|
|
50
50
|
progress_text_area: p.DynamicText | None,
|
51
51
|
settings: wandb.Settings | None,
|
52
52
|
) -> None:
|
53
|
-
self._show_operation_stats = settings and settings.
|
53
|
+
self._show_operation_stats = settings and settings.x_show_operation_stats
|
54
54
|
self._printer = printer
|
55
55
|
self._progress_text_area = progress_text_area
|
56
56
|
self._tick = 0
|
@@ -189,8 +189,7 @@ class _DynamicOperationStatsPrinter:
|
|
189
189
|
total_operations += stats.total_operations
|
190
190
|
|
191
191
|
if self._ops_shown < total_operations:
|
192
|
-
|
193
|
-
if 1 <= self._max_lines and self._max_lines <= len(self._lines):
|
192
|
+
if 1 <= self._max_lines <= len(self._lines):
|
194
193
|
self._lines.pop()
|
195
194
|
|
196
195
|
remaining = total_operations - self._ops_shown
|
wandb/sdk/lib/run_moment.py
CHANGED
@@ -1,13 +1,7 @@
|
|
1
|
-
import sys
|
2
1
|
from dataclasses import dataclass
|
3
|
-
from typing import Union, cast
|
2
|
+
from typing import Literal, Union, cast
|
4
3
|
from urllib import parse
|
5
4
|
|
6
|
-
if sys.version_info >= (3, 8):
|
7
|
-
from typing import Literal
|
8
|
-
else:
|
9
|
-
from typing_extensions import Literal
|
10
|
-
|
11
5
|
_STEP = Literal["_step"]
|
12
6
|
|
13
7
|
|
wandb/sdk/lib/server.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
"""module server."""
|
2
2
|
|
3
|
+
from __future__ import annotations
|
4
|
+
|
3
5
|
import json
|
4
|
-
from typing import TYPE_CHECKING, Any
|
6
|
+
from typing import TYPE_CHECKING, Any
|
5
7
|
|
6
8
|
from wandb import util
|
7
9
|
from wandb.apis import InternalApi
|
@@ -10,43 +12,27 @@ if TYPE_CHECKING:
|
|
10
12
|
from wandb.sdk.wandb_settings import Settings
|
11
13
|
|
12
14
|
|
13
|
-
class ServerError(Exception):
|
14
|
-
pass
|
15
|
-
|
16
|
-
|
17
15
|
class Server:
|
18
16
|
def __init__(
|
19
17
|
self,
|
20
|
-
|
21
|
-
settings: Optional["Settings"] = None,
|
18
|
+
settings: Settings,
|
22
19
|
) -> None:
|
23
|
-
self._api =
|
24
|
-
self.
|
25
|
-
self.
|
26
|
-
self.
|
27
|
-
self._settings = settings
|
20
|
+
self._api = InternalApi(default_settings=settings)
|
21
|
+
self._viewer: dict[str, Any] = {}
|
22
|
+
self._flags: dict[str, Any] = {}
|
23
|
+
self._settings: Settings = settings
|
28
24
|
|
29
|
-
def query_with_timeout(self, timeout:
|
30
|
-
if self._settings
|
25
|
+
def query_with_timeout(self, timeout: int | float = 5) -> None:
|
26
|
+
if self._settings.x_disable_viewer:
|
31
27
|
return
|
32
|
-
timeout = timeout or 5
|
33
28
|
async_viewer = util.async_call(self._api.viewer_server_info, timeout=timeout)
|
34
29
|
try:
|
35
30
|
viewer_tuple, viewer_thread = async_viewer()
|
36
31
|
except Exception:
|
37
|
-
# TODO: currently a bare exception as lots can happen, we should classify
|
38
|
-
self._error_network = True
|
39
32
|
return
|
40
33
|
if viewer_thread.is_alive():
|
41
34
|
# this is likely a DNS hang
|
42
|
-
self._error_network = True
|
43
35
|
return
|
44
|
-
self._error_network = False
|
45
36
|
# TODO(jhr): should we kill the thread?
|
46
37
|
self._viewer, self._serverinfo = viewer_tuple
|
47
38
|
self._flags = json.loads(self._viewer.get("flags", "{}"))
|
48
|
-
|
49
|
-
def is_valid(self) -> bool:
|
50
|
-
if self._error_network is None:
|
51
|
-
raise Exception("invalid usage: must query server")
|
52
|
-
return self._error_network
|
wandb/sdk/lib/sock_client.py
CHANGED
@@ -7,8 +7,6 @@ from typing import TYPE_CHECKING, Any, List, Optional
|
|
7
7
|
|
8
8
|
from wandb.proto import wandb_server_pb2 as spb
|
9
9
|
|
10
|
-
from . import tracelog
|
11
|
-
|
12
10
|
if TYPE_CHECKING:
|
13
11
|
from wandb.proto import wandb_internal_pb2 as pb
|
14
12
|
|
@@ -145,7 +143,6 @@ class SockClient:
|
|
145
143
|
time.sleep(self._retry_delay - delta_time)
|
146
144
|
|
147
145
|
def _send_message(self, msg: Any) -> None:
|
148
|
-
tracelog.log_message_send(msg, self._sockid)
|
149
146
|
raw_size = msg.ByteSize()
|
150
147
|
data = msg.SerializeToString()
|
151
148
|
assert len(data) == raw_size, "invalid serialization"
|
@@ -280,7 +277,6 @@ class SockClient:
|
|
280
277
|
return None
|
281
278
|
rec = spb.ServerRequest()
|
282
279
|
rec.ParseFromString(data)
|
283
|
-
tracelog.log_message_recv(rec, self._sockid)
|
284
280
|
return rec
|
285
281
|
|
286
282
|
def read_server_response(
|
@@ -291,5 +287,4 @@ class SockClient:
|
|
291
287
|
return None
|
292
288
|
rec = spb.ServerResponse()
|
293
289
|
rec.ParseFromString(data)
|
294
|
-
tracelog.log_message_recv(rec, self._sockid)
|
295
290
|
return rec
|
wandb/sdk/service/server.py
CHANGED
@@ -10,7 +10,6 @@ from typing import Optional
|
|
10
10
|
|
11
11
|
import wandb
|
12
12
|
|
13
|
-
from ..lib import tracelog
|
14
13
|
from . import _startup_debug, port_file
|
15
14
|
from .server_sock import SocketServer
|
16
15
|
from .streams import StreamMux
|
@@ -69,22 +68,15 @@ class WandbServer:
|
|
69
68
|
if self._sock_server:
|
70
69
|
self._sock_server.stop()
|
71
70
|
|
72
|
-
def _setup_tracelog(self) -> None:
|
73
|
-
# TODO: remove this temporary hack, need to find a better way to pass settings
|
74
|
-
# to the server. for now lets just look at the environment variable we need
|
75
|
-
tracelog_mode = os.environ.get("WANDB_TRACELOG")
|
76
|
-
if tracelog_mode:
|
77
|
-
tracelog.enable(tracelog_mode)
|
78
|
-
|
79
71
|
def _startup_debug_print(self, message: str) -> None:
|
80
72
|
if not self._startup_debug_enabled:
|
81
73
|
return
|
82
74
|
_startup_debug.print_message(message)
|
83
75
|
|
84
76
|
def _setup_proctitle(self, sock_port: Optional[int]) -> None:
|
85
|
-
# TODO:
|
86
|
-
#
|
87
|
-
disable_setproctitle = os.environ.get("
|
77
|
+
# TODO: the internal_process should have a better way to have access to
|
78
|
+
# settings.
|
79
|
+
disable_setproctitle = os.environ.get("WANDB_X_DISABLE_SETPROCTITLE")
|
88
80
|
if disable_setproctitle:
|
89
81
|
return
|
90
82
|
|
@@ -103,7 +95,6 @@ class WandbServer:
|
|
103
95
|
self._startup_debug_print("after_setproctitle")
|
104
96
|
|
105
97
|
def serve(self) -> None:
|
106
|
-
self._setup_tracelog()
|
107
98
|
mux = StreamMux()
|
108
99
|
self._startup_debug_print("before_network")
|
109
100
|
sock_port = self._start_sock(mux=mux)
|
wandb/sdk/service/server_sock.py
CHANGED
@@ -7,7 +7,6 @@ from typing import TYPE_CHECKING, Any, Callable, Dict, Optional
|
|
7
7
|
from wandb.proto import wandb_server_pb2 as spb
|
8
8
|
from wandb.sdk.internal.settings_static import SettingsStatic
|
9
9
|
|
10
|
-
from ..lib import tracelog
|
11
10
|
from ..lib.sock_client import SockClient, SockClientClosedError
|
12
11
|
from .streams import StreamMux
|
13
12
|
|
@@ -65,7 +64,6 @@ class SockServerInterfaceReaderThread(threading.Thread):
|
|
65
64
|
except ValueError:
|
66
65
|
# queue is closed
|
67
66
|
break
|
68
|
-
tracelog.log_message_dequeue(result, self._iface.relay_q)
|
69
67
|
sockid = result.control.relay_id
|
70
68
|
assert sockid
|
71
69
|
sock_client = self._clients.get_client(sockid)
|
wandb/sdk/service/service.py
CHANGED
@@ -76,7 +76,7 @@ class _Service:
|
|
76
76
|
ServiceStartProcessError: If the service process exits unexpectedly.
|
77
77
|
|
78
78
|
"""
|
79
|
-
time_max = time.monotonic() + self._settings.
|
79
|
+
time_max = time.monotonic() + self._settings.x_service_wait
|
80
80
|
while time.monotonic() < time_max:
|
81
81
|
if proc and proc.poll():
|
82
82
|
# process finished
|
@@ -97,7 +97,7 @@ class _Service:
|
|
97
97
|
f"The wandb service process exited with {proc.returncode}. "
|
98
98
|
"Ensure that `sys.executable` is a valid python interpreter. "
|
99
99
|
"You can override it with the `_executable` setting "
|
100
|
-
"or with the `
|
100
|
+
"or with the `WANDB_X_EXECUTABLE` environment variable."
|
101
101
|
f"\n{context}",
|
102
102
|
context=context,
|
103
103
|
)
|
@@ -120,7 +120,7 @@ class _Service:
|
|
120
120
|
return
|
121
121
|
raise ServiceStartTimeoutError(
|
122
122
|
"Timed out waiting for wandb service to start after "
|
123
|
-
f"{self._settings.
|
123
|
+
f"{self._settings.x_service_wait} seconds. "
|
124
124
|
"Try increasing the timeout with the `_service_wait` setting."
|
125
125
|
)
|
126
126
|
|
@@ -143,7 +143,7 @@ class _Service:
|
|
143
143
|
with tempfile.TemporaryDirectory() as tmpdir:
|
144
144
|
fname = os.path.join(tmpdir, f"port-{pid}.txt")
|
145
145
|
|
146
|
-
executable = self._settings.
|
146
|
+
executable = self._settings.x_executable
|
147
147
|
exec_cmd_list = [executable, "-m"]
|
148
148
|
|
149
149
|
service_args = []
|
@@ -212,7 +212,7 @@ class _Service:
|
|
212
212
|
|
213
213
|
try:
|
214
214
|
internal_proc = subprocess.Popen(
|
215
|
-
exec_cmd_list + service_args,
|
215
|
+
exec_cmd_list + service_args, # type: ignore[arg-type]
|
216
216
|
env=os.environ,
|
217
217
|
**kwargs,
|
218
218
|
)
|