truss 0.11.12rc505__tar.gz → 0.11.13__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 (414) hide show
  1. {truss-0.11.12rc505 → truss-0.11.13}/PKG-INFO +2 -2
  2. {truss-0.11.12rc505 → truss-0.11.13}/pyproject.toml +2 -2
  3. {truss-0.11.12rc505 → truss-0.11.13}/truss/base/trt_llm_config.py +4 -1
  4. {truss-0.11.12rc505 → truss-0.11.13}/truss/base/truss_config.py +1 -10
  5. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/image_builder/serving_image_builder.py +0 -8
  6. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/base.Dockerfile.jinja +3 -1
  7. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/requirements.txt +1 -1
  8. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server.Dockerfile.jinja +1 -3
  9. truss-0.11.13/truss/templates/shared/lazy_data_resolver.py +365 -0
  10. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/server.Dockerfile +1 -0
  11. truss-0.11.12rc505/truss/templates/shared/lazy_data_resolver.py +0 -153
  12. {truss-0.11.12rc505 → truss-0.11.13}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  13. {truss-0.11.12rc505 → truss-0.11.13}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  14. {truss-0.11.12rc505 → truss-0.11.13}/.github/pull_request_template.md +0 -0
  15. {truss-0.11.12rc505 → truss-0.11.13}/.gitignore +0 -0
  16. {truss-0.11.12rc505 → truss-0.11.13}/CODE_OF_CONDUCT.md +0 -0
  17. {truss-0.11.12rc505 → truss-0.11.13}/CONTRIBUTING.md +0 -0
  18. {truss-0.11.12rc505 → truss-0.11.13}/LICENSE +0 -0
  19. {truss-0.11.12rc505 → truss-0.11.13}/README.md +0 -0
  20. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/README.md +0 -0
  21. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/README.md +0 -0
  22. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/android-arm-eabi/README.md +0 -0
  23. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/android-arm64/README.md +0 -0
  24. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/darwin-arm64/README.md +0 -0
  25. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/darwin-universal/README.md +0 -0
  26. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/darwin-x64/README.md +0 -0
  27. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/freebsd-x64/README.md +0 -0
  28. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/linux-arm-gnueabihf/README.md +0 -0
  29. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/linux-arm-musleabihf/README.md +0 -0
  30. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/linux-arm64-gnu/README.md +0 -0
  31. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/linux-arm64-musl/README.md +0 -0
  32. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/linux-riscv64-gnu/README.md +0 -0
  33. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/linux-x64-gnu/README.md +0 -0
  34. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/linux-x64-musl/README.md +0 -0
  35. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/win32-arm64-msvc/README.md +0 -0
  36. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/win32-ia32-msvc/README.md +0 -0
  37. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/node_bindings/npm/win32-x64-msvc/README.md +0 -0
  38. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/python_bindings/README.md +0 -0
  39. {truss-0.11.12rc505 → truss-0.11.13}/baseten-performance-client/scripts/README_nodejs.md +0 -0
  40. {truss-0.11.12rc505 → truss-0.11.13}/context_builder.Dockerfile +0 -0
  41. {truss-0.11.12rc505 → truss-0.11.13}/docs/README.md +0 -0
  42. {truss-0.11.12rc505 → truss-0.11.13}/docs/chains/doc_gen/README.md +0 -0
  43. {truss-0.11.12rc505 → truss-0.11.13}/docs/contribute/base-images.md +0 -0
  44. {truss-0.11.12rc505 → truss-0.11.13}/docs/contribute/release.md +0 -0
  45. {truss-0.11.12rc505 → truss-0.11.13}/truss/__init__.py +0 -0
  46. {truss-0.11.12rc505 → truss-0.11.13}/truss/api/__init__.py +0 -0
  47. {truss-0.11.12rc505 → truss-0.11.13}/truss/api/definitions.py +0 -0
  48. {truss-0.11.12rc505 → truss-0.11.13}/truss/base/__init__.py +0 -0
  49. {truss-0.11.12rc505 → truss-0.11.13}/truss/base/constants.py +0 -0
  50. {truss-0.11.12rc505 → truss-0.11.13}/truss/base/custom_types.py +0 -0
  51. {truss-0.11.12rc505 → truss-0.11.13}/truss/base/errors.py +0 -0
  52. {truss-0.11.12rc505 → truss-0.11.13}/truss/base/truss_spec.py +0 -0
  53. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/chains_commands.py +0 -0
  54. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/cli.py +0 -0
  55. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/logs/base_watcher.py +0 -0
  56. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/logs/model_log_watcher.py +0 -0
  57. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/logs/training_log_watcher.py +0 -0
  58. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/logs/utils.py +0 -0
  59. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/remote_cli.py +0 -0
  60. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/common.py +0 -0
  61. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/core.py +0 -0
  62. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/deploy_checkpoints/__init__.py +0 -0
  63. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/deploy_checkpoints/deploy_checkpoints.py +0 -0
  64. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/deploy_checkpoints/deploy_checkpoints_helpers.py +0 -0
  65. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/deploy_checkpoints/deploy_full_checkpoints.py +0 -0
  66. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/deploy_checkpoints/deploy_lora_checkpoints.py +0 -0
  67. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/deploy_checkpoints/deploy_whisper_checkpoints.py +0 -0
  68. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/deploy_from_checkpoint_config.yml +0 -0
  69. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/deploy_from_checkpoint_config_whisper.yml +0 -0
  70. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/metrics_watcher.py +0 -0
  71. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/poller.py +0 -0
  72. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train/types.py +0 -0
  73. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/train_commands.py +0 -0
  74. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/utils/common.py +0 -0
  75. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/utils/output.py +0 -0
  76. {truss-0.11.12rc505 → truss-0.11.13}/truss/cli/utils/self_upgrade.py +0 -0
  77. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/docker_build_setup.py +0 -0
  78. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/image_builder/cache_warmer.py +0 -0
  79. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/image_builder/image_builder.py +0 -0
  80. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/image_builder/util.py +0 -0
  81. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/local_loader/docker_build_emulator.py +0 -0
  82. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/local_loader/dockerfile_parser.py +0 -0
  83. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/local_loader/load_model_local.py +0 -0
  84. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/local_loader/truss_module_loader.py +0 -0
  85. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/local_loader/utils.py +0 -0
  86. {truss-0.11.12rc505 → truss-0.11.13}/truss/contexts/truss_context.py +0 -0
  87. {truss-0.11.12rc505 → truss-0.11.13}/truss/local/local_config.py +0 -0
  88. {truss-0.11.12rc505 → truss-0.11.13}/truss/local/local_config_handler.py +0 -0
  89. {truss-0.11.12rc505 → truss-0.11.13}/truss/patch/__init__.py +0 -0
  90. {truss-0.11.12rc505 → truss-0.11.13}/truss/patch/hash.py +0 -0
  91. {truss-0.11.12rc505 → truss-0.11.13}/truss/patch/signature.py +0 -0
  92. {truss-0.11.12rc505 → truss-0.11.13}/truss/patch/truss_dir_patch_applier.py +0 -0
  93. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/__init__.py +0 -0
  94. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/api.py +0 -0
  95. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/auth.py +0 -0
  96. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/core.py +0 -0
  97. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/custom_types.py +0 -0
  98. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/error.py +0 -0
  99. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/remote.py +0 -0
  100. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/rest_client.py +0 -0
  101. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/service.py +0 -0
  102. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/utils/status.py +0 -0
  103. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/utils/tar.py +0 -0
  104. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/utils/time.py +0 -0
  105. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/baseten/utils/transfer.py +0 -0
  106. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/remote_factory.py +0 -0
  107. {truss-0.11.12rc505 → truss-0.11.13}/truss/remote/truss_remote.py +0 -0
  108. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/README.md.jinja +0 -0
  109. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/__init__.py +0 -0
  110. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/cache.Dockerfile.jinja +0 -0
  111. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/cache_requirements.txt +0 -0
  112. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/application.py +0 -0
  113. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/endpoints.py +0 -0
  114. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/context_managers.py +0 -0
  115. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/custom_types.py +0 -0
  116. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/errors.py +0 -0
  117. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/inference_server_controller.py +0 -0
  118. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/inference_server_process_controller.py +0 -0
  119. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/inference_server_starter.py +0 -0
  120. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/truss_patch/__init__.py +0 -0
  121. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/truss_patch/model_code_patch_applier.py +0 -0
  122. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/truss_patch/model_container_patch_applier.py +0 -0
  123. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/truss_patch/requirement_name_identifier.py +0 -0
  124. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/helpers/truss_patch/system_packages.py +0 -0
  125. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/control/server.py +0 -0
  126. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/control/requirements.txt +0 -0
  127. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/copy_cache_files.Dockerfile.jinja +0 -0
  128. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/custom/examples.yaml +0 -0
  129. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/custom/model/__init__.py +0 -0
  130. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/custom/model/model.py +0 -0
  131. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/custom_python_dx/my_model.py +0 -0
  132. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/docker_server/proxy.conf.jinja +0 -0
  133. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/docker_server/supervisord.conf.jinja +0 -0
  134. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/docker_server_requirements.txt +0 -0
  135. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/__init__.py +0 -0
  136. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/common/__init__.py +0 -0
  137. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/common/errors.py +0 -0
  138. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/common/patches/whisper/patch.py +0 -0
  139. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/common/patches.py +0 -0
  140. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/common/retry.py +0 -0
  141. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/common/schema.py +0 -0
  142. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/common/tracing.py +0 -0
  143. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/main.py +0 -0
  144. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/model_wrapper.py +0 -0
  145. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/server/truss_server.py +0 -0
  146. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/shared/__init__.py +0 -0
  147. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/shared/dynamic_config_resolver.py +0 -0
  148. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/shared/log_config.py +0 -0
  149. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/shared/secrets_resolver.py +0 -0
  150. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/shared/serialization.py +0 -0
  151. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/shared/util.py +0 -0
  152. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/train/config.py +0 -0
  153. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/train/run.sh +0 -0
  154. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/model/model.py +0 -0
  155. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/packages/sigint_patch.py +0 -0
  156. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/packages/whisper_trt/__init__.py +0 -0
  157. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/packages/whisper_trt/assets.py +0 -0
  158. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/packages/whisper_trt/batching.py +0 -0
  159. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/packages/whisper_trt/custom_types.py +0 -0
  160. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/packages/whisper_trt/modeling.py +0 -0
  161. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/packages/whisper_trt/tokenizer.py +0 -0
  162. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-audio/packages/whisper_trt/utils.py +0 -0
  163. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-briton/README.md +0 -0
  164. {truss-0.11.12rc505 → truss-0.11.13}/truss/templates/trtllm-briton/src/extension.py +0 -0
  165. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/__init__.py +0 -0
  166. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/cli/test_cli.py +0 -0
  167. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/cli/train/resources/test_deploy_from_checkpoint_config.yml +0 -0
  168. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/cli/train/test_cache_view.py +0 -0
  169. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/cli/train/test_deploy_checkpoints.py +0 -0
  170. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/cli/train/test_train_cli_core.py +0 -0
  171. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/cli/train/test_train_init.py +0 -0
  172. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/conftest.py +0 -0
  173. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/contexts/image_builder/test_serving_image_builder.py +0 -0
  174. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/contexts/local_loader/test_load_local.py +0 -0
  175. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/contexts/local_loader/test_truss_module_finder.py +0 -0
  176. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/helpers.py +0 -0
  177. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/local/test_local_config_handler.py +0 -0
  178. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/patch/test_calc_patch.py +0 -0
  179. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/patch/test_dir_signature.py +0 -0
  180. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/patch/test_hash.py +0 -0
  181. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/patch/test_signature.py +0 -0
  182. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/patch/test_truss_dir_patch_applier.py +0 -0
  183. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/patch/test_types.py +0 -0
  184. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/remote/baseten/conftest.py +0 -0
  185. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/remote/baseten/test_api.py +0 -0
  186. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/remote/baseten/test_auth.py +0 -0
  187. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/remote/baseten/test_core.py +0 -0
  188. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/remote/baseten/test_remote.py +0 -0
  189. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/remote/baseten/test_service.py +0 -0
  190. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/remote/test_remote_factory.py +0 -0
  191. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/remote/test_truss_remote.py +0 -0
  192. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/control/control/conftest.py +0 -0
  193. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/control/control/helpers/test_context_managers.py +0 -0
  194. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/control/control/helpers/test_model_container_patch_applier.py +0 -0
  195. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/control/control/helpers/test_requirement_name_identifier.py +0 -0
  196. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/control/control/test_endpoints.py +0 -0
  197. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/control/control/test_server.py +0 -0
  198. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/control/control/test_server_integration.py +0 -0
  199. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/core/server/test_dynamic_config_resolver.py +0 -0
  200. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/core/server/test_lazy_data_resolver_v2.py +0 -0
  201. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/core/server/test_secrets_resolver.py +0 -0
  202. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/server/common/test_retry.py +0 -0
  203. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/server/test_model_wrapper.py +0 -0
  204. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/server/test_schema.py +0 -0
  205. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/templates/server/test_truss_server.py +0 -0
  206. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_build.py +0 -0
  207. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_config.py +0 -0
  208. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_context_builder_image.py +0 -0
  209. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_control_truss_patching.py +0 -0
  210. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_custom_server.py +0 -0
  211. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/__init__.py +0 -0
  212. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/annotated_types_truss/__init__.py +0 -0
  213. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/annotated_types_truss/config.yaml +0 -0
  214. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/annotated_types_truss/model/__init__.py +0 -0
  215. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/annotated_types_truss/model/model.py +0 -0
  216. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/auto-mpg.data +0 -0
  217. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/context_builder_image_test/Dockerfile +0 -0
  218. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/context_builder_image_test/__init__.py +0 -0
  219. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/context_builder_image_test/test.py +0 -0
  220. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/gcs_fix/__init__.py +0 -0
  221. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/gcs_fix/config.yaml +0 -0
  222. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/gcs_fix/model/__init__.py +0 -0
  223. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/gcs_fix/model/model.py +0 -0
  224. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/happy.ipynb +0 -0
  225. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/model_load_failure_test/__init__.py +0 -0
  226. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/model_load_failure_test/config.yaml +0 -0
  227. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/model_load_failure_test/model/__init__.py +0 -0
  228. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/model_load_failure_test/model/model.py +0 -0
  229. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/patch_ping_test_server/__init__.py +0 -0
  230. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/patch_ping_test_server/app.py +0 -0
  231. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/pima-indians-diabetes.csv +0 -0
  232. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/readme_int_example.md +0 -0
  233. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/readme_no_example.md +0 -0
  234. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/readme_str_example.md +0 -0
  235. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/server_conformance_test_truss/__init__.py +0 -0
  236. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/server_conformance_test_truss/config.yaml +0 -0
  237. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/server_conformance_test_truss/model/__init__.py +0 -0
  238. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/server_conformance_test_truss/model/model.py +0 -0
  239. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_async_truss/__init__.py +0 -0
  240. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_async_truss/config.yaml +0 -0
  241. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_async_truss/model/__init__.py +0 -0
  242. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_async_truss/model/model.py +0 -0
  243. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_basic_truss/__init__.py +0 -0
  244. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_basic_truss/config.yaml +0 -0
  245. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_basic_truss/model/__init__.py +0 -0
  246. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_basic_truss/model/model.py +0 -0
  247. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_build_commands/__init__.py +0 -0
  248. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_build_commands/config.yaml +0 -0
  249. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_build_commands/model/__init__.py +0 -0
  250. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_build_commands/model/model.py +0 -0
  251. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_build_commands_failure/__init__.py +0 -0
  252. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_build_commands_failure/config.yaml +0 -0
  253. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_build_commands_failure/model/__init__.py +0 -0
  254. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_build_commands_failure/model/model.py +0 -0
  255. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_concurrency_truss/__init__.py +0 -0
  256. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_concurrency_truss/config.yaml +0 -0
  257. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_concurrency_truss/model/__init__.py +0 -0
  258. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_concurrency_truss/model/model.py +0 -0
  259. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_custom_server_truss/__init__.py +0 -0
  260. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_custom_server_truss/config.yaml +0 -0
  261. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_custom_server_truss/test_docker_image/Dockerfile +0 -0
  262. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_custom_server_truss/test_docker_image/README.md +0 -0
  263. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_custom_server_truss/test_docker_image/VERSION +0 -0
  264. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_custom_server_truss/test_docker_image/__init__.py +0 -0
  265. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_custom_server_truss/test_docker_image/app.py +0 -0
  266. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_custom_server_truss/test_docker_image/build_upload_new_image.sh +0 -0
  267. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_env_vars/config.yaml +0 -0
  268. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_go_custom_server_truss/config.yaml +0 -0
  269. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_go_custom_server_truss/docker/Dockerfile +0 -0
  270. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_go_custom_server_truss/docker/README.md +0 -0
  271. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_go_custom_server_truss/docker/VERSION +0 -0
  272. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_go_custom_server_truss/docker/build_upload_new_image.sh +0 -0
  273. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_go_custom_server_truss/docker/main.go +0 -0
  274. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_openai/__init__.py +0 -0
  275. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_openai/config.yaml +0 -0
  276. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_openai/model/__init__.py +0 -0
  277. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_openai/model/model.py +0 -0
  278. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v1/__init__.py +0 -0
  279. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v1/config.yaml +0 -0
  280. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v1/model/__init__.py +0 -0
  281. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v1/model/model.py +0 -0
  282. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v1/requirements.txt +0 -0
  283. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v2/__init__.py +0 -0
  284. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v2/config.yaml +0 -0
  285. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v2/model/__init__.py +0 -0
  286. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v2/model/model.py +0 -0
  287. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_pyantic_v2/requirements.txt +0 -0
  288. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_requirements_file_truss/__init__.py +0 -0
  289. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_requirements_file_truss/config.yaml +0 -0
  290. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_requirements_file_truss/model/__init__.py +0 -0
  291. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_requirements_file_truss/model/model.py +0 -0
  292. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_requirements_file_truss/requirements.txt +0 -0
  293. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_async_generator_truss/__init__.py +0 -0
  294. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_async_generator_truss/config.yaml +0 -0
  295. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_async_generator_truss/model/__init__.py +0 -0
  296. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_async_generator_truss/model/model.py +0 -0
  297. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_read_timeout/__init__.py +0 -0
  298. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_read_timeout/config.yaml +0 -0
  299. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_read_timeout/model/__init__.py +0 -0
  300. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_read_timeout/model/model.py +0 -0
  301. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss/__init__.py +0 -0
  302. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss/config.yaml +0 -0
  303. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss/model/__init__.py +0 -0
  304. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss/model/model.py +0 -0
  305. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_error/__init__.py +0 -0
  306. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_error/config.yaml +0 -0
  307. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_error/model/__init__.py +0 -0
  308. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_error/model/model.py +0 -0
  309. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_error/packages/__init__.py +0 -0
  310. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_error/packages/helpers_1.py +0 -0
  311. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_error/packages/helpers_2.py +0 -0
  312. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_tracing/__init__.py +0 -0
  313. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_tracing/config.yaml +0 -0
  314. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_tracing/model/__init__.py +0 -0
  315. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_streaming_truss_with_tracing/model/model.py +0 -0
  316. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_trt_llm_truss/__init__.py +0 -0
  317. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_trt_llm_truss/config.yaml +0 -0
  318. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_trt_llm_truss/model/__init__.py +0 -0
  319. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_trt_llm_truss/model/model.py +0 -0
  320. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/__init__.py +0 -0
  321. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/config.yaml +0 -0
  322. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/examples.yaml +0 -0
  323. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/model/__init__.py +0 -0
  324. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/model/dummy +0 -0
  325. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/model/model.py +0 -0
  326. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/packages/__init__.py +0 -0
  327. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/packages/test_package/__init__.py +0 -0
  328. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss/packages/test_package/test.py +0 -0
  329. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_server_model_cache_v1/__init__.py +0 -0
  330. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_server_model_cache_v1/config.yaml +0 -0
  331. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_server_model_cache_v1/model/__init__.py +0 -0
  332. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_server_model_cache_v1/model/model.py +0 -0
  333. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_server_model_cache_v2/__init__.py +0 -0
  334. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_server_model_cache_v2/config.yaml +0 -0
  335. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_server_model_cache_v2/model/__init__.py +0 -0
  336. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_server_model_cache_v2/model/model.py +0 -0
  337. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_with_error/__init__.py +0 -0
  338. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_with_error/config.yaml +0 -0
  339. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_with_error/model/__init__.py +0 -0
  340. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_with_error/model/model.py +0 -0
  341. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_with_error/packages/__init__.py +0 -0
  342. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_with_error/packages/helpers_1.py +0 -0
  343. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_data/test_truss_with_error/packages/helpers_2.py +0 -0
  344. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_docker.py +0 -0
  345. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_model_inference.py +0 -0
  346. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_model_schema.py +0 -0
  347. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_testing_utilities_for_other_tests.py +0 -0
  348. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_truss_gatherer.py +0 -0
  349. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_truss_handle.py +0 -0
  350. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/test_util.py +0 -0
  351. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/trt_llm/test_trt_llm_config.py +0 -0
  352. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/trt_llm/test_validation.py +0 -0
  353. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/util/test_config_checks.py +0 -0
  354. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/util/test_env_vars.py +0 -0
  355. {truss-0.11.12rc505 → truss-0.11.13}/truss/tests/util/test_path.py +0 -0
  356. {truss-0.11.12rc505 → truss-0.11.13}/truss/trt_llm/config_checks.py +0 -0
  357. {truss-0.11.12rc505 → truss-0.11.13}/truss/trt_llm/validation.py +0 -0
  358. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/__init__.py +0 -0
  359. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/build.py +0 -0
  360. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/decorators.py +0 -0
  361. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/__init__.py +0 -0
  362. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/calc_patch.py +0 -0
  363. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/constants.py +0 -0
  364. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/custom_types.py +0 -0
  365. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/dir_signature.py +0 -0
  366. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/hash.py +0 -0
  367. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/local_truss_patch_applier.py +0 -0
  368. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/signature.py +0 -0
  369. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/patch/truss_dir_patch_applier.py +0 -0
  370. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/readme_generator.py +0 -0
  371. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/truss_gatherer.py +0 -0
  372. {truss-0.11.12rc505 → truss-0.11.13}/truss/truss_handle/truss_handle.py +0 -0
  373. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/.truss_ignore +0 -0
  374. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/__init__.py +0 -0
  375. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/docker.py +0 -0
  376. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/download.py +0 -0
  377. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/env_vars.py +0 -0
  378. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/gpu.py +0 -0
  379. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/jinja.py +0 -0
  380. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/log_utils.py +0 -0
  381. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/notebook.py +0 -0
  382. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/path.py +0 -0
  383. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/requirements.py +0 -0
  384. {truss-0.11.12rc505 → truss-0.11.13}/truss/util/user_config.py +0 -0
  385. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/examples/README.md +0 -0
  386. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/examples/audio-transcription/README.md +0 -0
  387. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/examples/rag/README.md +0 -0
  388. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/tests/itest_chain/requirements.txt +0 -0
  389. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/__init__.py +0 -0
  390. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/deployment/__init__.py +0 -0
  391. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/deployment/code_gen.py +0 -0
  392. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/deployment/deployment_client.py +0 -0
  393. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/framework.py +0 -0
  394. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/private_types.py +0 -0
  395. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/public_api.py +0 -0
  396. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/public_types.py +0 -0
  397. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/py.typed +0 -0
  398. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/pydantic_numpy.py +0 -0
  399. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/reference_code/reference_chainlet.py +0 -0
  400. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/reference_code/reference_model.py +0 -0
  401. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/remote_chainlet/__init__.py +0 -0
  402. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/remote_chainlet/model_skeleton.py +0 -0
  403. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/remote_chainlet/stub.py +0 -0
  404. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/remote_chainlet/utils.py +0 -0
  405. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/streaming.py +0 -0
  406. {truss-0.11.12rc505 → truss-0.11.13}/truss-chains/truss_chains/utils.py +0 -0
  407. {truss-0.11.12rc505 → truss-0.11.13}/truss-train/truss_train/__init__.py +0 -0
  408. {truss-0.11.12rc505 → truss-0.11.13}/truss-train/truss_train/definitions.py +0 -0
  409. {truss-0.11.12rc505 → truss-0.11.13}/truss-train/truss_train/deployment.py +0 -0
  410. {truss-0.11.12rc505 → truss-0.11.13}/truss-train/truss_train/loader.py +0 -0
  411. {truss-0.11.12rc505 → truss-0.11.13}/truss-train/truss_train/public_api.py +0 -0
  412. {truss-0.11.12rc505 → truss-0.11.13}/truss-train/truss_train/restore_from_checkpoint.py +0 -0
  413. {truss-0.11.12rc505 → truss-0.11.13}/truss-transfer/README.md +0 -0
  414. {truss-0.11.12rc505 → truss-0.11.13}/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.12rc505
