wandb 0.19.11__py3-none-any.whl → 0.19.12rc1__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 CHANGED
@@ -10,7 +10,7 @@ For reference documentation, see https://docs.wandb.com/ref/python.
10
10
  """
11
11
  from __future__ import annotations
12
12
 
13
- __version__ = "0.19.11"
13
+ __version__ = "0.19.12rc1"
14
14
 
15
15
 
16
16
  from wandb.errors import Error
wandb/__init__.pyi CHANGED
@@ -106,7 +106,7 @@ if TYPE_CHECKING:
106
106
  import wandb
107
107
  from wandb.plot import CustomChart
108
108
 
109
- __version__: str = "0.19.11"
109
+ __version__: str = "0.19.12rc1"
110
110
 
111
111
  run: Run | None
112
112
  config: wandb_config.Config
@@ -18,10 +18,6 @@ from wandb.sdk.mailbox import HandleAbandonedError, Mailbox, MailboxClosedError
18
18
  from wandb.sdk.service import service
19
19
 
20
20
 
21
- class WandbServiceNotOwnedError(Exception):
22
- """Raised when the current process does not own the service process."""
23
-
24
-
25
21
  class WandbServiceConnectionError(Exception):
26
22
  """Raised on failure to connect to the service process."""
27
23
 
@@ -196,35 +192,35 @@ class ServiceConnection:
196
192
  request._info.stream_id = run_id
197
193
  self._client.send_server_request(spb.ServerRequest(inform_start=request))
198
194
 
199
- def teardown(self, exit_code: int) -> int:
200
- """Shuts down the service process and returns its exit code.
195
+ def teardown(self, exit_code: int) -> int | None:
196
+ """Close the connection.
197
+
198
+ Stop reading responses on the connection, and if this connection owns
199
+ the service process, send a teardown message and wait for it to shut
200
+ down.
201
201
 
202
202
  This may only be called once.
203
203
 
204
204
  Returns:
205
- The exit code of the service process.
206
-
207
- Raises:
208
- WandbServiceNotOwnedError: If the current process did not start
209
- the service process.
205
+ The exit code of the service process, or None if the process was
206
+ not owned by this connection.
210
207
  """
211
- if not self._proc:
212
- raise WandbServiceNotOwnedError(
213
- "Cannot tear down service started by different process",
214
- )
215
-
216
- assert not self._torn_down
208
+ if self._torn_down:
209
+ raise AssertionError("Already torn down.")
217
210
  self._torn_down = True
218
211
 
219
212
  if self._cleanup:
220
213
  self._cleanup()
221
214
 
222
- # Clear the service token to prevent new connections from being made.
223
- service_token.clear_service_token()
224
-
225
215
  # Stop reading responses on the socket.
226
216
  self._router.join()
227
217
 
