wandb 0.18.6__py3-none-any.whl → 0.18.7__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.
- wandb/__init__.py +1 -1
- wandb/__init__.pyi +2 -2
- wandb/apis/public/api.py +5 -1
- wandb/proto/v3/wandb_settings_pb2.py +2 -2
- wandb/proto/v3/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v4/wandb_settings_pb2.py +2 -2
- wandb/proto/v4/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
- wandb/proto/wandb_deprecated.py +2 -0
- wandb/sdk/artifacts/artifact.py +1 -1
- wandb/sdk/data_types/base_types/wb_value.py +20 -10
- wandb/sdk/interface/interface_queue.py +0 -6
- 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/handler.py +1 -3
- wandb/sdk/internal/internal.py +0 -14
- wandb/sdk/internal/internal_util.py +0 -3
- wandb/sdk/internal/sender.py +0 -2
- wandb/sdk/internal/writer.py +1 -3
- wandb/sdk/launch/__init__.py +2 -1
- wandb/sdk/lib/_settings_toposort_generated.py +1 -0
- wandb/sdk/lib/sock_client.py +0 -5
- wandb/sdk/service/server.py +2 -11
- wandb/sdk/service/server_sock.py +0 -2
- wandb/sdk/wandb_run.py +44 -50
- wandb/sdk/wandb_settings.py +20 -2
- wandb/sdk/wandb_setup.py +1 -5
- wandb/util.py +3 -3
- {wandb-0.18.6.dist-info → wandb-0.18.7.dist-info}/METADATA +1 -2
- {wandb-0.18.6.dist-info → wandb-0.18.7.dist-info}/RECORD +35 -36
- {wandb-0.18.6.dist-info → wandb-0.18.7.dist-info}/WHEEL +1 -1
- wandb/sdk/lib/tracelog.py +0 -255
- {wandb-0.18.6.dist-info → wandb-0.18.7.dist-info}/entry_points.txt +0 -0
- {wandb-0.18.6.dist-info → wandb-0.18.7.dist-info}/licenses/LICENSE +0 -0
@@ -7,7 +7,6 @@ Router to manage responses from a queue.
|
|
7
7
|
import queue
|
8
8
|
from typing import TYPE_CHECKING, Optional
|
9
9
|
|
10
|
-
from ..lib import tracelog
|
11
10
|
from ..lib.mailbox import Mailbox
|
12
11
|
from .router import MessageRouter
|
13
12
|
|
@@ -36,9 +35,7 @@ class MessageQueueRouter(MessageRouter):
|
|
36
35
|
msg = self._response_queue.get(timeout=1)
|
37
36
|
except queue.Empty:
|
38
37
|
return None
|
39
|
-
tracelog.log_message_dequeue(msg, self._response_queue)
|
40
38
|
return msg
|
41
39
|
|
42
40
|
def _send_message(self, record: "pb.Record") -> None:
|
43
|
-
tracelog.log_message_queue(record, self._request_queue)
|
44
41
|
self._request_queue.put(record)
|
@@ -6,7 +6,6 @@ Router to manage responses from a queue with relay.
|
|
6
6
|
|
7
7
|
from typing import TYPE_CHECKING
|
8
8
|
|
9
|
-
from ..lib import tracelog
|
10
9
|
from ..lib.mailbox import Mailbox
|
11
10
|
from .router_queue import MessageQueueRouter
|
12
11
|
|
@@ -33,7 +32,6 @@ class MessageRelayRouter(MessageQueueRouter):
|
|
33
32
|
|
34
33
|
def _handle_msg_rcv(self, msg: "pb.Result") -> None:
|
35
34
|
if msg.control.relay_id:
|
36
|
-
tracelog.log_message_queue(msg, self._relay_queue)
|
37
35
|
self._relay_queue.put(msg)
|
38
36
|
return
|
39
37
|
super()._handle_msg_rcv(msg)
|
wandb/sdk/internal/handler.py
CHANGED
@@ -38,7 +38,7 @@ from wandb.proto.wandb_internal_pb2 import (
|
|
38
38
|
)
|
39
39
|
|
40
40
|
from ..interface.interface_queue import InterfaceQueue
|
41
|
-
from ..lib import handler_util, proto_util
|
41
|
+
from ..lib import handler_util, proto_util
|
42
42
|
from . import context, sample, tb_watcher
|
43
43
|
from .settings_static import SettingsStatic
|
44
44
|
from .system.system_monitor import SystemMonitor
|
@@ -163,11 +163,9 @@ class HandleManager:
|
|
163
163
|
def _dispatch_record(self, record: Record, always_send: bool = False) -> None:
|
164
164
|
if always_send:
|
165
165
|
record.control.always_send = True
|
166
|
-
tracelog.log_message_queue(record, self._writer_q)
|
167
166
|
self._writer_q.put(record)
|
168
167
|
|
169
168
|
def _respond_result(self, result: Result) -> None:
|
170
|
-
tracelog.log_message_queue(result, self._result_q)
|
171
169
|
context_id = context.context_id_from_result(result)
|
172
170
|
self._context_keeper.release(context_id)
|
173
171
|
self._result_q.put(result)
|
wandb/sdk/internal/internal.py
CHANGED
@@ -28,7 +28,6 @@ import psutil
|
|
28
28
|
import wandb
|
29
29
|
|
30
30
|
from ..interface.interface_queue import InterfaceQueue
|
31
|
-
from ..lib import tracelog
|
32
31
|
from . import context, handler, internal_util, sender, writer
|
33
32
|
|
34
33
|
if TYPE_CHECKING:
|
@@ -63,7 +62,6 @@ def wandb_internal(
|
|
63
62
|
"""
|
64
63
|
# mark this process as internal
|
65
64
|
wandb._set_internal_process() # type: ignore
|
66
|
-
_setup_tracelog()
|
67
65
|
started = time.time()
|
68
66
|
|
69
67
|
# any sentry events in the internal process will be tagged as such
|
@@ -88,8 +86,6 @@ def wandb_internal(
|
|
88
86
|
datetime.fromtimestamp(started),
|
89
87
|
)
|
90
88
|
|
91
|
-
tracelog.annotate_queue(record_q, "record_q")
|
92
|
-
tracelog.annotate_queue(result_q, "result_q")
|
93
89
|
publish_interface = InterfaceQueue(record_q=record_q)
|
94
90
|
|
95
91
|
stopped = threading.Event()
|
@@ -98,10 +94,8 @@ def wandb_internal(
|
|
98
94
|
context_keeper = context.ContextKeeper()
|
99
95
|
|
100
96
|
send_record_q: Queue[Record] = queue.Queue()
|
101
|
-
tracelog.annotate_queue(send_record_q, "send_q")
|
102
97
|
|
103
98
|
write_record_q: Queue[Record] = queue.Queue()
|
104
|
-
tracelog.annotate_queue(write_record_q, "write_q")
|
105
99
|
|
106
100
|
record_sender_thread = SenderThread(
|
107
101
|
settings=_settings,
|
@@ -184,14 +178,6 @@ def wandb_internal(
|
|
184
178
|
close_internal_log()
|
185
179
|
|
186
180
|
|
187
|
-
def _setup_tracelog() -> None:
|
188
|
-
# TODO: remove this temporary hack, need to find a better way to pass settings
|
189
|
-
# to the server. for now lets just look at the environment variable we need
|
190
|
-
tracelog_mode = os.environ.get("WANDB_TRACELOG")
|
191
|
-
if tracelog_mode:
|
192
|
-
tracelog.enable(tracelog_mode)
|
193
|
-
|
194
|
-
|
195
181
|
def configure_logging(
|
196
182
|
log_fname: str, log_level: int, run_id: Optional[str] = None
|
197
183
|
) -> None:
|
@@ -11,8 +11,6 @@ import threading
|
|
11
11
|
import time
|
12
12
|
from typing import TYPE_CHECKING, Optional, Tuple, Type, Union
|
13
13
|
|
14
|
-
from ..lib import tracelog
|
15
|
-
|
16
14
|
if TYPE_CHECKING:
|
17
15
|
from queue import Queue
|
18
16
|
from threading import Event
|
@@ -95,6 +93,5 @@ class RecordLoopThread(ExceptionThread):
|
|
95
93
|
record = self._input_record_q.get(timeout=1)
|
96
94
|
except queue.Empty:
|
97
95
|
continue
|
98
|
-
tracelog.log_message_dequeue(record, self._input_record_q)
|
99
96
|
self._process(record)
|
100
97
|
self._finish()
|
wandb/sdk/internal/sender.py
CHANGED
@@ -53,7 +53,6 @@ from wandb.sdk.lib import (
|
|
53
53
|
proto_util,
|
54
54
|
redirect,
|
55
55
|
telemetry,
|
56
|
-
tracelog,
|
57
56
|
)
|
58
57
|
from wandb.sdk.lib.mailbox import ContextCancelledError
|
59
58
|
from wandb.sdk.lib.proto_util import message_to_dict
|
@@ -418,7 +417,6 @@ class SendManager:
|
|
418
417
|
send_handler(record)
|
419
418
|
|
420
419
|
def _respond_result(self, result: "Result") -> None:
|
421
|
-
tracelog.log_message_queue(result, self._result_q)
|
422
420
|
context_id = context.context_id_from_result(result)
|
423
421
|
self._context_keeper.release(context_id)
|
424
422
|
self._result_q.put(result)
|
wandb/sdk/internal/writer.py
CHANGED
@@ -7,7 +7,7 @@ from wandb.proto import wandb_internal_pb2 as pb
|
|
7
7
|
from wandb.proto import wandb_telemetry_pb2 as tpb
|
8
8
|
|
9
9
|
from ..interface.interface_queue import InterfaceQueue
|
10
|
-
from ..lib import proto_util, telemetry
|
10
|
+
from ..lib import proto_util, telemetry
|
11
11
|
from . import context, datastore, flow_control
|
12
12
|
from .settings_static import SettingsStatic
|
13
13
|
|
@@ -79,7 +79,6 @@ class WriteManager:
|
|
79
79
|
|
80
80
|
def _forward_record(self, record: "pb.Record") -> None:
|
81
81
|
self._context_keeper.add_from_record(record)
|
82
|
-
tracelog.log_message_queue(record, self._sender_q)
|
83
82
|
self._sender_q.put(record)
|
84
83
|
|
85
84
|
def _send_mark(self) -> None:
|
@@ -191,7 +190,6 @@ class WriteManager:
|
|
191
190
|
# self._sender_cancel_set.add(cancel_id)
|
192
191
|
|
193
192
|
def _respond_result(self, result: "pb.Result") -> None:
|
194
|
-
tracelog.log_message_queue(result, self._result_q)
|
195
193
|
self._result_q.put(result)
|
196
194
|
|
197
195
|
def finish(self) -> None:
|
wandb/sdk/launch/__init__.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
from ._launch import launch
|
1
|
+
from ._launch import create_and_run_agent, launch
|
2
2
|
from ._launch_add import launch_add
|
3
3
|
from .agent.agent import LaunchAgent
|
4
4
|
from .inputs.manage import manage_config_file, manage_wandb_config
|
5
5
|
from .utils import load_wandb_config
|
6
6
|
|
7
7
|
__all__ = [
|
8
|
+
"create_and_run_agent",
|
8
9
|
"LaunchAgent",
|
9
10
|
"launch",
|
10
11
|
"launch_add",
|
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,21 +68,14 @@ 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
|
-
#
|
77
|
+
# TODO: the internal_process should have a better way to have access to
|
78
|
+
# settings.
|
87
79
|
disable_setproctitle = os.environ.get("WANDB__DISABLE_SETPROCTITLE")
|
88
80
|
if disable_setproctitle:
|
89
81
|
return
|
@@ -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/wandb_run.py
CHANGED
@@ -549,7 +549,6 @@ class Run:
|
|
549
549
|
_redirect_cb: Callable[[str, str], None] | None
|
550
550
|
_redirect_raw_cb: Callable[[str, str], None] | None
|
551
551
|
_output_writer: filesystem.CRDedupedFile | None
|
552
|
-
_quiet: bool | None
|
553
552
|
|
554
553
|
_atexit_cleanup_called: bool
|
555
554
|
_hooks: ExitHooks | None
|
@@ -657,7 +656,6 @@ class Run:
|
|
657
656
|
self._stderr_slave_fd = None
|
658
657
|
self._exit_code = None
|
659
658
|
self._exit_result = None
|
660
|
-
self._quiet = self._settings.quiet
|
661
659
|
|
662
660
|
self._output_writer = None
|
663
661
|
self._used_artifact_slots: dict[str, str] = {}
|
@@ -1469,12 +1467,14 @@ class Run:
|
|
1469
1467
|
files: FilesDict = dict(files=[(GlobStr(glob.escape(fname)), "now")])
|
1470
1468
|
self._backend.interface.publish_files(files)
|
1471
1469
|
|
1472
|
-
def
|
1473
|
-
|
1470
|
+
def _serialize_custom_charts(self, data: dict[str, Any]) -> dict[str, Any]:
|
1471
|
+
if not data:
|
1472
|
+
return data
|
1473
|
+
|
1474
1474
|
chart_keys = set()
|
1475
|
-
for k, v in
|
1475
|
+
for k, v in data.items():
|
1476
1476
|
if isinstance(v, Visualize):
|
1477
|
-
|
1477
|
+
data[k] = v.table
|
1478
1478
|
v.set_key(k)
|
1479
1479
|
self._config_callback(
|
1480
1480
|
val=v.spec.config_value,
|
@@ -1490,31 +1490,33 @@ class Run:
|
|
1490
1490
|
|
1491
1491
|
for k in chart_keys:
|
1492
1492
|
# remove the chart key from the row
|
1493
|
-
v =
|
1493
|
+
v = data.pop(k)
|
1494
1494
|
if isinstance(v, CustomChart):
|
1495
|
-
|
1496
|
-
return
|
1495
|
+
data[v.spec.table_key] = v.table
|
1496
|
+
return data
|
1497
1497
|
|
1498
1498
|
def _partial_history_callback(
|
1499
1499
|
self,
|
1500
|
-
|
1500
|
+
data: dict[str, Any],
|
1501
1501
|
step: int | None = None,
|
1502
1502
|
commit: bool | None = None,
|
1503
1503
|
) -> None:
|
1504
|
-
|
1505
|
-
|
1506
|
-
row = self._visualization_hack(row)
|
1504
|
+
if not (self._backend and self._backend.interface):
|
1505
|
+
return
|
1507
1506
|
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1507
|
+
data = data.copy() # avoid modifying the original data
|
1508
|
+
|
1509
|
+
# Serialize custom charts before publishing
|
1510
|
+
data = self._serialize_custom_charts(data)
|
1511
|
+
|
1512
|
+
not_using_tensorboard = len(wandb.patched["tensorboard"]) == 0
|
1513
|
+
self._backend.interface.publish_partial_history(
|
1514
|
+
data,
|
1515
|
+
user_step=self._step,
|
1516
|
+
step=step,
|
1517
|
+
flush=commit,
|
1518
|
+
publish_step=not_using_tensorboard,
|
1519
|
+
)
|
1518
1520
|
|
1519
1521
|
def _console_callback(self, name: str, data: str) -> None:
|
1520
1522
|
# logger.info("console callback: %s, %s", name, data)
|
@@ -2134,22 +2136,26 @@ class Run:
|
|
2134
2136
|
|
2135
2137
|
Args:
|
2136
2138
|
exit_code: Set to something other than 0 to mark a run as failed
|
2137
|
-
quiet:
|
2139
|
+
quiet: Deprecated, use `wandb.Settings(quiet=...)` to set this instead.
|
2138
2140
|
"""
|
2139
|
-
|
2141
|
+
if quiet is not None:
|
2142
|
+
deprecate.deprecate(
|
2143
|
+
field_name=deprecate.Deprecated.run__finish_quiet,
|
2144
|
+
warning_message=(
|
2145
|
+
"The `quiet` argument to `wandb.run.finish()` is deprecated, "
|
2146
|
+
"use `wandb.Settings(quiet=...)` to set this instead."
|
2147
|
+
),
|
2148
|
+
)
|
2149
|
+
return self._finish(exit_code)
|
2140
2150
|
|
2141
2151
|
def _finish(
|
2142
2152
|
self,
|
2143
2153
|
exit_code: int | None = None,
|
2144
|
-
quiet: bool | None = None,
|
2145
2154
|
) -> None:
|
2146
2155
|
logger.info(f"finishing run {self._get_path()}")
|
2147
2156
|
with telemetry.context(run=self) as tel:
|
2148
2157
|
tel.feature.finish = True
|
2149
2158
|
|
2150
|
-
if quiet is not None:
|
2151
|
-
self._quiet = quiet
|
2152
|
-
|
2153
2159
|
# Pop this run (hopefully) from the run stack, to support the "reinit"
|
2154
2160
|
# functionality of wandb.init().
|
2155
2161
|
#
|
@@ -2442,7 +2448,6 @@ class Run:
|
|
2442
2448
|
poll_exit_response=self._poll_exit_response,
|
2443
2449
|
internal_messages_response=self._internal_messages_response,
|
2444
2450
|
reporter=self._reporter,
|
2445
|
-
quiet=self._quiet,
|
2446
2451
|
settings=self._settings,
|
2447
2452
|
printer=self._printer,
|
2448
2453
|
)
|
@@ -3853,7 +3858,6 @@ class Run:
|
|
3853
3858
|
poll_exit_response: PollExitResponse | None = None,
|
3854
3859
|
internal_messages_response: InternalMessagesResponse | None = None,
|
3855
3860
|
reporter: Reporter | None = None,
|
3856
|
-
quiet: bool | None = None,
|
3857
3861
|
*,
|
3858
3862
|
settings: Settings,
|
3859
3863
|
printer: printer.Printer,
|
@@ -3861,37 +3865,32 @@ class Run:
|
|
3861
3865
|
Run._footer_history_summary_info(
|
3862
3866
|
history=sampled_history,
|
3863
3867
|
summary=final_summary,
|
3864
|
-
quiet=quiet,
|
3865
3868
|
settings=settings,
|
3866
3869
|
printer=printer,
|
3867
3870
|
)
|
3868
3871
|
|
3869
3872
|
Run._footer_sync_info(
|
3870
3873
|
poll_exit_response=poll_exit_response,
|
3871
|
-
quiet=quiet,
|
3872
3874
|
settings=settings,
|
3873
3875
|
printer=printer,
|
3874
3876
|
)
|
3875
|
-
Run._footer_log_dir_info(
|
3877
|
+
Run._footer_log_dir_info(settings=settings, printer=printer)
|
3876
3878
|
Run._footer_notify_wandb_core(
|
3877
|
-
quiet=quiet,
|
3878
3879
|
settings=settings,
|
3879
3880
|
printer=printer,
|
3880
3881
|
)
|
3881
3882
|
Run._footer_internal_messages(
|
3882
3883
|
internal_messages_response=internal_messages_response,
|
3883
|
-
quiet=quiet,
|
3884
3884
|
settings=settings,
|
3885
3885
|
printer=printer,
|
3886
3886
|
)
|
3887
3887
|
Run._footer_reporter_warn_err(
|
3888
|
-
reporter=reporter,
|
3888
|
+
reporter=reporter, settings=settings, printer=printer
|
3889
3889
|
)
|
3890
3890
|
|
3891
3891
|
@staticmethod
|
3892
3892
|
def _footer_sync_info(
|
3893
3893
|
poll_exit_response: PollExitResponse | None = None,
|
3894
|
-
quiet: bool | None = None,
|
3895
3894
|
*,
|
3896
3895
|
settings: Settings,
|
3897
3896
|
printer: printer.Printer,
|
@@ -3900,7 +3899,7 @@ class Run:
|
|
3900
3899
|
return
|
3901
3900
|
|
3902
3901
|
if settings._offline:
|
3903
|
-
if not
|
3902
|
+
if not settings.quiet:
|
3904
3903
|
printer.display(
|
3905
3904
|
[
|
3906
3905
|
"You can sync this run to the cloud by running:",
|
@@ -3929,12 +3928,11 @@ class Run:
|
|
3929
3928
|
|
3930
3929
|
@staticmethod
|
3931
3930
|
def _footer_log_dir_info(
|
3932
|
-
quiet: bool | None = None,
|
3933
3931
|
*,
|
3934
3932
|
settings: Settings,
|
3935
3933
|
printer: printer.Printer,
|
3936
3934
|
) -> None:
|
3937
|
-
if
|
3935
|
+
if settings.quiet or settings.silent:
|
3938
3936
|
return
|
3939
3937
|
|
3940
3938
|
log_dir = settings.log_user or settings.log_internal
|
@@ -3948,12 +3946,11 @@ class Run:
|
|
3948
3946
|
def _footer_history_summary_info(
|
3949
3947
|
history: SampledHistoryResponse | None = None,
|
3950
3948
|
summary: GetSummaryResponse | None = None,
|
3951
|
-
quiet: bool | None = None,
|
3952
3949
|
*,
|
3953
3950
|
settings: Settings,
|
3954
3951
|
printer: printer.Printer,
|
3955
3952
|
) -> None:
|
3956
|
-
if
|
3953
|
+
if settings.quiet or settings.silent:
|
3957
3954
|
return
|
3958
3955
|
|
3959
3956
|
panel = []
|
@@ -4018,12 +4015,11 @@ class Run:
|
|
4018
4015
|
@staticmethod
|
4019
4016
|
def _footer_internal_messages(
|
4020
4017
|
internal_messages_response: InternalMessagesResponse | None = None,
|
4021
|
-
quiet: bool | None = None,
|
4022
4018
|
*,
|
4023
4019
|
settings: Settings,
|
4024
4020
|
printer: printer.Printer,
|
4025
4021
|
) -> None:
|
4026
|
-
if
|
4022
|
+
if settings.quiet or settings.silent:
|
4027
4023
|
return
|
4028
4024
|
|
4029
4025
|
if not internal_messages_response:
|
@@ -4035,12 +4031,11 @@ class Run:
|
|
4035
4031
|
@staticmethod
|
4036
4032
|
def _footer_notify_wandb_core(
|
4037
4033
|
*,
|
4038
|
-
quiet: bool | None = None,
|
4039
4034
|
settings: Settings,
|
4040
4035
|
printer: printer.Printer,
|
4041
4036
|
) -> None:
|
4042
4037
|
"""Prints a message advertising the upcoming core release."""
|
4043
|
-
if quiet or not settings._require_legacy_service:
|
4038
|
+
if settings.quiet or not settings._require_legacy_service:
|
4044
4039
|
return
|
4045
4040
|
|
4046
4041
|
printer.display(
|
@@ -4053,12 +4048,11 @@ class Run:
|
|
4053
4048
|
@staticmethod
|
4054
4049
|
def _footer_reporter_warn_err(
|
4055
4050
|
reporter: Reporter | None = None,
|
4056
|
-
quiet: bool | None = None,
|
4057
4051
|
*,
|
4058
4052
|
settings: Settings,
|
4059
4053
|
printer: printer.Printer,
|
4060
4054
|
) -> None:
|
4061
|
-
if
|
4055
|
+
if settings.quiet or settings.silent:
|
4062
4056
|
return
|
4063
4057
|
|
4064
4058
|
if not reporter:
|
@@ -4151,7 +4145,7 @@ def finish(exit_code: int | None = None, quiet: bool | None = None) -> None:
|
|
4151
4145
|
|
4152
4146
|
Args:
|
4153
4147
|
exit_code: Set to something other than 0 to mark a run as failed
|
4154
|
-
quiet:
|
4148
|
+
quiet: Deprecated, use `wandb.Settings(quiet=...)` to set this instead.
|
4155
4149
|
"""
|
4156
4150
|
if wandb.run:
|
4157
4151
|
wandb.run.finish(exit_code=exit_code, quiet=quiet)
|
wandb/sdk/wandb_settings.py
CHANGED
@@ -160,6 +160,20 @@ def _get_program() -> Optional[str]:
|
|
160
160
|
return None
|
161
161
|
|
162
162
|
|
163
|
+
def _preprocess_file_stream_max_line_bytes(val: Any) -> Optional[int]:
|
164
|
+
"""Preprocess the file_stream_max_line_bytes setting.
|
165
|
+
|
166
|
+
For now treat negative values as 0, which means use the default.
|
167
|
+
"""
|
168
|
+
try:
|
169
|
+
value = int(val)
|
170
|
+
if value < 0:
|
171
|
+
return None
|
172
|
+
return value
|
173
|
+
except ValueError:
|
174
|
+
return None
|
175
|
+
|
176
|
+
|
163
177
|
def _runmoment_preprocessor(val: Any) -> Optional[RunMoment]:
|
164
178
|
if isinstance(val, RunMoment) or val is None:
|
165
179
|
return val
|
@@ -320,6 +334,7 @@ class SettingsData:
|
|
320
334
|
_file_stream_retry_wait_min_seconds: float # min wait time between retries
|
321
335
|
_file_stream_retry_wait_max_seconds: float # max wait time between retries
|
322
336
|
_file_stream_timeout_seconds: float # timeout for individual HTTP requests
|
337
|
+
_file_stream_max_line_bytes: int # max line length for filestream jsonl files
|
323
338
|
# file transfer retry client configuration
|
324
339
|
_file_transfer_retry_max: int
|
325
340
|
_file_transfer_retry_wait_min_seconds: float
|
@@ -382,10 +397,10 @@ class SettingsData:
|
|
382
397
|
_stats_disk_paths: Sequence[str] # paths to monitor disk usage
|
383
398
|
_stats_buffer_size: int # number of consolidated samples to buffer before flushing, available in run obj
|
384
399
|
_tmp_code_dir: str
|
385
|
-
_tracelog: str
|
386
400
|
_unsaved_keys: Sequence[str]
|
387
401
|
_windows: bool
|
388
402
|
_show_operation_stats: bool
|
403
|
+
allow_offline_artifacts: bool
|
389
404
|
allow_val_change: bool
|
390
405
|
anonymous: str
|
391
406
|
api_key: str
|
@@ -670,6 +685,9 @@ class Settings(SettingsData):
|
|
670
685
|
_file_stream_retry_wait_min_seconds={"preprocessor": float},
|
671
686
|
_file_stream_retry_wait_max_seconds={"preprocessor": float},
|
672
687
|
_file_stream_timeout_seconds={"preprocessor": float},
|
688
|
+
_file_stream_max_line_bytes={
|
689
|
+
"preprocessor": _preprocess_file_stream_max_line_bytes,
|
690
|
+
},
|
673
691
|
_file_transfer_retry_max={"preprocessor": int},
|
674
692
|
_file_transfer_retry_wait_min_seconds={"preprocessor": float},
|
675
693
|
_file_transfer_retry_wait_max_seconds={"preprocessor": float},
|
@@ -777,6 +795,7 @@ class Settings(SettingsData):
|
|
777
795
|
"auto_hook": True,
|
778
796
|
},
|
779
797
|
_show_operation_stats={"preprocessor": _str_as_bool},
|
798
|
+
allow_offline_artifacts={"value": "True", "preprocessor": _str_as_bool},
|
780
799
|
anonymous={"validator": self._validate_anonymous},
|
781
800
|
api_key={"validator": self._validate_api_key},
|
782
801
|
base_url={
|
@@ -1677,7 +1696,6 @@ class Settings(SettingsData):
|
|
1677
1696
|
) -> None:
|
1678
1697
|
env_prefix: str = "WANDB_"
|
1679
1698
|
special_env_var_names = {
|
1680
|
-
"WANDB_TRACELOG": "_tracelog",
|
1681
1699
|
"WANDB_DISABLE_SERVICE": "_disable_service",
|
1682
1700
|
"WANDB_SERVICE_TRANSPORT": "_service_transport",
|
1683
1701
|
"WANDB_DIR": "root_dir",
|
wandb/sdk/wandb_setup.py
CHANGED
@@ -21,7 +21,7 @@ import wandb
|
|
21
21
|
from wandb.sdk.lib import import_hooks
|
22
22
|
|
23
23
|
from . import wandb_settings
|
24
|
-
from .lib import config_util, server
|
24
|
+
from .lib import config_util, server
|
25
25
|
|
26
26
|
Settings = Union["wandb.sdk.wandb_settings.Settings", Dict[str, Any]]
|
27
27
|
|
@@ -114,10 +114,6 @@ class _WandbSetup__WandbSetup: # noqa: N801
|
|
114
114
|
self._check()
|
115
115
|
self._setup()
|
116
116
|
|
117
|
-
tracelog_mode = self._settings._tracelog
|
118
|
-
if tracelog_mode:
|
119
|
-
tracelog.enable(tracelog_mode)
|
120
|
-
|
121
117
|
def _settings_setup(
|
122
118
|
self,
|
123
119
|
settings: Optional[Settings] = None,
|
wandb/util.py
CHANGED
@@ -1971,9 +1971,9 @@ def get_core_path() -> str:
|
|
1971
1971
|
bin_path = pathlib.Path(__file__).parent / "bin" / "wandb-core"
|
1972
1972
|
if not bin_path.exists():
|
1973
1973
|
raise WandbCoreNotAvailableError(
|
1974
|
-
f"
|
1975
|
-
"
|
1976
|
-
"
|
1974
|
+
f"File not found: {bin_path}."
|
1975
|
+
"Please contact support at support@wandb.com."
|
1976
|
+
f"Your platform is: {platform.platform()}."
|
1977
1977
|
)
|
1978
1978
|
|
1979
1979
|
return str(bin_path)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: wandb
|
3
|
-
Version: 0.18.
|
3
|
+
Version: 0.18.7
|
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
|
@@ -27,7 +27,6 @@ License: MIT License
|
|
27
27
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
28
28
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
29
29
|
SOFTWARE.
|
30
|
-
License-File: LICENSE
|
31
30
|
Classifier: Development Status :: 5 - Production/Stable
|
32
31
|
Classifier: Intended Audience :: Developers
|
33
32
|
Classifier: Intended Audience :: Science/Research
|