3
+ Version: 0.11.13
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
@@ -37,7 +37,7 @@ Requires-Dist: rich<14,>=13.4.2
37
37
  Requires-Dist: ruff>=0.4.8
38
38
  Requires-Dist: tenacity>=8.0.1
39
39
  Requires-Dist: tomlkit>=0.13.2
40
- Requires-Dist: truss-transfer<0.0.37,>=0.0.32
40
+ Requires-Dist: truss-transfer<0.0.40,>=0.0.37
41
41
  Requires-Dist: watchfiles<0.20,>=0.19.0
42
42
  Description-Content-Type: text/markdown
43
43
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "truss"
3
- version = "0.11.12rc505"
3
+ version = "0.11.13"
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" },
@@ -43,7 +43,7 @@ dependencies = [
43
43
  "ruff>=0.4.8",
44
44
  "tenacity>=8.0.1",
45
45
  "watchfiles>=0.19.0,<0.20",
46
- "truss-transfer>=0.0.32,<0.0.37",
46
+ "truss-transfer>=0.0.37,<0.0.40",
47
47
  ]
48
48
 
49
49
  [project.urls]
@@ -68,6 +68,7 @@ class TrussTRTLLMQuantizationType(str, Enum):
68
68
  FP8_KV = "fp8_kv"