218
+ if not self._proc:
219
+ return None
220
+
221
+ # Clear the service token to prevent new connections to the process.
222
+ service_token.clear_service_token()
223
+
228
224
  self._client.send_server_request(
229
225
  spb.ServerRequest(
230
226
  inform_teardown=spb.ServerInformTeardownRequest(
wandb/sdk/wandb_setup.py CHANGED
@@ -307,12 +307,12 @@ class _WandbSetup:
307
307
  if not self._connection:
308
308
  return
309
309
 
310
- internal_exit_code = self._connection.teardown(exit_code or 0)
311
-
312
310
  # Reset to None so that setup() creates a new connection.
311
+ connection = self._connection
313
312
  self._connection = None
314
313
 
315
- if internal_exit_code != 0:
314
+ internal_exit_code = connection.teardown(exit_code or 0)
315
+ if internal_exit_code not in (None, 0):
316
316
  sys.exit(internal_exit_code)
317
317
 
318
318
  def ensure_service(self) -> ServiceConnection:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wandb
3
- Version: 0.19.11
3
+ Version: 0.19.12rc1
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
@@ -1,6 +1,6 @@
1
1
  package_readme.md,sha256=U9047nyMDICgctm1HLm4HfXwFnFKsEn2m77hsYPUZ1I,4298
2
- wandb/__init__.py,sha256=F1oW4Oflh9R5-OZ5Xj2y-pxEjIrlC33lsCf-_zYhdEQ,7148
3
- wandb/__init__.pyi,sha256=3VFHLCEDLBaqfL6m8E67cewPBXc0pptuEGqBKj9doD4,48325
2
+ wandb/__init__.py,sha256=h-BqHsfabAKDyqLt8M3IOEPcElSA0IXpkhPfdRpM7nk,7151
3
+ wandb/__init__.pyi,sha256=4ngOvMcsz4c6J-4lu7LOE1R6WfMPW15H1ywVc2UhQpI,48328
4
4
  wandb/__main__.py,sha256=gripuDgB7J8wMMeJt4CIBRjn1BMSFr5zvsrt585Pnj4,64
5
5
  wandb/_iterutils.py,sha256=bOhOrOENEDzOMtyQqHysivzHri9axcVlCfXt4Ai1ot8,1545
6
6
  wandb/data_types.py,sha256=M-wqAO0FtIqvj28556u3h4nzSwlRcbxhXoX0B9jlJSo,2283
@@ -253,7 +253,7 @@ wandb/sdk/wandb_require.py,sha256=eYDG4oH1pwik2tHJVEdvivo4R2RypoITFomgr7umMhc,31
253
253
  wandb/sdk/wandb_require_helpers.py,sha256=ZmKv5aXXHDTTU6nYHMLKW4_pt9X-PlaMtbRJl77kHX8,1331
254
254
  wandb/sdk/wandb_run.py,sha256=mIPxXWDc8Xdi7yLYpLGt7BvqLvFfsYoLpfXe1VfYFO0,158032
255
255
  wandb/sdk/wandb_settings.py,sha256=y3T8UeSdNBqrKVOlmAXpwCREXhf1aZ-cWsFpQGooyuk,64830
256
- wandb/sdk/wandb_setup.py,sha256=3dvnkFlSuoa8BxzyKp_7qtj2tC2L26ge-rWolKQzfgY,15197
256
+ wandb/sdk/wandb_setup.py,sha256=Yk9GlIik9AAChofQUvtkivDnlCiqiHM9-K1eJ03OWtw,15240
257
257
  wandb/sdk/wandb_summary.py,sha256=yQdOVIPrZaZanhBQ7yuSfPLX0x6dxwkN_KAn4SgjSZU,4536
258
258
  wandb/sdk/wandb_sweep.py,sha256=Sg_JqxVzmjUBvii41azpdr-c6RPwHOBnSha8k7jrRhk,4028
259
259
  wandb/sdk/wandb_sync.py,sha256=GNC8xYqT56ws4aw6Vd_mV_Ck-InEbqnyioSqHIybDug,2106
@@ -487,7 +487,7 @@ wandb/sdk/lib/retry.py,sha256=BAgPgJb1SxRguor2KTfOFnQpTlyNE4M_X8VcEc7YfMs,10173
487
487
  wandb/sdk/lib/run_moment.py,sha256=jMkfNAHOrYHlb6_nisqjfMu2Onm1bDy6lIubOJ2WxCM,2421
488
488
  wandb/sdk/lib/runid.py,sha256=Qa-5ft4B85YUazkV_18OYwf9JhMaAVp0JAInZzxzX5o,392
489
489
  wandb/sdk/lib/server.py,sha256=dn0RXjAnpmigAULLyq75XHYyHxw17MLCJ9fhPq2v22I,1623
490
- wandb/sdk/lib/service_connection.py,sha256=pf1T0isbDwTkv9MvuIpuk1MHTVkCebK4N8n9pXF4SSg,7455
490
+ wandb/sdk/lib/service_connection.py,sha256=J6WHS95CdloYT-C_KgkuQa9pJBXkp23mobhAG1BC9JQ,7352
491
491
  wandb/sdk/lib/service_token.py,sha256=c4olk_g4Suo0zTTDaoR78oHLwpt3NgDzQeF94raigME,2471
492
492
  wandb/sdk/lib/sock_client.py,sha256=YzR4uFMgFBA95ySl9h2QwIqXKMEAyb36Y09vpf70IPU,8383
493
493
  wandb/sdk/lib/sparkline.py,sha256=9xQkuZ0z1DM7rHE2jFNDy5vBdPirnurd__A_bC6-Bgc,1363
@@ -904,8 +904,8 @@ wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/importlib2.py,sha256=cJIaJ2EQso
904
904
  wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/platform.py,sha256=UORYTNVcUSE2NpFcq9UVLIS-tsS0TS_Qw8akhKxn2eY,1506
905
905
  wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/unicode_paths.py,sha256=UWX8DB97ygkEeSxWQUYCHR4MahNilux7vl5TCTQtPPk,2190
906
906
  wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/win32stat.py,sha256=ZOevOTbSo8NRiIxkuBVGaG4yigWnPoO0goxAi-jsBkM,3828
907
- wandb-0.19.11.dist-info/METADATA,sha256=gVmAK68XIW9ZWlg4--FcNF2qbJIq8fZzsQ_NjV2RWSU,10259
908
- wandb-0.19.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
909
- wandb-0.19.11.dist-info/entry_points.txt,sha256=v4FCOZ9gW7Pc6KLsmgQqpCiKTrA1wh2XHmNf-NUP1-I,67
910
- wandb-0.19.11.dist-info/licenses/LICENSE,sha256=izOKRJpGOx1PrJiGOKR0HsNdlB5JdH2d0Z4P7a7ssTc,1081
911
- wandb-0.19.11.dist-info/RECORD,,
907
+ wandb-0.19.12rc1.dist-info/METADATA,sha256=vMgGUYCKJEfrEq3d_3Eo0rpiBIXYwdatPwvHavX4ot8,10262
908
+ wandb-0.19.12rc1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
909
+ wandb-0.19.12rc1.dist-info/entry_points.txt,sha256=v4FCOZ9gW7Pc6KLsmgQqpCiKTrA1wh2XHmNf-NUP1-I,67
910
+ wandb-0.19.12rc1.dist-info/licenses/LICENSE,sha256=izOKRJpGOx1PrJiGOKR0HsNdlB5JdH2d0Z4P7a7ssTc,1081
911
+ wandb-0.19.12rc1.dist-info/RECORD,,