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.
Files changed (80) hide show
  1. wandb/__init__.py +1 -7
  2. wandb/__init__.pyi +15 -7
  3. wandb/agents/pyagent.py +1 -1
  4. wandb/apis/importers/wandb.py +1 -1
  5. wandb/apis/public/files.py +1 -1
  6. wandb/apis/public/jobs.py +1 -1
  7. wandb/apis/public/runs.py +2 -7
  8. wandb/apis/reports/v1/__init__.py +1 -1
  9. wandb/apis/reports/v2/__init__.py +1 -1
  10. wandb/apis/workspaces/__init__.py +1 -1
  11. wandb/bin/gpu_stats.exe +0 -0
  12. wandb/bin/wandb-core +0 -0
  13. wandb/cli/beta.py +7 -4
  14. wandb/cli/cli.py +5 -7
  15. wandb/docker/__init__.py +4 -4
  16. wandb/integration/fastai/__init__.py +4 -6
  17. wandb/integration/keras/keras.py +5 -3
  18. wandb/integration/metaflow/metaflow.py +14 -16
  19. wandb/integration/prodigy/prodigy.py +3 -11
  20. wandb/integration/sagemaker/__init__.py +5 -3
  21. wandb/integration/sagemaker/config.py +17 -8
  22. wandb/integration/sagemaker/files.py +0 -1
  23. wandb/integration/sagemaker/resources.py +47 -18
  24. wandb/integration/torch/wandb_torch.py +1 -1
  25. wandb/proto/v3/wandb_internal_pb2.py +273 -235
  26. wandb/proto/v4/wandb_internal_pb2.py +222 -214
  27. wandb/proto/v5/wandb_internal_pb2.py +222 -214
  28. wandb/sdk/artifacts/artifact.py +3 -9
  29. wandb/sdk/backend/backend.py +1 -1
  30. wandb/sdk/data_types/base_types/wb_value.py +1 -1
  31. wandb/sdk/data_types/graph.py +2 -2
  32. wandb/sdk/data_types/saved_model.py +1 -1
  33. wandb/sdk/data_types/video.py +1 -1
  34. wandb/sdk/interface/interface.py +25 -25
  35. wandb/sdk/interface/interface_shared.py +21 -5
  36. wandb/sdk/internal/handler.py +19 -1
  37. wandb/sdk/internal/internal.py +1 -1
  38. wandb/sdk/internal/internal_api.py +4 -5
  39. wandb/sdk/internal/sample.py +2 -2
  40. wandb/sdk/internal/sender.py +1 -2
  41. wandb/sdk/internal/settings_static.py +3 -1
  42. wandb/sdk/internal/system/assets/disk.py +4 -4
  43. wandb/sdk/internal/system/assets/gpu.py +1 -1
  44. wandb/sdk/internal/system/assets/memory.py +1 -1
  45. wandb/sdk/internal/system/system_info.py +1 -1
  46. wandb/sdk/internal/system/system_monitor.py +3 -1
  47. wandb/sdk/internal/tb_watcher.py +1 -1
  48. wandb/sdk/launch/_project_spec.py +3 -3
  49. wandb/sdk/launch/builder/abstract.py +1 -1
  50. wandb/sdk/lib/apikey.py +2 -3
  51. wandb/sdk/lib/fsm.py +1 -1
  52. wandb/sdk/lib/gitlib.py +1 -1
  53. wandb/sdk/lib/gql_request.py +1 -1
  54. wandb/sdk/lib/interrupt.py +37 -0
  55. wandb/sdk/lib/lazyloader.py +1 -1
  56. wandb/sdk/lib/progress.py +7 -1
  57. wandb/sdk/lib/service_connection.py +1 -1
  58. wandb/sdk/lib/telemetry.py +1 -1
  59. wandb/sdk/service/_startup_debug.py +1 -1
  60. wandb/sdk/service/server_sock.py +3 -2
  61. wandb/sdk/service/service.py +1 -1
  62. wandb/sdk/service/streams.py +19 -17
  63. wandb/sdk/verify/verify.py +13 -13
  64. wandb/sdk/wandb_init.py +316 -246
  65. wandb/sdk/wandb_login.py +1 -1
  66. wandb/sdk/wandb_metadata.py +547 -0
  67. wandb/sdk/wandb_run.py +134 -39
  68. wandb/sdk/wandb_settings.py +7 -63
  69. wandb/sdk/wandb_setup.py +83 -82
  70. wandb/sdk/wandb_sweep.py +2 -2
  71. wandb/sdk/wandb_sync.py +15 -18
  72. wandb/sync/sync.py +10 -10
  73. wandb/util.py +11 -3
  74. wandb/wandb_agent.py +11 -16
  75. wandb/wandb_controller.py +7 -7
  76. {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/METADATA +3 -2
  77. {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/RECORD +80 -78
  78. {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/WHEEL +0 -0
  79. {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/entry_points.txt +0 -0
  80. {wandb-0.19.1rc1.dist-info → wandb-0.19.3.dist-info}/licenses/LICENSE +0 -0
@@ -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
- print(f"DEBUG: {thread.name}")
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 doesnt depend on the threads functioning
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:
@@ -160,7 +160,7 @@ class _Service:
160
160
  service_args.append("--no-observability")
161
161
 
162
162
  if core_debug(default="False"):
163
- service_args.append("--debug")
163
+ service_args.extend(["--log-level", "-4"])
164
164
 
165
165
  exec_cmd_list = []
166
166
  termlog(
@@ -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, Dict, List, Optional
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: Dict[str, Any]) -> None:
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: "queue.Queue[pb.Record]"
55
- _result_q: "queue.Queue[pb.Result]"
56
- _relay_q: "queue.Queue[pb.Result]"
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: Optional[Any] = None):
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: Dict[str, StreamRecord]
137
- _port: Optional[int]
138
- _pid: Optional[int]
139
- _action_q: "queue.Queue[StreamAction]"
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: Optional[float]
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) -> "Event":
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) -> List[str]:
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: List[pb.PollExitResponse] = []
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: Dict[str, StreamRecord], exit_code: int) -> None:
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: Dict[str, StreamRecord] = {}
296
- not_started_streams: Dict[str, StreamRecord] = {}
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
@@ -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