wandb 0.19.1rc1__py3-none-win32.whl → 0.19.3__py3-none-win32.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 -7
- wandb/__init__.pyi +15 -7
- wandb/agents/pyagent.py +1 -1
- wandb/apis/importers/wandb.py +1 -1
- wandb/apis/public/files.py +1 -1
- wandb/apis/public/jobs.py +1 -1
- wandb/apis/public/runs.py +2 -7
- wandb/apis/reports/v1/__init__.py +1 -1
- wandb/apis/reports/v2/__init__.py +1 -1
- wandb/apis/workspaces/__init__.py +1 -1
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/beta.py +7 -4
- wandb/cli/cli.py +5 -7
- wandb/docker/__init__.py +4 -4
- wandb/integration/fastai/__init__.py +4 -6
- wandb/integration/keras/keras.py +5 -3
- wandb/integration/metaflow/metaflow.py +14 -16
- wandb/integration/prodigy/prodigy.py +3 -11
- wandb/integration/sagemaker/__init__.py +5 -3
- wandb/integration/sagemaker/config.py +17 -8
- wandb/integration/sagemaker/files.py +0 -1
- wandb/integration/sagemaker/resources.py +47 -18
- wandb/integration/torch/wandb_torch.py +1 -1
- wandb/proto/v3/wandb_internal_pb2.py +273 -235
- wandb/proto/v4/wandb_internal_pb2.py +222 -214
- wandb/proto/v5/wandb_internal_pb2.py +222 -214
- wandb/sdk/artifacts/artifact.py +3 -9
- wandb/sdk/backend/backend.py +1 -1
- wandb/sdk/data_types/base_types/wb_value.py +1 -1
- wandb/sdk/data_types/graph.py +2 -2
- wandb/sdk/data_types/saved_model.py +1 -1
- wandb/sdk/data_types/video.py +1 -1
- wandb/sdk/interface/interface.py +25 -25
- wandb/sdk/interface/interface_shared.py +21 -5
- wandb/sdk/internal/handler.py +19 -1
- wandb/sdk/internal/internal.py +1 -1
- wandb/sdk/internal/internal_api.py +4 -5
- wandb/sdk/internal/sample.py +2 -2
- wandb/sdk/internal/sender.py +1 -2
- wandb/sdk/internal/settings_static.py +3 -1
- wandb/sdk/internal/system/assets/disk.py +4 -4
- wandb/sdk/internal/system/assets/gpu.py +1 -1
- wandb/sdk/internal/system/assets/memory.py +1 -1
- wandb/sdk/internal/system/system_info.py +1 -1
- wandb/sdk/internal/system/system_monitor.py +3 -1
- wandb/sdk/internal/tb_watcher.py +1 -1
- wandb/sdk/launch/_project_spec.py +3 -3
- wandb/sdk/launch/builder/abstract.py +1 -1
- wandb/sdk/lib/apikey.py +2 -3
- wandb/sdk/lib/fsm.py +1 -1
- wandb/sdk/lib/gitlib.py +1 -1
- wandb/sdk/lib/gql_request.py +1 -1
- wandb/sdk/lib/interrupt.py +37 -0
- wandb/sdk/lib/lazyloader.py +1 -1
- wandb/sdk/lib/progress.py +7 -1
- wandb/sdk/lib/service_connection.py +1 -1
- wandb/sdk/lib/telemetry.py +1 -1
- wandb/sdk/service/_startup_debug.py +1 -1
- wandb/sdk/service/server_sock.py +3 -2
- wandb/sdk/service/service.py +1 -1
- wandb/sdk/service/streams.py +19 -17
- wandb/sdk/verify/verify.py +13 -13
- wandb/sdk/wandb_init.py +316 -246
- wandb/sdk/wandb_login.py +1 -1
- wandb/sdk/wandb_metadata.py +547 -0
- wandb/sdk/wandb_run.py +134 -39
- wandb/sdk/wandb_settings.py +7 -63
- wandb/sdk/wandb_setup.py +83 -82
- wandb/sdk/wandb_sweep.py +2 -2
- wandb/sdk/wandb_sync.py +15 -18
- wandb/sync/sync.py +10 -10
- wandb/util.py +11 -3
- wandb/wandb_agent.py +11 -16
- wandb/wandb_controller.py +7 -7
- {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/METADATA +3 -2
- {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/RECORD +80 -78
- {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/WHEEL +0 -0
- {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/entry_points.txt +0 -0
- {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/service/server_sock.py
CHANGED
@@ -4,6 +4,7 @@ import threading
|
|
4
4
|
import time
|
5
5
|
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional
|
6
6
|
|
7
|
+
import wandb
|
7
8
|
from wandb.proto import wandb_server_pb2 as spb
|
8
9
|
from wandb.sdk.internal.settings_static import SettingsStatic
|
9
10
|
|
@@ -225,7 +226,7 @@ class DebugThread(threading.Thread):
|
|
225
226
|
while True:
|
226
227
|
time.sleep(30)
|
227
228
|
for thread in threading.enumerate():
|
228
|
-
|
229
|
+
wandb.termwarn(f"DEBUG: {thread.name}")
|
229
230
|
|
230
231
|
|
231
232
|
class SocketServer:
|
@@ -266,7 +267,7 @@ class SocketServer:
|
|
266
267
|
# socket.shutdown() is a more heavy handed approach to interrupting socket.accept()
|
267
268
|
# in the future we might want to consider a more graceful shutdown which would involve setting
|
268
269
|
# a threading Event and then initiating one last connection just to close down the thread
|
269
|
-
# The advantage of the heavy handed approach is that it
|
270
|
+
# The advantage of the heavy handed approach is that it does not depend on the threads functioning
|
270
271
|
# properly, that is, if something has gone wrong, we probably want to use this hammer to shut things down
|
271
272
|
self._sock.shutdown(socket.SHUT_RDWR)
|
272
273
|
except OSError:
|
wandb/sdk/service/service.py
CHANGED
wandb/sdk/service/streams.py
CHANGED
@@ -6,13 +6,15 @@ StreamAction: Lightweight record for stream ops for thread safety
|
|
6
6
|
StreamMux: Container for dictionary of stream threads per runid
|
7
7
|
"""
|
8
8
|
|
9
|
+
from __future__ import annotations
|
10
|
+
|
9
11
|
import functools
|
10
12
|
import multiprocessing
|
11
13
|
import queue
|
12
14
|
import threading
|
13
15
|
import time
|
14
16
|
from threading import Event
|
15
|
-
from typing import Any, Callable
|
17
|
+
from typing import Any, Callable
|
16
18
|
|
17
19
|
import psutil
|
18
20
|
|
@@ -38,7 +40,7 @@ from ..interface.interface_relay import InterfaceRelay
|
|
38
40
|
class StreamThread(threading.Thread):
|
39
41
|
"""Class to running internal process as a thread."""
|
40
42
|
|
41
|
-
def __init__(self, target: Callable, kwargs:
|
43
|
+
def __init__(self, target: Callable, kwargs: dict[str, Any]) -> None:
|
42
44
|
threading.Thread.__init__(self)
|
43
45
|
self.name = "StreamThr"
|
44
46
|
self._target = target
|
@@ -51,9 +53,9 @@ class StreamThread(threading.Thread):
|
|
51
53
|
|
52
54
|
|
53
55
|
class StreamRecord:
|
54
|
-
_record_q:
|
55
|
-
_result_q:
|
56
|
-
_relay_q:
|
56
|
+
_record_q: queue.Queue[pb.Record]
|
57
|
+
_result_q: queue.Queue[pb.Result]
|
58
|
+
_relay_q: queue.Queue[pb.Result]
|
57
59
|
_iface: InterfaceRelay
|
58
60
|
_thread: StreamThread
|
59
61
|
_settings: SettingsStatic
|
@@ -111,7 +113,7 @@ class StreamAction:
|
|
111
113
|
_processed: Event
|
112
114
|
_data: Any
|
113
115
|
|
114
|
-
def __init__(self, action: str, stream_id: str, data:
|
116
|
+
def __init__(self, action: str, stream_id: str, data: Any | None = None):
|
115
117
|
self._action = action
|
116
118
|
self._stream_id = stream_id
|
117
119
|
self._data = data
|
@@ -133,12 +135,12 @@ class StreamAction:
|
|
133
135
|
|
134
136
|
class StreamMux:
|
135
137
|
_streams_lock: threading.Lock
|
136
|
-
_streams:
|
137
|
-
_port:
|
138
|
-
_pid:
|
139
|
-
_action_q:
|
138
|
+
_streams: dict[str, StreamRecord]
|
139
|
+
_port: int | None
|
140
|
+
_pid: int | None
|
141
|
+
_action_q: queue.Queue[StreamAction]
|
140
142
|
_stopped: Event
|
141
|
-
_pid_checked_ts:
|
143
|
+
_pid_checked_ts: float | None
|
142
144
|
_mailbox: Mailbox
|
143
145
|
|
144
146
|
def __init__(self) -> None:
|
@@ -152,7 +154,7 @@ class StreamMux:
|
|
152
154
|
self._mailbox = Mailbox()
|
153
155
|
self._mailbox.enable_keepalive()
|
154
156
|
|
155
|
-
def _get_stopped_event(self) ->
|
157
|
+
def _get_stopped_event(self) -> Event:
|
156
158
|
# TODO: clean this up, there should be a better way to abstract this
|
157
159
|
return self._stopped
|
158
160
|
|
@@ -192,7 +194,7 @@ class StreamMux:
|
|
192
194
|
self._action_q.put(action)
|
193
195
|
action.wait_handled()
|
194
196
|
|
195
|
-
def stream_names(self) ->
|
197
|
+
def stream_names(self) -> list[str]:
|
196
198
|
with self._streams_lock:
|
197
199
|
names = list(self._streams.keys())
|
198
200
|
return names
|
@@ -273,7 +275,7 @@ class StreamMux:
|
|
273
275
|
if self._check_orphaned():
|
274
276
|
self._stopped.set()
|
275
277
|
|
276
|
-
poll_exit_responses:
|
278
|
+
poll_exit_responses: list[pb.PollExitResponse] = []
|
277
279
|
for probe_handle in probe_handles:
|
278
280
|
result = probe_handle.get_probe_result()
|
279
281
|
if result:
|
@@ -281,7 +283,7 @@ class StreamMux:
|
|
281
283
|
|
282
284
|
progress_printer.update(poll_exit_responses)
|
283
285
|
|
284
|
-
def _finish_all(self, streams:
|
286
|
+
def _finish_all(self, streams: dict[str, StreamRecord], exit_code: int) -> None:
|
285
287
|
if not streams:
|
286
288
|
return
|
287
289
|
|
@@ -292,8 +294,8 @@ class StreamMux:
|
|
292
294
|
exit_handles = []
|
293
295
|
|
294
296
|
# only finish started streams, non started streams failed early
|
295
|
-
started_streams:
|
296
|
-
not_started_streams:
|
297
|
+
started_streams: dict[str, StreamRecord] = {}
|
298
|
+
not_started_streams: dict[str, StreamRecord] = {}
|
297
299
|
for stream_id, stream in streams.items():
|
298
300
|
d = started_streams if stream._started else not_started_streams
|
299
301
|
d[stream_id] = stream
|
wandb/sdk/verify/verify.py
CHANGED
@@ -37,17 +37,17 @@ def print_results(
|
|
37
37
|
else:
|
38
38
|
color = "red"
|
39
39
|
if isinstance(failed_test_or_tests, str):
|
40
|
-
print(RED_X)
|
41
|
-
print(click.style(failed_test_or_tests, fg=color, bold=True))
|
40
|
+
print(RED_X) # noqa: T201
|
41
|
+
print(click.style(failed_test_or_tests, fg=color, bold=True)) # noqa: T201
|
42
42
|
elif isinstance(failed_test_or_tests, list) and len(failed_test_or_tests) > 0:
|
43
|
-
print(RED_X)
|
44
|
-
print(
|
43
|
+
print(RED_X) # noqa: T201
|
44
|
+
print( # noqa: T201
|
45
45
|
"\n".join(
|
46
46
|
[click.style(f, fg=color, bold=True) for f in failed_test_or_tests]
|
47
47
|
)
|
48
48
|
)
|
49
49
|
else:
|
50
|
-
print(CHECKMARK)
|
50
|
+
print(CHECKMARK) # noqa: T201
|
51
51
|
|
52
52
|
|
53
53
|
def check_host(host: str) -> bool:
|
@@ -58,7 +58,7 @@ def check_host(host: str) -> bool:
|
|
58
58
|
|
59
59
|
|
60
60
|
def check_logged_in(api: Api, host: str) -> bool:
|
61
|
-
print("Checking if logged in".ljust(72, "."), end="")
|
61
|
+
print("Checking if logged in".ljust(72, "."), end="") # noqa: T201
|
62
62
|
login_doc_url = "https://docs.wandb.ai/ref/cli/wandb-login"
|
63
63
|
fail_string = None
|
64
64
|
if api.api_key is None:
|
@@ -83,7 +83,7 @@ def check_logged_in(api: Api, host: str) -> bool:
|
|
83
83
|
|
84
84
|
def check_secure_requests(url: str, test_url_string: str, failure_output: str) -> None:
|
85
85
|
# check if request is over https
|
86
|
-
print(test_url_string.ljust(72, "."), end="")
|
86
|
+
print(test_url_string.ljust(72, "."), end="") # noqa: T201
|
87
87
|
fail_string = None
|
88
88
|
if not url.startswith("https"):
|
89
89
|
fail_string = failure_output
|
@@ -91,7 +91,7 @@ def check_secure_requests(url: str, test_url_string: str, failure_output: str) -
|
|
91
91
|
|
92
92
|
|
93
93
|
def check_cors_configuration(url: str, origin: str) -> None:
|
94
|
-
print("Checking CORs configuration of the bucket".ljust(72, "."), end="")
|
94
|
+
print("Checking CORs configuration of the bucket".ljust(72, "."), end="") # noqa: T201
|
95
95
|
fail_string = None
|
96
96
|
res_get = requests.options(
|
97
97
|
url, headers={"Origin": origin, "Access-Control-Request-Method": "GET"}
|
@@ -107,7 +107,7 @@ def check_cors_configuration(url: str, origin: str) -> None:
|
|
107
107
|
|
108
108
|
|
109
109
|
def check_run(api: Api) -> bool:
|
110
|
-
print(
|
110
|
+
print( # noqa: T201
|
111
111
|
"Checking logged metrics, saving and downloading a file".ljust(72, "."), end=""
|
112
112
|
)
|
113
113
|
failed_test_strings = []
|
@@ -308,7 +308,7 @@ def log_use_download_artifact(
|
|
308
308
|
|
309
309
|
|
310
310
|
def check_artifacts() -> bool:
|
311
|
-
print("Checking artifact save and download workflows".ljust(72, "."), end="")
|
311
|
+
print("Checking artifact save and download workflows".ljust(72, "."), end="") # noqa: T201
|
312
312
|
failed_test_strings: List[str] = []
|
313
313
|
|
314
314
|
# test checksum
|
@@ -365,7 +365,7 @@ def check_artifacts() -> bool:
|
|
365
365
|
|
366
366
|
def check_graphql_put(api: Api, host: str) -> Tuple[bool, Optional[str]]:
|
367
367
|
# check graphql endpoint using an upload
|
368
|
-
print("Checking signed URL upload".ljust(72, "."), end="")
|
368
|
+
print("Checking signed URL upload".ljust(72, "."), end="") # noqa: T201
|
369
369
|
failed_test_strings = []
|
370
370
|
gql_fp = "gql_test_file.txt"
|
371
371
|
f = open(gql_fp, "w")
|
@@ -410,7 +410,7 @@ def check_graphql_put(api: Api, host: str) -> Tuple[bool, Optional[str]]:
|
|
410
410
|
|
411
411
|
|
412
412
|
def check_large_post() -> bool:
|
413
|
-
print(
|
413
|
+
print( # noqa: T201
|
414
414
|
"Checking ability to send large payloads through proxy".ljust(72, "."), end=""
|
415
415
|
)
|
416
416
|
descy = "a" * int(10**7)
|
@@ -461,7 +461,7 @@ def check_large_post() -> bool:
|
|
461
461
|
|
462
462
|
|
463
463
|
def check_wandb_version(api: Api) -> None:
|
464
|
-
print("Checking wandb package version is up to date".ljust(72, "."), end="")
|
464
|
+
print("Checking wandb package version is up to date".ljust(72, "."), end="") # noqa: T201
|
465
465
|
_, server_info = api.viewer_server_info()
|
466
466
|
fail_string = None
|
467
467
|
warning = False
|