69
69
  FP4 = "fp4"
70
70
  FP4_KV = "fp4_kv"
71
+ FP4_MLP_ONLY = "fp4_mlp_only"
71
72
 
72
73
 
73
74
  class TrussTRTLLMPluginConfiguration(PydanticTrTBaseModel):
@@ -713,7 +714,9 @@ def trt_llm_common_validation(config: "TrussConfig"):
713
714
  "accelerators or newer (CUDA_COMPUTE>=89)"
714
715
  )
715
716
  elif trt_llm_config.build.quantization_type in [
716
- TrussTRTLLMQuantizationType.FP4
717
+ TrussTRTLLMQuantizationType.FP4,
718
+ TrussTRTLLMQuantizationType.FP4_KV,
719
+ TrussTRTLLMQuantizationType.FP4_MLP_ONLY,
717
720
  ] and config.resources.accelerator.accelerator in [
718
721
  truss_config.Accelerator.H100,
719
722
  truss_config.Accelerator.L4,
@@ -541,20 +541,11 @@ class BaseImage(custom_types.ConfigModel):
541
541
 
542
542
 
543
543
  class DockerServer(custom_types.ConfigModel):
544
- start_command: Optional[str] = None
544
+ start_command: str
545
545
  server_port: int
546
546
  predict_endpoint: str
547
547
  readiness_endpoint: str
548
548
  liveness_endpoint: str
549
- as_is: Optional[bool] = None
550
-
551
- @pydantic.model_validator(mode="after")
552
- def _validate_start_command(self) -> "DockerServer":
553
- if not self.as_is and self.start_command is None:
554
- raise ValueError(
555
- "start_command is required when as_is is not true"
556
- )
557
- return self
558
549
 
559
550
 
560
551
  class TrainingArtifactReference(custom_types.ConfigModel):
@@ -750,14 +750,6 @@ class ServingImageBuilder(ImageBuilder):
750
750
  build_commands: List[str],
751
751
  ):
