truss 0.11.1rc2__tar.gz → 0.11.1rc4__tar.gz

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.

Files changed (407) hide show
  1. {truss-0.11.1rc2 → truss-0.11.1rc4}/PKG-INFO +1 -1
  2. {truss-0.11.1rc2 → truss-0.11.1rc4}/pyproject.toml +1 -1
  3. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/chains_commands.py +1 -1
  4. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/endpoints.py +82 -33
  5. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/requirements.txt +1 -1
  6. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/common/errors.py +1 -0
  7. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/common/tracing.py +24 -0
  8. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/truss_server.py +5 -3
  9. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/control/control/test_endpoints.py +20 -14
  10. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/deployment/deployment_client.py +4 -2
  11. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/public_types.py +1 -0
  12. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/remote_chainlet/utils.py +13 -0
  13. {truss-0.11.1rc2 → truss-0.11.1rc4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  14. {truss-0.11.1rc2 → truss-0.11.1rc4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  15. {truss-0.11.1rc2 → truss-0.11.1rc4}/.github/pull_request_template.md +0 -0
  16. {truss-0.11.1rc2 → truss-0.11.1rc4}/.gitignore +0 -0
  17. {truss-0.11.1rc2 → truss-0.11.1rc4}/CODE_OF_CONDUCT.md +0 -0
  18. {truss-0.11.1rc2 → truss-0.11.1rc4}/CONTRIBUTING.md +0 -0
  19. {truss-0.11.1rc2 → truss-0.11.1rc4}/LICENSE +0 -0
  20. {truss-0.11.1rc2 → truss-0.11.1rc4}/README.md +0 -0
  21. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/README.md +0 -0
  22. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/README.md +0 -0
  23. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/android-arm-eabi/README.md +0 -0
  24. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/android-arm64/README.md +0 -0
  25. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/darwin-arm64/README.md +0 -0
  26. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/darwin-universal/README.md +0 -0
  27. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/darwin-x64/README.md +0 -0
  28. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/freebsd-x64/README.md +0 -0
  29. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/linux-arm-gnueabihf/README.md +0 -0
  30. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/linux-arm-musleabihf/README.md +0 -0
  31. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/linux-arm64-gnu/README.md +0 -0
  32. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/linux-arm64-musl/README.md +0 -0
  33. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/linux-riscv64-gnu/README.md +0 -0
  34. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/linux-x64-gnu/README.md +0 -0
  35. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/linux-x64-musl/README.md +0 -0
  36. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/win32-arm64-msvc/README.md +0 -0
  37. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/win32-ia32-msvc/README.md +0 -0
  38. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/node_bindings/npm/win32-x64-msvc/README.md +0 -0
  39. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/python_bindings/README.md +0 -0
  40. {truss-0.11.1rc2 → truss-0.11.1rc4}/baseten-performance-client/scripts/README_nodejs.md +0 -0
  41. {truss-0.11.1rc2 → truss-0.11.1rc4}/context_builder.Dockerfile +0 -0
  42. {truss-0.11.1rc2 → truss-0.11.1rc4}/docs/README.md +0 -0
  43. {truss-0.11.1rc2 → truss-0.11.1rc4}/docs/chains/doc_gen/README.md +0 -0
  44. {truss-0.11.1rc2 → truss-0.11.1rc4}/docs/contribute/base-images.md +0 -0
  45. {truss-0.11.1rc2 → truss-0.11.1rc4}/docs/contribute/release.md +0 -0
  46. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/__init__.py +0 -0
  47. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/api/__init__.py +0 -0
  48. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/api/definitions.py +0 -0
  49. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/base/__init__.py +0 -0
  50. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/base/constants.py +0 -0
  51. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/base/custom_types.py +0 -0
  52. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/base/errors.py +0 -0
  53. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/base/trt_llm_config.py +0 -0
  54. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/base/truss_config.py +0 -0
  55. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/base/truss_spec.py +0 -0
  56. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/cli.py +0 -0
  57. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/logs/base_watcher.py +0 -0
  58. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/logs/model_log_watcher.py +0 -0
  59. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/logs/training_log_watcher.py +0 -0
  60. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/logs/utils.py +0 -0
  61. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/remote_cli.py +0 -0
  62. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/common.py +0 -0
  63. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/core.py +0 -0
  64. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/deploy_checkpoints/__init__.py +0 -0
  65. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/deploy_checkpoints/deploy_checkpoints.py +0 -0
  66. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/deploy_checkpoints/deploy_checkpoints_helpers.py +0 -0
  67. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/deploy_checkpoints/deploy_full_checkpoints.py +0 -0
  68. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/deploy_checkpoints/deploy_lora_checkpoints.py +0 -0
  69. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/deploy_checkpoints/deploy_whisper_checkpoints.py +0 -0
  70. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/deploy_from_checkpoint_config.yml +0 -0
  71. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/deploy_from_checkpoint_config_whisper.yml +0 -0
  72. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/metrics_watcher.py +0 -0
  73. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/poller.py +0 -0
  74. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train/types.py +0 -0
  75. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/train_commands.py +0 -0
  76. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/utils/common.py +0 -0
  77. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/utils/output.py +0 -0
  78. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/cli/utils/self_upgrade.py +0 -0
  79. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/docker_build_setup.py +0 -0
  80. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/image_builder/cache_warmer.py +0 -0
  81. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/image_builder/image_builder.py +0 -0
  82. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/image_builder/serving_image_builder.py +0 -0
  83. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/image_builder/util.py +0 -0
  84. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/local_loader/docker_build_emulator.py +0 -0
  85. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/local_loader/dockerfile_parser.py +0 -0
  86. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/local_loader/load_model_local.py +0 -0
  87. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/local_loader/truss_module_loader.py +0 -0
  88. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/local_loader/utils.py +0 -0
  89. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/contexts/truss_context.py +0 -0
  90. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/local/local_config.py +0 -0
  91. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/local/local_config_handler.py +0 -0
  92. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/patch/__init__.py +0 -0
  93. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/patch/hash.py +0 -0
  94. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/patch/signature.py +0 -0
  95. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/patch/truss_dir_patch_applier.py +0 -0
  96. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/__init__.py +0 -0
  97. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/api.py +0 -0
  98. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/auth.py +0 -0
  99. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/core.py +0 -0
  100. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/custom_types.py +0 -0
  101. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/error.py +0 -0
  102. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/remote.py +0 -0
  103. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/rest_client.py +0 -0
  104. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/service.py +0 -0
  105. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/utils/status.py +0 -0
  106. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/utils/tar.py +0 -0
  107. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/utils/time.py +0 -0
  108. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/baseten/utils/transfer.py +0 -0
  109. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/remote_factory.py +0 -0
  110. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/remote/truss_remote.py +0 -0
  111. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/README.md.jinja +0 -0
  112. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/__init__.py +0 -0
  113. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/base.Dockerfile.jinja +0 -0
  114. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/cache.Dockerfile.jinja +0 -0
  115. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/cache_requirements.txt +0 -0
  116. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/application.py +0 -0
  117. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/context_managers.py +0 -0
  118. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/custom_types.py +0 -0
  119. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/errors.py +0 -0
  120. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/inference_server_controller.py +0 -0
  121. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/inference_server_process_controller.py +0 -0
  122. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/inference_server_starter.py +0 -0
  123. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/truss_patch/__init__.py +0 -0
  124. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/truss_patch/model_code_patch_applier.py +0 -0
  125. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/truss_patch/model_container_patch_applier.py +0 -0
  126. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/truss_patch/requirement_name_identifier.py +0 -0
  127. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/helpers/truss_patch/system_packages.py +0 -0
  128. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/control/control/server.py +0 -0
  129. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/copy_cache_files.Dockerfile.jinja +0 -0
  130. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/custom/examples.yaml +0 -0
  131. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/custom/model/__init__.py +0 -0
  132. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/custom/model/model.py +0 -0
  133. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/custom_python_dx/my_model.py +0 -0
  134. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/docker_server/proxy.conf.jinja +0 -0
  135. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/docker_server/supervisord.conf.jinja +0 -0
  136. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/docker_server_requirements.txt +0 -0
  137. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/__init__.py +0 -0
  138. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/common/__init__.py +0 -0
  139. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/common/patches/whisper/patch.py +0 -0
  140. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/common/patches.py +0 -0
  141. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/common/retry.py +0 -0
  142. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/common/schema.py +0 -0
  143. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/main.py +0 -0
  144. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/model_wrapper.py +0 -0
  145. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server/requirements.txt +0 -0
  146. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/server.Dockerfile.jinja +0 -0
  147. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/shared/__init__.py +0 -0
  148. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/shared/dynamic_config_resolver.py +0 -0
  149. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/shared/lazy_data_resolver.py +0 -0
  150. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/shared/log_config.py +0 -0
  151. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/shared/secrets_resolver.py +0 -0
  152. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/shared/serialization.py +0 -0
  153. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/shared/util.py +0 -0
  154. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/model/model.py +0 -0
  155. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/packages/sigint_patch.py +0 -0
  156. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/packages/whisper_trt/__init__.py +0 -0
  157. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/packages/whisper_trt/assets.py +0 -0
  158. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/packages/whisper_trt/batching.py +0 -0
  159. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/packages/whisper_trt/custom_types.py +0 -0
  160. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/packages/whisper_trt/modeling.py +0 -0
  161. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/packages/whisper_trt/tokenizer.py +0 -0
  162. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-audio/packages/whisper_trt/utils.py +0 -0
  163. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-briton/README.md +0 -0
  164. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/templates/trtllm-briton/src/extension.py +0 -0
  165. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/__init__.py +0 -0
  166. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/cli/test_cli.py +0 -0
  167. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/cli/train/resources/test_deploy_from_checkpoint_config.yml +0 -0
  168. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/cli/train/test_cache_view.py +0 -0
  169. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/cli/train/test_deploy_checkpoints.py +0 -0
  170. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/cli/train/test_train_cli_core.py +0 -0
  171. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/conftest.py +0 -0
  172. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/contexts/image_builder/test_serving_image_builder.py +0 -0
  173. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/contexts/local_loader/test_load_local.py +0 -0
  174. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/contexts/local_loader/test_truss_module_finder.py +0 -0
  175. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/helpers.py +0 -0
  176. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/local/test_local_config_handler.py +0 -0
  177. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/patch/test_calc_patch.py +0 -0
  178. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/patch/test_dir_signature.py +0 -0
  179. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/patch/test_hash.py +0 -0
  180. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/patch/test_signature.py +0 -0
  181. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/patch/test_truss_dir_patch_applier.py +0 -0
  182. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/patch/test_types.py +0 -0
  183. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/remote/baseten/conftest.py +0 -0
  184. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/remote/baseten/test_api.py +0 -0
  185. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/remote/baseten/test_auth.py +0 -0
  186. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/remote/baseten/test_core.py +0 -0
  187. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/remote/baseten/test_remote.py +0 -0
  188. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/remote/baseten/test_service.py +0 -0
  189. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/remote/test_remote_factory.py +0 -0
  190. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/remote/test_truss_remote.py +0 -0
  191. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/control/control/helpers/test_context_managers.py +0 -0
  192. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/control/control/helpers/test_model_container_patch_applier.py +0 -0
  193. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/control/control/helpers/test_requirement_name_identifier.py +0 -0
  194. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/control/control/test_server.py +0 -0
  195. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/control/control/test_server_integration.py +0 -0
  196. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/core/server/test_dynamic_config_resolver.py +0 -0
  197. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/core/server/test_lazy_data_resolver_v2.py +0 -0
  198. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/core/server/test_secrets_resolver.py +0 -0
  199. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/server/common/test_retry.py +0 -0
  200. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/server/test_model_wrapper.py +0 -0
  201. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/server/test_schema.py +0 -0
  202. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/templates/server/test_truss_server.py +0 -0
  203. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_build.py +0 -0
  204. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_config.py +0 -0
  205. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_context_builder_image.py +0 -0
  206. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_control_truss_patching.py +0 -0
  207. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_custom_server.py +0 -0
  208. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/__init__.py +0 -0
  209. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/annotated_types_truss/__init__.py +0 -0
  210. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/annotated_types_truss/config.yaml +0 -0
  211. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/annotated_types_truss/model/__init__.py +0 -0
  212. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/annotated_types_truss/model/model.py +0 -0
  213. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/auto-mpg.data +0 -0
  214. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/context_builder_image_test/Dockerfile +0 -0
  215. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/context_builder_image_test/__init__.py +0 -0
  216. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/context_builder_image_test/test.py +0 -0
  217. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/gcs_fix/__init__.py +0 -0
  218. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/gcs_fix/config.yaml +0 -0
  219. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/gcs_fix/model/__init__.py +0 -0
  220. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/gcs_fix/model/model.py +0 -0
  221. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/happy.ipynb +0 -0
  222. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/model_load_failure_test/__init__.py +0 -0
  223. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/model_load_failure_test/config.yaml +0 -0
  224. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/model_load_failure_test/model/__init__.py +0 -0
  225. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/model_load_failure_test/model/model.py +0 -0
  226. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/patch_ping_test_server/__init__.py +0 -0
  227. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/patch_ping_test_server/app.py +0 -0
  228. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/pima-indians-diabetes.csv +0 -0
  229. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/readme_int_example.md +0 -0
  230. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/readme_no_example.md +0 -0
  231. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/readme_str_example.md +0 -0
  232. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/server.Dockerfile +0 -0
  233. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/server_conformance_test_truss/__init__.py +0 -0
  234. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/server_conformance_test_truss/config.yaml +0 -0
  235. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/server_conformance_test_truss/model/__init__.py +0 -0
  236. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/server_conformance_test_truss/model/model.py +0 -0
  237. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_async_truss/__init__.py +0 -0
  238. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_async_truss/config.yaml +0 -0
  239. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_async_truss/model/__init__.py +0 -0
  240. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_async_truss/model/model.py +0 -0
  241. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_basic_truss/__init__.py +0 -0
  242. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_basic_truss/config.yaml +0 -0
  243. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_basic_truss/model/__init__.py +0 -0
  244. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_basic_truss/model/model.py +0 -0
  245. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_build_commands/__init__.py +0 -0
  246. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_build_commands/config.yaml +0 -0
  247. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_build_commands/model/__init__.py +0 -0
  248. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_build_commands/model/model.py +0 -0
  249. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_build_commands_failure/__init__.py +0 -0
  250. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_build_commands_failure/config.yaml +0 -0
  251. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_build_commands_failure/model/__init__.py +0 -0
  252. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_build_commands_failure/model/model.py +0 -0
  253. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_concurrency_truss/__init__.py +0 -0
  254. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_concurrency_truss/config.yaml +0 -0
  255. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_concurrency_truss/model/__init__.py +0 -0
  256. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_concurrency_truss/model/model.py +0 -0
  257. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_custom_server_truss/__init__.py +0 -0
  258. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_custom_server_truss/config.yaml +0 -0
  259. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_custom_server_truss/test_docker_image/Dockerfile +0 -0
  260. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_custom_server_truss/test_docker_image/README.md +0 -0
  261. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_custom_server_truss/test_docker_image/VERSION +0 -0
  262. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_custom_server_truss/test_docker_image/__init__.py +0 -0
  263. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_custom_server_truss/test_docker_image/app.py +0 -0
  264. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_custom_server_truss/test_docker_image/build_upload_new_image.sh +0 -0
  265. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_env_vars/config.yaml +0 -0
  266. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_go_custom_server_truss/config.yaml +0 -0
  267. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_go_custom_server_truss/docker/Dockerfile +0 -0
  268. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_go_custom_server_truss/docker/README.md +0 -0
  269. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_go_custom_server_truss/docker/VERSION +0 -0
  270. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_go_custom_server_truss/docker/build_upload_new_image.sh +0 -0
  271. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_go_custom_server_truss/docker/main.go +0 -0
  272. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_openai/__init__.py +0 -0
  273. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_openai/config.yaml +0 -0
  274. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_openai/model/__init__.py +0 -0
  275. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_openai/model/model.py +0 -0
  276. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v1/__init__.py +0 -0
  277. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v1/config.yaml +0 -0
  278. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v1/model/__init__.py +0 -0
  279. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v1/model/model.py +0 -0
  280. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v1/requirements.txt +0 -0
  281. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v2/__init__.py +0 -0
  282. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v2/config.yaml +0 -0
  283. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v2/model/__init__.py +0 -0
  284. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v2/model/model.py +0 -0
  285. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_pyantic_v2/requirements.txt +0 -0
  286. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_requirements_file_truss/__init__.py +0 -0
  287. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_requirements_file_truss/config.yaml +0 -0
  288. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_requirements_file_truss/model/__init__.py +0 -0
  289. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_requirements_file_truss/model/model.py +0 -0
  290. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_requirements_file_truss/requirements.txt +0 -0
  291. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_async_generator_truss/__init__.py +0 -0
  292. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_async_generator_truss/config.yaml +0 -0
  293. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_async_generator_truss/model/__init__.py +0 -0
  294. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_async_generator_truss/model/model.py +0 -0
  295. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_read_timeout/__init__.py +0 -0
  296. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_read_timeout/config.yaml +0 -0
  297. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_read_timeout/model/__init__.py +0 -0
  298. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_read_timeout/model/model.py +0 -0
  299. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss/__init__.py +0 -0
  300. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss/config.yaml +0 -0
  301. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss/model/__init__.py +0 -0
  302. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss/model/model.py +0 -0
  303. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_error/__init__.py +0 -0
  304. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_error/config.yaml +0 -0
  305. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_error/model/__init__.py +0 -0
  306. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_error/model/model.py +0 -0
  307. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_error/packages/__init__.py +0 -0
  308. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_error/packages/helpers_1.py +0 -0
  309. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_error/packages/helpers_2.py +0 -0
  310. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_tracing/__init__.py +0 -0
  311. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_tracing/config.yaml +0 -0
  312. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_tracing/model/__init__.py +0 -0
  313. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_streaming_truss_with_tracing/model/model.py +0 -0
  314. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_trt_llm_truss/__init__.py +0 -0
  315. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_trt_llm_truss/config.yaml +0 -0
  316. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_trt_llm_truss/model/__init__.py +0 -0
  317. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_trt_llm_truss/model/model.py +0 -0
  318. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/__init__.py +0 -0
  319. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/config.yaml +0 -0
  320. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/examples.yaml +0 -0
  321. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/model/__init__.py +0 -0
  322. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/model/dummy +0 -0
  323. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/model/model.py +0 -0
  324. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/packages/__init__.py +0 -0
  325. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/packages/test_package/__init__.py +0 -0
  326. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss/packages/test_package/test.py +0 -0
  327. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_server_model_cache_v1/__init__.py +0 -0
  328. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_server_model_cache_v1/config.yaml +0 -0
  329. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_server_model_cache_v1/model/__init__.py +0 -0
  330. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_server_model_cache_v1/model/model.py +0 -0
  331. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_server_model_cache_v2/__init__.py +0 -0
  332. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_server_model_cache_v2/config.yaml +0 -0
  333. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_server_model_cache_v2/model/__init__.py +0 -0
  334. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_server_model_cache_v2/model/model.py +0 -0
  335. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_with_error/__init__.py +0 -0
  336. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_with_error/config.yaml +0 -0
  337. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_with_error/model/__init__.py +0 -0
  338. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_with_error/model/model.py +0 -0
  339. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_with_error/packages/__init__.py +0 -0
  340. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_with_error/packages/helpers_1.py +0 -0
  341. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_data/test_truss_with_error/packages/helpers_2.py +0 -0
  342. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_docker.py +0 -0
  343. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_model_inference.py +0 -0
  344. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_model_schema.py +0 -0
  345. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_testing_utilities_for_other_tests.py +0 -0
  346. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_truss_gatherer.py +0 -0
  347. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_truss_handle.py +0 -0
  348. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/test_util.py +0 -0
  349. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/trt_llm/test_trt_llm_config.py +0 -0
  350. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/trt_llm/test_validation.py +0 -0
  351. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/util/test_config_checks.py +0 -0
  352. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/util/test_env_vars.py +0 -0
  353. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/tests/util/test_path.py +0 -0
  354. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/trt_llm/config_checks.py +0 -0
  355. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/trt_llm/validation.py +0 -0
  356. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/__init__.py +0 -0
  357. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/build.py +0 -0
  358. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/decorators.py +0 -0
  359. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/__init__.py +0 -0
  360. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/calc_patch.py +0 -0
  361. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/constants.py +0 -0
  362. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/custom_types.py +0 -0
  363. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/dir_signature.py +0 -0
  364. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/hash.py +0 -0
  365. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/local_truss_patch_applier.py +0 -0
  366. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/signature.py +0 -0
  367. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/patch/truss_dir_patch_applier.py +0 -0
  368. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/readme_generator.py +0 -0
  369. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/truss_gatherer.py +0 -0
  370. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/truss_handle/truss_handle.py +0 -0
  371. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/.truss_ignore +0 -0
  372. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/docker.py +0 -0
  373. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/download.py +0 -0
  374. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/env_vars.py +0 -0
  375. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/gpu.py +0 -0
  376. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/jinja.py +0 -0
  377. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/log_utils.py +0 -0
  378. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/notebook.py +0 -0
  379. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/path.py +0 -0
  380. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/requirements.py +0 -0
  381. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss/util/user_config.py +0 -0
  382. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/examples/README.md +0 -0
  383. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/examples/audio-transcription/README.md +0 -0
  384. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/examples/rag/README.md +0 -0
  385. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/tests/itest_chain/requirements.txt +0 -0
  386. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/__init__.py +0 -0
  387. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/deployment/__init__.py +0 -0
  388. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/deployment/code_gen.py +0 -0
  389. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/framework.py +0 -0
  390. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/private_types.py +0 -0
  391. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/public_api.py +0 -0
  392. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/py.typed +0 -0
  393. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/pydantic_numpy.py +0 -0
  394. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/reference_code/reference_chainlet.py +0 -0
  395. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/reference_code/reference_model.py +0 -0
  396. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/remote_chainlet/__init__.py +0 -0
  397. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/remote_chainlet/model_skeleton.py +0 -0
  398. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/remote_chainlet/stub.py +0 -0
  399. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/streaming.py +0 -0
  400. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-chains/truss_chains/utils.py +0 -0
  401. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-train/truss_train/__init__.py +0 -0
  402. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-train/truss_train/definitions.py +0 -0
  403. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-train/truss_train/deployment.py +0 -0
  404. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-train/truss_train/loader.py +0 -0
  405. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-train/truss_train/public_api.py +0 -0
  406. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-transfer/README.md +0 -0
  407. {truss-0.11.1rc2 → truss-0.11.1rc4}/truss-transfer/tests/README.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: truss
3
- Version: 0.11.1rc2
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "truss"
3
- version = "0.11.1rc2"
3
+ version = "0.11.1rc4"
4
4
  description = "A seamless bridge from model development to model delivery"
5
5
  authors = [
6
6
  { name = "Pankaj Gupta", email = "no-reply@baseten.co" },
@@ -359,7 +359,7 @@ def push_chain(
359
359
  "--name",
360
360
  type=str,
361
361
  required=False,
362
- help="Name of the chain to be deployed, if not given, the entrypoint name is used.",
362
+ help="Name of the chain to be watched. If not given, the entrypoint name is used.",
363
363
  )
364
364
  @click.option(
365
365
  "--remote",
@@ -1,14 +1,15 @@
1
1
  import asyncio
2
2
  import logging
3
- from typing import Any, Callable, Dict
3
+ from typing import Any, Callable, Dict, Optional, Protocol
4
4
 
5
5
  import httpx
6
6
  from fastapi import APIRouter, WebSocket
7
7
  from fastapi.responses import JSONResponse, StreamingResponse
8
+ from httpx_ws import AsyncWebSocketSession, WebSocketDisconnect, aconnect_ws
8
9
  from httpx_ws import _exceptions as httpx_ws_exceptions
9
- from httpx_ws import aconnect_ws
10
10
  from starlette.requests import ClientDisconnect, Request
11
11
  from starlette.responses import Response
12
+ from starlette.websockets import WebSocketDisconnect as StartletteWebSocketDisconnect
12
13
  from tenacity import RetryCallState, Retrying, retry_if_exception_type, wait_fixed
13
14
  from wsproto.events import BytesMessage, TextMessage
14
15
 
@@ -29,6 +30,15 @@ BASE_RETRY_EXCEPTIONS = (
29
30
 
30
31
  control_app = APIRouter()
31
32
 
33
+ WEBSOCKET_NORMAL_CLOSURE_CODE = 1000
34
+ WEBSOCKET_SERVER_ERROR_CODE = 1011
35
+
36
+
37
+ class CloseableWebsocket(Protocol):
38
+ async def close(
39
+ self, code: int = WEBSOCKET_NORMAL_CLOSURE_CODE, reason: Optional[str] = None
40
+ ) -> None: ...
41
+
32
42
 
33
43
  @control_app.get("/")
34
44
  def index():
@@ -118,13 +128,79 @@ def inference_retries(
118
128
  yield attempt
119
129
 
120
130
 
121
- async def _safe_close_ws(ws: WebSocket, logger: logging.Logger):
131
+ async def _safe_close_ws(
132
+ ws: CloseableWebsocket,
133
+ logger: logging.Logger,
134
+ code: int,
135
+ reason: Optional[str] = None,
136
+ ):
122
137
  try:
123
- await ws.close()
138
+ await ws.close(code, reason)
124
139
  except RuntimeError as close_error:
125
140
  logger.debug(f"Duplicate close of websocket: `{close_error}`.")
126
141
 
127
142
 
143
+ async def forward_to_server(
144
+ client_ws: WebSocket, server_ws: AsyncWebSocketSession
145
+ ) -> None:
146
+ while True:
147
+ message = await client_ws.receive()
148
+ if message.get("type") == "websocket.disconnect":
149
+ raise StartletteWebSocketDisconnect(
150
+ message.get("code", 1000), message.get("reason")
151
+ )
152
+ if "text" in message:
153
+ await server_ws.send_text(message["text"])
154
+ elif "bytes" in message:
155
+ await server_ws.send_bytes(message["bytes"])
156
+
157
+
158
+ async def forward_to_client(client_ws: WebSocket, server_ws: AsyncWebSocketSession):
159
+ while True:
160
+ message = await server_ws.receive()
161
+ if isinstance(message, TextMessage):
162
+ await client_ws.send_text(message.data)
163
+ elif isinstance(message, BytesMessage):
164
+ await client_ws.send_bytes(message.data)
165
+
166
+
167
+ # NB(nikhil): _handle_websocket_forwarding uses some py311 specific syntax, but in newer
168
+ # versions of truss we're guaranteed to be running the control server with at least that version.
169
+ async def _handle_websocket_forwarding(
170
+ client_ws: WebSocket, server_ws: AsyncWebSocketSession
171
+ ):
172
+ logger = client_ws.app.state.logger
173
+ try:
174
+ async with asyncio.TaskGroup() as tg: # type: ignore[attr-defined]
175
+ tg.create_task(forward_to_client(client_ws, server_ws))
176
+ tg.create_task(forward_to_server(client_ws, server_ws))
177
+ except ExceptionGroup as eg: # type: ignore[name-defined] # noqa: F821
178
+ # NB(nikhil): The first websocket proxy method to raise an error will
179
+ # be surfaced here, and that contains the information we want to forward to the
180
+ # other websocket. Further errors might raise as a result of cancellation, but we
181
+ # can safely ignore those.
182
+ exc = eg.exceptions[0]
183
+ if isinstance(exc, WebSocketDisconnect):
184
+ await _safe_close_ws(client_ws, logger, exc.code, exc.reason)
185
+ elif isinstance(exc, StartletteWebSocketDisconnect):
186
+ await _safe_close_ws(server_ws, logger, exc.code, exc.reason)
187
+ else:
188
+ logger.warning(f"Ungraceful websocket close: {exc}")
189
+ finally:
190
+ # NB(nikhil): In most common cases, both websockets would have been successfully
191
+ # closed with applicable codes above, these lines are just a failsafe.
192
+ await _safe_close_ws(client_ws, logger, code=WEBSOCKET_SERVER_ERROR_CODE)
193
+ await _safe_close_ws(server_ws, logger, code=WEBSOCKET_SERVER_ERROR_CODE)
194
+
195
+
196
+ async def _attempt_websocket_proxy(
197
+ client_ws: WebSocket, proxy_client: httpx.AsyncClient, logger
198
+ ):
199
+ async with aconnect_ws("/v1/websocket", proxy_client) as server_ws: # type: ignore
200
+ await client_ws.accept()
201
+ await _handle_websocket_forwarding(client_ws, server_ws)
202
+
203
+
128
204
  async def proxy_ws(client_ws: WebSocket):
129
205
  proxy_client: httpx.AsyncClient = client_ws.app.state.proxy_client
130
206
  logger = client_ws.app.state.logger
@@ -132,37 +208,10 @@ async def proxy_ws(client_ws: WebSocket):
132
208
  for attempt in inference_retries():
133
209
  with attempt:
134
210
  try:
135
- async with aconnect_ws("/v1/websocket", proxy_client) as server_ws: # type: ignore
136
- # Unfortunate, but FastAPI and httpx-ws have slightly different abstractions
137
- # for sending data, so it's not easy to create a unified wrapper.
138
- async def forward_to_server():
139
- while True:
140
- message = await client_ws.receive()
141
- if message.get("type") == "websocket.disconnect":
142
- break
143
- if "text" in message:
144
- await server_ws.send_text(message["text"])
145
- elif "bytes" in message:
146
- await server_ws.send_bytes(message["bytes"])
147
-
148
- async def forward_to_client():
149
- while True:
150
- message = await server_ws.receive()
151
- if message is None:
152
- break
153
- if isinstance(message, TextMessage):
154
- await client_ws.send_text(message.data)
155
- elif isinstance(message, BytesMessage):
156
- await client_ws.send_bytes(message.data)
157
-
158
- await client_ws.accept()
159
- try:
160
- await asyncio.gather(forward_to_client(), forward_to_server())
161
- finally:
162
- await _safe_close_ws(client_ws, logger)
211
+ await _attempt_websocket_proxy(client_ws, proxy_client, logger)
163
212
  except httpx_ws_exceptions.HTTPXWSException as e:
164
213
  logger.warning(f"WebSocket connection rejected: {e}")
165
- await _safe_close_ws(client_ws, logger)
214
+ await _safe_close_ws(client_ws, logger, WEBSOCKET_SERVER_ERROR_CODE)
166
215
  break
167
216
 
168
217
 
@@ -6,7 +6,7 @@ loguru>=0.7.2
6
6
  python-json-logger>=2.0.2
7
7
  tenacity>=8.1.0
8
8
  # To avoid divergence, this should follow the latest release.
9
- truss==0.9.100
9
+ truss==0.11.1rc3
10
10
  uvicorn>=0.24.0
11
11
  uvloop>=0.19.0
12
12
  websockets>=10.0
@@ -18,6 +18,7 @@ _BASETEN_DOWNSTREAM_ERROR_CODE = 600
18
18
  _BASETEN_CLIENT_ERROR_CODE = 700
19
19
 
20
20
  MODEL_ERROR_MESSAGE = "Internal Server Error (in model/chainlet)."
21
+ WEBSOCKET_SERVER_ERROR_CODE = 1011
21
22
 
22
23
 
23
24
  class ModelMissingError(Exception):
@@ -6,6 +6,7 @@ import pathlib
6
6
  import time
7
7
  from typing import Iterator, List, Optional, Sequence
8
8
 
9
+ import opentelemetry.exporter.otlp.proto.http.trace_exporter as oltp_exporter
9
10
  import opentelemetry.sdk.resources as resources
10
11
  import opentelemetry.sdk.trace as sdk_trace
11
12
  import opentelemetry.sdk.trace.export as trace_export
@@ -15,6 +16,7 @@ from shared import secrets_resolver
15
16
  logger = logging.getLogger(__name__)
16
17
 
17
18
  ATTR_NAME_DURATION = "duration_sec"
19
+ OTEL_EXPORTER_OTLP_ENDPOINT = "OTEL_EXPORTER_OTLP_ENDPOINT"
18
20
  # Writing trace data to a file is only intended for testing / debugging.
19
21
  OTEL_TRACING_NDJSON_FILE = "OTEL_TRACING_NDJSON_FILE"
20
22
  # Exporting trace data to a public honeycomb instance (not our cluster collector)
@@ -65,6 +67,13 @@ def get_truss_tracer(secrets: secrets_resolver.Secrets, config) -> trace.Tracer:
65
67
  return _truss_tracer
66
68
 
67
69
  span_processors: List[sdk_trace.SpanProcessor] = []
70
+ if otlp_endpoint := os.getenv(OTEL_EXPORTER_OTLP_ENDPOINT):
71
+ if enable_tracing_data:
72
+ logger.info(f"Exporting trace data to {OTEL_EXPORTER_OTLP_ENDPOINT}.")
73
+ otlp_exporter = oltp_exporter.OTLPSpanExporter(endpoint=otlp_endpoint)
74
+ otlp_processor = sdk_trace.export.BatchSpanProcessor(otlp_exporter)
75
+ span_processors.append(otlp_processor)
76
+
68
77
  if tracing_log_file := os.getenv(OTEL_TRACING_NDJSON_FILE):
69
78
  if enable_tracing_data:
70
79
  logger.info(f"Exporting trace data to file `{tracing_log_file}`.")
@@ -72,6 +81,21 @@ def get_truss_tracer(secrets: secrets_resolver.Secrets, config) -> trace.Tracer:
72
81
  file_processor = sdk_trace.export.SimpleSpanProcessor(json_file_exporter)
73
82
  span_processors.append(file_processor)
74
83
 
84
+ if (
85
+ honeycomb_dataset := os.getenv(HONEYCOMB_DATASET)
86
+ ) and HONEYCOMB_API_KEY in secrets:
87
+ honeycomb_api_key = secrets[HONEYCOMB_API_KEY]
88
+ logger.info("Exporting trace data to honeycomb.")
89
+ honeycomb_exporter = oltp_exporter.OTLPSpanExporter(
90
+ endpoint="https://api.honeycomb.io/v1/traces",
91
+ headers={
92
+ "x-honeycomb-team": honeycomb_api_key,
93
+ "x-honeycomb-dataset": honeycomb_dataset,
94
+ },
95
+ )
96
+ honeycomb_processor = sdk_trace.export.BatchSpanProcessor(honeycomb_exporter)
97
+ span_processors.append(honeycomb_processor)
98
+
75
99
  if span_processors and enable_tracing_data:
76
100
  logger.info("Instantiating truss tracer.")
77
101
  resource = resources.Resource.create({resources.SERVICE_NAME: "truss-server"})
@@ -76,7 +76,7 @@ async def parse_body(request: Request) -> bytes:
76
76
 
77
77
 
78
78
  async def _safe_close_websocket(
79
- ws: WebSocket, reason: Optional[str], status_code: int = 1000
79
+ ws: WebSocket, status_code: int = 1000, reason: Optional[str] = None
80
80
  ) -> None:
81
81
  try:
82
82
  await ws.close(code=status_code, reason=reason)
@@ -257,14 +257,16 @@ class BasetenEndpoints:
257
257
  try:
258
258
  await ws.accept()
259
259
  await self._model.websocket(ws)
260
- await _safe_close_websocket(ws, None, status_code=1000)
260
+ await _safe_close_websocket(ws, status_code=1000, reason=None)
261
261
  except WebSocketDisconnect as ws_error:
262
262
  logging.info(
263
263
  f"Client terminated websocket connection: `{ws_error}`."
264
264
  )
265
265
  except Exception:
266
266
  await _safe_close_websocket(
267
- ws, errors.MODEL_ERROR_MESSAGE, status_code=1011
267
+ ws,
268
+ status_code=errors.WEBSOCKET_SERVER_ERROR_CODE,
269
+ reason=errors.MODEL_ERROR_MESSAGE,
268
270
  )
269
271
  raise # Re raise to let `intercept_exceptions` deal with it.
270
272
 
@@ -1,4 +1,5 @@
1
- from unittest.mock import AsyncMock, MagicMock, patch
1
+ import asyncio
2
+ from unittest.mock import AsyncMock, MagicMock, call, patch
2
3
 
3
4
  import pytest
4
5
  from fastapi import FastAPI, WebSocket
@@ -31,33 +32,38 @@ def client_ws(app):
31
32
 
32
33
  @pytest.mark.asyncio
33
34
  async def test_proxy_ws_bidirectional_messaging(client_ws):
34
- """Test that both directions of communication work and clean up properly"""
35
- client_ws.receive.side_effect = [
36
- {"type": "websocket.receive", "text": "msg1"},
37
- {"type": "websocket.receive", "text": "msg2"},
38
- {"type": "websocket.disconnect"},
39
- ]
35
+ client_queue = asyncio.Queue()
36
+ client_ws.receive = client_queue.get
40
37
 
38
+ server_queue = asyncio.Queue()
41
39
  mock_server_ws = AsyncMock(spec=AsyncWebSocketSession)
42
- mock_server_ws.receive.side_effect = [
43
- TextMessage(data="response1"),
44
- TextMessage(data="response2"),
45
- None, # server closing connection
46
- ]
40
+ mock_server_ws.receive = server_queue.get
47
41
  mock_server_ws.__aenter__.return_value = mock_server_ws
48
42
  mock_server_ws.__aexit__.return_value = None
49
43
 
44
+ client_queue.put_nowait({"type": "websocket.receive", "text": "msg1"})
45
+ client_queue.put_nowait({"type": "websocket.receive", "text": "msg2"})
46
+ server_queue.put_nowait(TextMessage(data="response1"))
47
+ server_queue.put_nowait(TextMessage(data="response2"))
48
+
50
49
  with patch(
51
50
  "truss.templates.control.control.endpoints.aconnect_ws",
52
51
  return_value=mock_server_ws,
53
52
  ):
54
- await proxy_ws(client_ws)
53
+ proxy_task = asyncio.create_task(proxy_ws(client_ws))
54
+ client_queue.put_nowait(
55
+ {"type": "websocket.disconnect", "code": 1002, "reason": "test-closure"}
56
+ )
57
+
58
+ await proxy_task
55
59
 
56
60
  assert mock_server_ws.send_text.call_count == 2
57
61
  assert mock_server_ws.send_text.call_args_list == [(("msg1",),), (("msg2",),)]
58
62
  assert client_ws.send_text.call_count == 2
59
63
  assert client_ws.send_text.call_args_list == [(("response1",),), (("response2",),)]
60
- client_ws.close.assert_called_once()
64
+
65
+ assert mock_server_ws.close.call_args_list[0] == call(1002, "test-closure")
66
+ client_ws.close.assert_called()
61
67
 
62
68
 
63
69
  @pytest.mark.asyncio
@@ -655,7 +655,9 @@ class _Watcher:
655
655
  with framework.ChainletImporter.import_target(
656
656
  source, entrypoint
657
657
  ) as entrypoint_cls:
658
- self._deployed_chain_name = name or entrypoint_cls.__name__
658
+ self._deployed_chain_name = (
659
+ name or entrypoint_cls.meta_data.chain_name or entrypoint_cls.__name__
660
+ )
659
661
  self._chain_root = _get_chain_root(entrypoint_cls)
660
662
  chainlet_names = set(
661
663
  desc.display_name
@@ -677,7 +679,7 @@ class _Watcher:
677
679
  )
678
680
  if not chain_id:
679
681
  raise public_types.ChainsDeploymentError(
680
- f"Chain `{chain_id}` was not found."
682
+ f"Chain `{self._deployed_chain_name}` was not found."
681
683
  )
682
684
  self._status_page_url = b10_service.URLConfig.status_page_url(
683
685
  self._remote_provider.remote_url, b10_service.URLConfig.CHAIN, chain_id
@@ -473,6 +473,7 @@ class WebSocketProtocol(Protocol):
473
473
 
474
474
  async def close(self, code: int = 1000, reason: Optional[str] = None) -> None: ...
475
475
 
476
+ async def receive(self) -> Union[str, bytes]: ...
476
477
  async def receive_text(self) -> str: ...
477
478
  async def receive_bytes(self) -> bytes: ...
478
479
  async def receive_json(self) -> Any: ...
@@ -11,6 +11,7 @@ import textwrap
11
11
  import threading
12
12
  import time
13
13
  import traceback
14
+ import typing
14
15
  from collections.abc import AsyncIterator
15
16
  from typing import (
16
17
  TYPE_CHECKING,
@@ -586,6 +587,18 @@ class WebsocketWrapperFastAPI:
586
587
  async def close(self, code: int = 1000, reason: Optional[str] = None) -> None:
587
588
  await self._websocket.close(code=code, reason=reason)
588
589
 
590
+ async def receive(self) -> Union[str, bytes]:
591
+ message = await self._websocket.receive()
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"):
598
+ return typing.cast(str, message["text"])
599
+ else:
600
+ return typing.cast(bytes, message["bytes"])
601
+
589
602
  async def receive_text(self) -> str:
590
603
  return await self._websocket.receive_text()
591
604
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes