truss 0.11.1rc3__py3-none-any.whl → 0.11.1rc4__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.

Potentially problematic release.


This version of truss might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: truss
3
- Version: 0.11.1rc3
3
+ Version: 0.11.1rc4
4
4
  Summary: A seamless bridge from model development to model delivery
5
5
  Project-URL: Repository, https://github.com/basetenlabs/truss
6
6
  Project-URL: Homepage, https://truss.baseten.co
@@ -358,14 +358,14 @@ truss_chains/reference_code/reference_model.py,sha256=emH3hb23E_nbP98I37PGp1Xk1h
358
358
  truss_chains/remote_chainlet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
359
359
  truss_chains/remote_chainlet/model_skeleton.py,sha256=8ZReLOO2MLcdg7bNZ61C-6j-e68i2Z-fFlyV3sz0qH8,2376
360
360
  truss_chains/remote_chainlet/stub.py,sha256=Y2gDUzMY9WRaQNHIz-o4dfLUfFyYV9dUhIRQcfgrY8g,17209
361
- truss_chains/remote_chainlet/utils.py,sha256=DR04xFbAoGGCTiKG0ROqkzoWWwTp6aiiH3VduWxJelE,22644
361
+ truss_chains/remote_chainlet/utils.py,sha256=xX1t3e-BsYkWrxQIqfKRl4PHGuVyW3oleWFQpXSAynI,22949
362
362
  truss_train/__init__.py,sha256=7hE6j6-u6UGzCGaNp3CsCN0kAVjBus1Ekups-Bk0fi4,837
363
363
  truss_train/definitions.py,sha256=V985HhY4rdXL10DZxpFEpze9ScxzWErMht4WwaPknGU,6789
364
364
  truss_train/deployment.py,sha256=lWWANSuzBWu2M4oK4qD7n-oVR1JKdmw2Pn5BJQHg-Ck,3074
365
365
  truss_train/loader.py,sha256=0o66EjBaHc2YY4syxxHVR4ordJWs13lNXnKjKq2wq0U,1630
366
366
  truss_train/public_api.py,sha256=9N_NstiUlmBuLUwH_fNG_1x7OhGCytZLNvqKXBlStrM,1220
367
- truss-0.11.1rc3.dist-info/METADATA,sha256=g7LI89s5I17UGwJVLTnS3SM3sIDp7zMTW383slMfgXo,6672
368
- truss-0.11.1rc3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
369
- truss-0.11.1rc3.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
370
- truss-0.11.1rc3.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
371
- truss-0.11.1rc3.dist-info/RECORD,,
367
+ truss-0.11.1rc4.dist-info/METADATA,sha256=PYD_kydnF-Z7GjTBOB0-JA0lQjQMtiBn7Y-30qyT7wY,6672
368
+ truss-0.11.1rc4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
369
+ truss-0.11.1rc4.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
370
+ truss-0.11.1rc4.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
371
+ truss-0.11.1rc4.dist-info/RECORD,,
@@ -589,7 +589,12 @@ class WebsocketWrapperFastAPI:
589
589
 
590
590
  async def receive(self) -> Union[str, bytes]:
591
591
  message = await self._websocket.receive()
592
- if message.get("text"):
592
+
593
+ if message.get("type") == "websocket.disconnect":
594
+ # NB(nikhil): Mimics FastAPI `_raise_on_disconnect`, since otherwise the user has no
595
+ # way of detecting that the client disconnected.
596
+ raise fastapi.WebSocketDisconnect(message["code"], message.get("reason"))
597
+ elif message.get("text"):
593
598
  return typing.cast(str, message["text"])
594
599
  else:
595
600
  return typing.cast(bytes, message["bytes"])