752
752
  config = self._spec.config
753
- ff_as_is = os.getenv("BT_AS_IS_DEPLOYMENT", False)
754
- # Escape hatch for as-is deployments
755
- if ff_as_is and config.docker_server and config.docker_server.as_is:
756
- dockerfile_contents = f"FROM {config.base_image.image}"
757
- docker_file_path = build_dir / MODEL_DOCKERFILE_NAME
758
- docker_file_path.write_text(dockerfile_contents)
759
- return
760
-
761
753
  data_dir = build_dir / config.data_dir
762
754
  model_dir = build_dir / config.model_module_dir
763
755
  bundled_packages_dir = build_dir / config.bundled_packages_dir
@@ -115,9 +115,11 @@ WORKDIR $APP_HOME
115
115
  {% endblock %}
116
116
 
117
117
 
118
+ {% set packages_dir = "/packages" %}
119
+ RUN mkdir -p {{ packages_dir }}
118
120
  {% block bundled_packages_copy %}
119
121
  {%- if bundled_packages_dir_exists %}
120
- COPY --chown={{ default_owner }} ./{{ config.bundled_packages_dir }} /packages
122
+ COPY --chown={{ default_owner }} ./{{ config.bundled_packages_dir }} {{ packages_dir }}
121
123
  {%- endif %}
122
124
  {% endblock %}
123
125
 
@@ -18,7 +18,7 @@ psutil>=5.9.4
18
18
  python-json-logger>=2.0.2
19
19
  pyyaml>=6.0.0
20
20
  requests>=2.31.0
21
- truss-transfer==0.0.36
21
+ truss-transfer==0.0.37
22
22
  uvicorn>=0.24.0
23
23
  uvloop>=0.19.0
24
24
  websockets>=10.0
@@ -69,7 +69,7 @@ COPY --chown={{ default_owner }} ./{{ config.data_dir }} ${APP_HOME}/data
69
69
 
70
70
  {%- if model_cache_v2 %}
71
71
  {# v0.0.9, keep synced with server_requirements.txt #}
72
- RUN curl -sSL --fail --retry 5 --retry-delay 2 -o /usr/local/bin/truss-transfer-cli https://github.com/basetenlabs/truss/releases/download/v0.11.12rc4/truss-transfer-cli-v0.11.12rc4-linux-x86_64-unknown-linux-musl
72
+ RUN curl -sSL --fail --retry 5 --retry-delay 2 -o /usr/local/bin/truss-transfer-cli https://github.com/basetenlabs/truss/releases/download/v0.11.13rc3/truss-transfer-cli-v0.11.13rc3-linux-x86_64-unknown-linux-musl
73
73
  RUN chmod +x /usr/local/bin/truss-transfer-cli
74
74
  RUN mkdir /static-bptr
75
75
  RUN echo "hash {{model_cache_hash}}"
@@ -104,8 +104,6 @@ COPY --chown={{ default_owner }} ./{{ config.model_module_dir }} ${APP_HOME}/mod
104
104
  {# Macro to change ownership of directories and switch to regular user #}
105
105
  {%- macro chown_and_switch_to_regular_user_if_enabled(additional_chown_dirs=[]) -%}
106
106
  {%- if non_root_user %}
107
- {% set packages_dir = "/packages" %}
108
- RUN mkdir -p {{ packages_dir }}
109
107
  RUN chown -R {{ app_username }}:{{ app_username }} ${HOME} ${APP_HOME} {{ packages_dir }} {% for dir in additional_chown_dirs %}{{ dir }} {% endfor %}
110
108
  USER {{ app_username }}
111
109
  {%- endif %} {#- endif non_root_user #}
@@ -0,0 +1,365 @@
1
+ import atexit
2
+ import json
3
+ import logging
4
+ import time
5
+ from dataclasses import dataclass
6
+ from functools import lru_cache
7
+ from pathlib import Path
8
+ from threading import Lock, Thread
9
+ from typing import List, Optional, Union
10
+
11
+ try:
12
+ from prometheus_client import Counter, Gauge, Histogram
13
+
14
+ PROMETHEUS_AVAILABLE = True
15
+ except ImportError:
16
+ PROMETHEUS_AVAILABLE = False
17
+ METRICS_REGISTERED = False
18
+
19
+
20
+ @dataclass(frozen=True)
21
+ class FileDownloadMetric:
22
+ file_name: str
23
+ file_size_bytes: int
24
+ download_time_secs: float
25
+ download_speed_mb_s: float
26
+
27
+
28
+ @dataclass(frozen=True)
29
+ class TrussTransferStats:
30
+ total_manifest_size_bytes: int
31
+ total_download_time_secs: float
32
+ total_aggregated_mb_s: Optional[float]
33
+ file_downloads: List[FileDownloadMetric]
34
+ b10fs_read_speed_mbps: Optional[float]
35
+ b10fs_decision_to_use: bool
36
+ b10fs_enabled: bool
37
+ b10fs_hot_starts_files: int
38
+ b10fs_hot_starts_bytes: int
39
+ b10fs_cold_starts_files: int
40
+ b10fs_cold_starts_bytes: int
41
+ success: bool
42
+ timestamp: int
43
+
44
+ @classmethod
45
+ def from_json_file(cls, path: Path) -> Optional["TrussTransferStats"]:
46
+ if not path.exists():
47
+ return None
48
+ try:
49
+ with open(path) as f:
50
+ data = json.load(f)
51
+ file_downloads = [
52
+ FileDownloadMetric(**fd) for fd in data.get("file_downloads", [])
53
+ ]
54
+ return cls(
55
+ total_manifest_size_bytes=data["total_manifest_size_bytes"],
56
+ total_download_time_secs=data["total_download_time_secs"],
57
+ total_aggregated_mb_s=data.get("total_aggregated_mb_s"),
58
+ file_downloads=file_downloads,
59
+ b10fs_read_speed_mbps=data.get("b10fs_read_speed_mbps"),
60
+ b10fs_decision_to_use=data["b10fs_decision_to_use"],
61
+ b10fs_enabled=data["b10fs_enabled"],
62
+ b10fs_hot_starts_files=data["b10fs_hot_starts_files"],
63
+ b10fs_hot_starts_bytes=data["b10fs_hot_starts_bytes"],
64
+ b10fs_cold_starts_files=data["b10fs_cold_starts_files"],
65
+ b10fs_cold_starts_bytes=data["b10fs_cold_starts_bytes"],
66
+ success=data["success"],
67
+ timestamp=data["timestamp"],
68
+ )
69
+ except Exception:
70
+ return None
71
+
72
+ def publish_to_prometheus(self, hidden_time: float = 0.0):
73
+ """Publish transfer stats to Prometheus metrics. Only runs once."""
74
+ if not PROMETHEUS_AVAILABLE:
75
+ return
76
+ global METRICS_REGISTERED
77
+
78
+ if METRICS_REGISTERED:
79
+ logging.info(
80
+ "Model cache metrics already registered, skipping."
81
+ ) # this should never happen
82
+ return
83
+ else:
84
+ # Ensure metrics are only registered once
85
+ METRICS_REGISTERED = True
86
+
87
+ # Define metrics with model_cache prefix
88
+ manifest_size_gauge = Gauge(
89
+ "model_cache_manifest_size_bytes", "Total manifest size in bytes"
90
+ )
91
+ # histograms have intentially wide buckets to capture a variety of download times
92
+ download_time_histogram = Histogram(
93
+ "model_cache_download_time_seconds",
94
+ "Total download time in seconds",
95
+ buckets=[0]
96
+ + [
97
+ 2**i
98
+ for i in range(-3, 11) # = [0.125, .. 2048] seconds
99
+ ]
100
+ + [float("inf")],
101
+ )
102
+ download_speed_gauge = Gauge(
103
+ "model_cache_download_speed_mbps", "Aggregated download speed in MB/s"
104
+ )
105
+
106
+ # File download metrics (aggregated)
107
+ files_downloaded_counter = Counter(
108
+ "model_cache_files_downloaded_total", "Total number of files downloaded"
109
+ )
110
+ total_file_size_counter = Counter(
111
+ "model_cache_file_size_bytes_total",
112
+ "Total size of downloaded files in bytes",
113
+ )
114
+ file_download_hidden_time_gauge = Gauge(
115
+ "model_cache_file_download_hidden_time_seconds",
116
+ "Total time hidden from user by starting the import before user code (seconds)",
117
+ )
118
+ file_download_time_histogram = Histogram(
119
+ "model_cache_file_download_time_seconds",
120
+ "File download time distribution",
121
+ buckets=[0]
122
+ + [
123
+ 2**i
124
+ for i in range(-3, 11) # = [0.125, .. 2048] seconds
125
+ ]
126
+ + [float("inf")],
127
+ )
128
+ file_download_speed_histogram = Histogram(
129
+ "model_cache_file_download_speed_mbps",
130
+ "File download speed distribution",
131
+ buckets=[0]
132
+ + [
133
+ 2**i
134
+ for i in range(-1, 12) # = [0.5, .. 4096] MB/s
135
+ ]
136
+ + [float("inf")],
137
+ )
138
+
139
+ # B10FS specific metrics
140
+ b10fs_enabled_gauge = Gauge(
141
+ "model_cache_b10fs_enabled", "Whether B10FS is enabled"
142
+ )
143
+ b10fs_decision_gauge = Gauge(
144
+ "model_cache_b10fs_decision_to_use", "Whether B10FS was chosen for use"
145
+ )
146
+ b10fs_read_speed_gauge = Gauge(
147
+ "model_cache_b10fs_read_speed_mbps", "B10FS read speed in Mbps"
148
+ )
149
+ b10fs_hot_files_gauge = Gauge(
150
+ "model_cache_b10fs_hot_starts_files", "Number of hot start files"
151
+ )
152
+ b10fs_hot_bytes_gauge = Gauge(
153
+ "model_cache_b10fs_hot_starts_bytes", "Number of hot start bytes"
154
+ )
155
+ b10fs_cold_files_gauge = Gauge(
156
+ "model_cache_b10fs_cold_starts_files", "Number of cold start files"
157
+ )
158
+ b10fs_cold_bytes_gauge = Gauge(
159
+ "model_cache_b10fs_cold_starts_bytes", "Number of cold start bytes"
160
+ )
161
+
162
+ # Transfer success metric
163
+ transfer_success_counter = Counter(
164
+ "model_cache_transfer_success_total",
165
+ "Total successful transfers",
166
+ ["success"],
167
+ )
168
+
169
+ # Set main transfer metrics
170
+ manifest_size_gauge.set(self.total_manifest_size_bytes)
171
+ download_time_histogram.observe(self.total_download_time_secs)
172
+ file_download_hidden_time_gauge.set(hidden_time)
173
+
174
+ if self.total_aggregated_mb_s is not None:
175
+ download_speed_gauge.set(self.total_aggregated_mb_s)
176
+
177
+ # Aggregate file download metrics
178
+ total_files = len(self.file_downloads)
179
+ total_file_bytes = sum(fd.file_size_bytes for fd in self.file_downloads)
180
+
181
+ files_downloaded_counter.inc(total_files)
182
+ total_file_size_counter.inc(total_file_bytes)
183
+
184
+ # Record individual file metrics for distribution
185
+ for fd in self.file_downloads:
186
+ if fd.file_size_bytes > 1 * 1024 * 1024: # Only log files larger than 1MB
187
+ file_download_time_histogram.observe(fd.download_time_secs)
188
+ file_download_speed_histogram.observe(fd.download_speed_mb_s)
189
+
190
+ # B10FS metrics
191
+ b10fs_enabled_gauge.set(1 if self.b10fs_enabled else 0)
192
+ b10fs_decision_gauge.set(1 if self.b10fs_decision_to_use else 0)
193
+
194
+ if self.b10fs_read_speed_mbps is not None:
195
+ b10fs_read_speed_gauge.set(self.b10fs_read_speed_mbps)
196
+
197
+ b10fs_hot_files_gauge.set(self.b10fs_hot_starts_files)
198
+ b10fs_hot_bytes_gauge.set(self.b10fs_hot_starts_bytes)
199
+ b10fs_cold_files_gauge.set(self.b10fs_cold_starts_files)
200
+ b10fs_cold_bytes_gauge.set(self.b10fs_cold_starts_bytes)
201
+
202
+ # Success metric
203
+ transfer_success_counter.labels(success=str(self.success)).inc()
204
+
205
+
206
+ LAZY_DATA_RESOLVER_PATH = [
207
+ # synced with pub static LAZY_DATA_RESOLVER_PATHS: &[&str]
208
+ Path("/bptr/bptr-manifest"),
209
+ Path("/bptr/bptr-manifest.json"),
210
+ Path("/static-bptr/static-bptr-manifest.json"),
211
+ ]
212
+
213
+ MISSING_COLLECTION_MESSAGE = """model_cache: Data was not collected. Missing lazy_data_resolver.block_until_download_complete().
214
+ This is a potential bug by the user implementation of model.py when using model_cache.
215
+ We need you to call the block_until_download_complete() method during __init__ or load() method of your model.
216
+ Please implement the following pattern when using model_cache.
217
+ ```
218
+ import torch
219
+
220
+ class Model:
221
+ def __init__(self, *args, **kwargs):
222
+ self._lazy_data_resolver = kwargs["lazy_data_resolver"]
223
+
224
+ def load():
225
+ # work that does not require the download may be done here
226
+ random_vector = torch.randn(1000)
227
+ # important to collect the download before using any incomplete data
228
+ self._lazy_data_resolver.block_until_download_complete()
229
+ # after the call, you may use the /app/model_cache directory
230
+ torch.load(
231
+ "/app/model_cache/your_model.pt"
232
+ ) * random_vector
233
+ ```
234
+ """
235
+
236
+
237
+ class LazyDataResolverV2:
238
+ """Lazy data resolver pre-fetches data in a separate thread.
239
+ It uses a lock to ensure that the data is only fetched once
240
+ and that the thread is not blocked by other threads.
241
+ """
242
+
243
+ def __init__(self, data_dir: Path, logger: Optional[logging.Logger] = None):
244
+ self._data_dir = data_dir
245
+ self._lock = Lock()
246
+ self._start_time = time.time()
247
+ self.logger = logger or logging.getLogger(__name__)
248
+ self._is_collected_by_user = not self.bptr_exists()
249
+ thread = Thread(target=self._prefetch_in_thread, daemon=True)
250
+ thread.start()
251
+
252
+ def print_error_message_on_exit_if_not_collected():
253
+ try:
254
+ if not self._is_collected_by_user and thread.is_alive():
255
+ # if thread is still alive, and the user has not called collect,
256
+ # the download in flight could have been the core issue
257
+ self.logger.warning(
258
+ "An error was detected while the data was still being downloaded. "
259
+ + MISSING_COLLECTION_MESSAGE
260
+ )
261
+ except Exception as e:
262
+ print("Error while printing error message on exit:", e)
263
+
264
+ atexit.register(print_error_message_on_exit_if_not_collected)
265
+
266
+ @staticmethod
267
+ def bptr_exists():
268
+ """Check if the bptr manifest file exists."""
269
+ return any(path.exists() for path in LAZY_DATA_RESOLVER_PATH)
270
+
271
+ def _prefetch_in_thread(self):
272
+ """Invokes the download ahead of time, before user doubles down on the download"""
273
+ result = self.block_until_download_complete(
274
+ log_stats=False, issue_collect=False
275
+ )
276
+ if not result:
277
+ # no data to resolve, no need to collect
278
+ self._is_collected_by_user = True
279
+ return None
280
+ # verify the user has called collect.
281
+ if not self._is_collected_by_user and time.time() - self._start_time > 20:
282
+ # issue a warning if the user has not collected after 20 seconds.
283
+ # skip for small downloads that are less than 20 seconds
284
+ # as the user might have a lot of work before is able to call collect.
285
+ self.logger.warning(MISSING_COLLECTION_MESSAGE)
286
+ time.sleep(0.5)
287
+
288
+ @lru_cache(maxsize=None)
289
+ def _fetch(self) -> Union[str, Exception]:
290
+ """cached and locked method to fetch the data."""
291
+ if not self.bptr_exists():
292
+ return "" # no data to resolve
293
+ import truss_transfer
294
+
295
+ try:
296
+ return truss_transfer.lazy_data_resolve(str(self._data_dir))
297
+ except Exception as e:
298
+ self.logger.error(f"Error occurred while fetching data: {e}")
299
+ return e
300
+
301
+ def raise_if_not_collected(self):
302
+ """We require the user to call `block_until_download_complete` before using the data.
303
+ If the user has not called the method during load, we raise an error.
304
+ """
305
+ if not self._is_collected_by_user:
306
+ raise RuntimeError(MISSING_COLLECTION_MESSAGE)
307
+
308
+ def block_until_download_complete(
309
+ self, log_stats: bool = True, issue_collect: bool = True
310
+ ) -> str:
311
+ """Once called, blocks until the data has been downloaded.
312
+
313
+ example usage:
314
+ ```
315
+ import torch
316
+
317
+ class Model:
318
+ def __init__(self, *args, **kwargs):
319
+ self._lazy_data_resolver = kwargs["lazy_data_resolver"]
320
+
321
+ def load():
322
+ random_vector = torch.randn(1000)
323
+ # important to collect the download before using any incomplete data
324
+ self._lazy_data_resolver.block_until_download_complete()
325
+ ```
326
+
327
+ """
328
+ start_lock = time.time()
329
+ publish_stats = (
330
+ log_stats and not self._is_collected_by_user
331
+ ) # only publish results once per resolver
332
+ self._is_collected_by_user = issue_collect or self._is_collected_by_user
333
+ with self._lock:
334
+ result = self._fetch()
335
+ if isinstance(result, Exception):
336
+ raise RuntimeError(
337
+ f"Error occurred while fetching data: {result}"
338
+ ) from result
339
+ if log_stats and result:
340
+ # TODO: instument the stats, which are written to /tmp/truss_transfer_stats.json
341
+ # also add fetch time, and blocking time
342
+ # TrussTransferStats
343
+ fetch_t = time.time() - self._start_time
344
+ start_lock_t = time.time() - start_lock
345
+ stats = TrussTransferStats.from_json_file(
346
+ Path("/tmp/truss_transfer_stats.json")
347
+ )
348
+ if stats and publish_stats:
349
+ self.logger.info(f"model_cache: {stats}")
350
+ # Publish stats to Prometheus
351
+ stats.publish_to_prometheus()
352
+ self.logger.info(
353
+ f"model_cache: Fetch took {fetch_t:.2f} seconds, of which {start_lock_t:.2f} seconds were spent blocking."
354
+ )
355
+ return result
356
+
357
+
358
+ if __name__ == "__main__":
359
+ # Example usage
360
+ print("invoking download")
361
+ resolver = LazyDataResolverV2(Path("/example/path"))
362
+ # similate crash
363
+ time.sleep(0.01)
364
+ resolver.block_until_download_complete()
365
+ raise Exception("Simulated crash")
@@ -36,6 +36,7 @@ COPY --chown= ./data ${APP_HOME}/data
36
36
  COPY --chown= ./server ${APP_HOME}
37
37
  COPY --chown= ./config.yaml ${APP_HOME}/config.yaml
38
38
  COPY --chown= ./model ${APP_HOME}/model
39
+ RUN mkdir -p /packages
39
40
  COPY --chown= ./packages /packages
40
41
  ENV INFERENCE_SERVER_PORT="8080"
41
42
  ENV SERVER_START_CMD="/usr/local/bin/python3 /app/main.py"
@@ -1,153 +0,0 @@
1
- import atexit
2
- import logging
3
- import time
4
- from functools import lru_cache
5
- from pathlib import Path
6
- from threading import Lock, Thread
7
- from typing import Optional, Union
8
-
9
- LAZY_DATA_RESOLVER_PATH = [
10
- # synced with pub static LAZY_DATA_RESOLVER_PATHS: &[&str]
11
- Path("/bptr/bptr-manifest"),
12
- Path("/bptr/bptr-manifest.json"),
13
- Path("/static-bptr/static-bptr-manifest.json"),
14
- ]
15
-
16
- MISSING_COLLECTION_MESSAGE = """model_cache: Data was not collected. Missing lazy_data_resolver.block_until_download_complete().
17
- This is a potential bug by the user implementation of model.py when using model_cache.
18
- We need you to call the block_until_download_complete() method during __init__ or load() method of your model.
19
- Please implement the following pattern when using model_cache.
20
- ```
21
- import torch
22
-
23
- class Model:
24
- def __init__(self, *args, **kwargs):
25
- self._lazy_data_resolver = kwargs["lazy_data_resolver"]
26
-
27
- def load():
28
- # work that does not require the download may be done here
29
- random_vector = torch.randn(1000)
30
- # important to collect the download before using any incomplete data
31
- self._lazy_data_resolver.block_until_download_complete()
32
- # after the call, you may use the /app/model_cache directory
33
- torch.load(
34
- "/app/model_cache/your_model.pt"
35
- ) * random_vector
36
- ```
37
- """
38
-
39
-
40
- class LazyDataResolverV2:
41
- """Lazy data resolver pre-fetches data in a separate thread.
42
- It uses a lock to ensure that the data is only fetched once
43
- and that the thread is not blocked by other threads.
44
- """
45
-
46
- def __init__(self, data_dir: Path, logger: Optional[logging.Logger] = None):
47
- self._data_dir = data_dir
48
- self._lock = Lock()
49
- self._start_time = time.time()
50
- self.logger = logger or logging.getLogger(__name__)
51
- self._is_collected_by_user = not self.bptr_exists()
52
- thread = Thread(target=self._prefetch_in_thread, daemon=True)
53
- thread.start()
54
-
55
- def print_error_message_on_exit_if_not_collected():
56
- try:
57
- if not self._is_collected_by_user and thread.is_alive():
58
- # if thread is still alive, and the user has not called collect,
59
- # the download in flight could have been the core issue
60
- self.logger.warning(
61
- "An error was detected while the data was still being downloaded. "
62
- + MISSING_COLLECTION_MESSAGE
63
- )
64
- except Exception as e:
65
- print("Error while printing error message on exit:", e)
66
-
67
- atexit.register(print_error_message_on_exit_if_not_collected)
68
-
69
- @staticmethod
70
- def bptr_exists():
71
- """Check if the bptr manifest file exists."""
72
- return any(path.exists() for path in LAZY_DATA_RESOLVER_PATH)
73
-
74
- def _prefetch_in_thread(self):
75
- """Invokes the download ahead of time, before user doubles down on the download"""
76
- result = self.block_until_download_complete(
77
- log_stats=False, issue_collect=False
78
- )
79
- if not result:
80
- # no data to resolve, no need to collect
81
- self._is_collected_by_user = True
82
- return None
83
- # verify the user has called collect.
84
- if not self._is_collected_by_user and time.time() - self._start_time > 20:
85
- # issue a warning if the user has not collected after 20 seconds.
86
- # skip for small downloads that are less than 20 seconds
87
- # as the user might have a lot of work before is able to call collect.
88
- self.logger.warning(MISSING_COLLECTION_MESSAGE)
89
- time.sleep(0.5)
90
-
91
- @lru_cache(maxsize=None)
92
- def _fetch(self) -> Union[str, Exception]:
93
- """cached and locked method to fetch the data."""
94
- if not self.bptr_exists():
95
- return "" # no data to resolve
96
- import truss_transfer
97
-
98
- try:
99
- return truss_transfer.lazy_data_resolve(str(self._data_dir))
100
- except Exception as e:
101
- self.logger.error(f"Error occurred while fetching data: {e}")
102
- return e
103
-
104
- def raise_if_not_collected(self):
105
- """We require the user to call `block_until_download_complete` before using the data.
106
- If the user has not called the method during load, we raise an error.
107
- """
108
- if not self._is_collected_by_user:
109
- raise RuntimeError(MISSING_COLLECTION_MESSAGE)
110
-
111
- def block_until_download_complete(
112
- self, log_stats: bool = True, issue_collect: bool = True
113
- ) -> str:
114
- """Once called, blocks until the data has been downloaded.
115
-
116
- example usage:
117
- ```
118
- import torch
119
-
120
- class Model:
121
- def __init__(self, *args, **kwargs):
122
- self._lazy_data_resolver = kwargs["lazy_data_resolver"]
123
-
124
- def load():
125
- random_vector = torch.randn(1000)
126
- # important to collect the download before using any incomplete data
127
- self._lazy_data_resolver.block_until_download_complete()
128
- ```
129
-
130
- """
131
- start_lock = time.time()
132
- self._is_collected_by_user = issue_collect or self._is_collected_by_user
133
- with self._lock:
134
- result = self._fetch()
135
- if isinstance(result, Exception):
136
- raise RuntimeError(
137
- f"Error occurred while fetching data: {result}"
138
- ) from result
139
- if log_stats and result:
140
- self.logger.info(
141
- f"model_cache: Fetch took {time.time() - self._start_time:.2f} seconds, of which {time.time() - start_lock:.2f} seconds were spent blocking."
142
- )
143
- return result
144
-
145
-
146
- if __name__ == "__main__":
147
- # Example usage
148
- print("invoking download")
149
- resolver = LazyDataResolverV2(Path("/example/path"))
150
- # similate crash
151
- time.sleep(0.01)
152
- resolver.block_until_download_complete()
153
- raise Exception("Simulated crash")
File without changes
File without changes
File without changes
File without changes
File without changes