truss 0.10.0rc1__py3-none-any.whl → 0.60.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of truss might be problematic. Click here for more details.
- truss/__init__.py +10 -3
- truss/api/__init__.py +123 -0
- truss/api/definitions.py +51 -0
- truss/base/constants.py +116 -0
- truss/base/custom_types.py +29 -0
- truss/{errors.py → base/errors.py} +4 -0
- truss/base/trt_llm_config.py +310 -0
- truss/{truss_config.py → base/truss_config.py} +344 -31
- truss/{truss_spec.py → base/truss_spec.py} +20 -6
- truss/{validation.py → base/validation.py} +60 -11
- truss/cli/cli.py +841 -88
- truss/{remote → cli}/remote_cli.py +2 -7
- truss/contexts/docker_build_setup.py +67 -0
- truss/contexts/image_builder/cache_warmer.py +2 -8
- truss/contexts/image_builder/image_builder.py +1 -1
- truss/contexts/image_builder/serving_image_builder.py +292 -46
- truss/contexts/image_builder/util.py +1 -3
- truss/contexts/local_loader/docker_build_emulator.py +58 -0
- truss/contexts/local_loader/load_model_local.py +2 -2
- truss/contexts/local_loader/truss_module_loader.py +1 -1
- truss/contexts/local_loader/utils.py +1 -1
- truss/local/local_config.py +2 -6
- truss/local/local_config_handler.py +20 -5
- truss/patch/__init__.py +1 -0
- truss/patch/hash.py +4 -70
- truss/patch/signature.py +4 -16
- truss/patch/truss_dir_patch_applier.py +3 -78
- truss/remote/baseten/api.py +308 -23
- truss/remote/baseten/auth.py +3 -3
- truss/remote/baseten/core.py +257 -50
- truss/remote/baseten/custom_types.py +44 -0
- truss/remote/baseten/error.py +4 -0
- truss/remote/baseten/remote.py +369 -118
- truss/remote/baseten/service.py +118 -11
- truss/remote/baseten/utils/status.py +29 -0
- truss/remote/baseten/utils/tar.py +34 -22
- truss/remote/baseten/utils/transfer.py +36 -23
- truss/remote/remote_factory.py +14 -5
- truss/remote/truss_remote.py +72 -45
- truss/templates/base.Dockerfile.jinja +18 -16
- truss/templates/cache.Dockerfile.jinja +3 -3
- truss/{server → templates/control}/control/application.py +14 -35
- truss/{server → templates/control}/control/endpoints.py +39 -9
- truss/{server/control/patch/types.py → templates/control/control/helpers/custom_types.py} +13 -52
- truss/{server → templates/control}/control/helpers/inference_server_controller.py +4 -8
- truss/{server → templates/control}/control/helpers/inference_server_process_controller.py +2 -4
- truss/{server → templates/control}/control/helpers/inference_server_starter.py +5 -10
- truss/{server/control → templates/control/control/helpers}/truss_patch/model_code_patch_applier.py +8 -6
- truss/{server/control/patch → templates/control/control/helpers/truss_patch}/model_container_patch_applier.py +18 -26
- truss/templates/control/control/helpers/truss_patch/requirement_name_identifier.py +66 -0
- truss/{server → templates/control}/control/server.py +11 -6
- truss/templates/control/requirements.txt +9 -0
- truss/templates/custom_python_dx/my_model.py +28 -0
- truss/templates/docker_server/proxy.conf.jinja +42 -0
- truss/templates/docker_server/supervisord.conf.jinja +27 -0
- truss/templates/docker_server_requirements.txt +1 -0
- truss/templates/server/common/errors.py +231 -0
- truss/{server → templates/server}/common/patches/whisper/patch.py +1 -0
- truss/{server/common/patches/__init__.py → templates/server/common/patches.py} +1 -3
- truss/{server → templates/server}/common/retry.py +1 -0
- truss/{server → templates/server}/common/schema.py +11 -9
- truss/templates/server/common/tracing.py +157 -0
- truss/templates/server/main.py +9 -0
- truss/templates/server/model_wrapper.py +961 -0
- truss/templates/server/requirements.txt +21 -0
- truss/templates/server/truss_server.py +447 -0
- truss/templates/server.Dockerfile.jinja +62 -14
- truss/templates/shared/dynamic_config_resolver.py +28 -0
- truss/templates/shared/lazy_data_resolver.py +164 -0
- truss/templates/shared/log_config.py +125 -0
- truss/{server → templates}/shared/secrets_resolver.py +1 -2
- truss/{server → templates}/shared/serialization.py +31 -9
- truss/{server → templates}/shared/util.py +3 -13
- truss/templates/trtllm-audio/model/model.py +49 -0
- truss/templates/trtllm-audio/packages/sigint_patch.py +14 -0
- truss/templates/trtllm-audio/packages/whisper_trt/__init__.py +215 -0
- truss/templates/trtllm-audio/packages/whisper_trt/assets.py +25 -0
- truss/templates/trtllm-audio/packages/whisper_trt/batching.py +52 -0
- truss/templates/trtllm-audio/packages/whisper_trt/custom_types.py +26 -0
- truss/templates/trtllm-audio/packages/whisper_trt/modeling.py +184 -0
- truss/templates/trtllm-audio/packages/whisper_trt/tokenizer.py +185 -0
- truss/templates/trtllm-audio/packages/whisper_trt/utils.py +245 -0
- truss/templates/trtllm-briton/src/extension.py +64 -0
- truss/tests/conftest.py +302 -94
- truss/tests/contexts/image_builder/test_serving_image_builder.py +74 -31
- truss/tests/contexts/local_loader/test_load_local.py +2 -2
- truss/tests/contexts/local_loader/test_truss_module_finder.py +1 -1
- truss/tests/patch/test_calc_patch.py +439 -127
- truss/tests/patch/test_dir_signature.py +3 -12
- truss/tests/patch/test_hash.py +1 -1
- truss/tests/patch/test_signature.py +1 -1
- truss/tests/patch/test_truss_dir_patch_applier.py +23 -11
- truss/tests/patch/test_types.py +2 -2
- truss/tests/remote/baseten/test_api.py +153 -58
- truss/tests/remote/baseten/test_auth.py +2 -1
- truss/tests/remote/baseten/test_core.py +160 -12
- truss/tests/remote/baseten/test_remote.py +489 -77
- truss/tests/remote/baseten/test_service.py +55 -0
- truss/tests/remote/test_remote_factory.py +16 -18
- truss/tests/remote/test_truss_remote.py +26 -17
- truss/tests/templates/control/control/helpers/test_context_managers.py +11 -0
- truss/tests/templates/control/control/helpers/test_model_container_patch_applier.py +184 -0
- truss/tests/templates/control/control/helpers/test_requirement_name_identifier.py +89 -0
- truss/tests/{server → templates/control}/control/test_server.py +79 -24
- truss/tests/{server → templates/control}/control/test_server_integration.py +24 -16
- truss/tests/templates/core/server/test_dynamic_config_resolver.py +108 -0
- truss/tests/templates/core/server/test_lazy_data_resolver.py +329 -0
- truss/tests/templates/core/server/test_lazy_data_resolver_v2.py +79 -0
- truss/tests/{server → templates}/core/server/test_secrets_resolver.py +1 -1
- truss/tests/{server → templates/server}/common/test_retry.py +3 -3
- truss/tests/templates/server/test_model_wrapper.py +248 -0
- truss/tests/{server → templates/server}/test_schema.py +3 -5
- truss/tests/{server/core/server/common → templates/server}/test_truss_server.py +8 -5
- truss/tests/test_build.py +9 -52
- truss/tests/test_config.py +336 -77
- truss/tests/test_context_builder_image.py +3 -11
- truss/tests/test_control_truss_patching.py +7 -12
- truss/tests/test_custom_server.py +38 -0
- truss/tests/test_data/context_builder_image_test/test.py +3 -0
- truss/tests/test_data/happy.ipynb +56 -0
- truss/tests/test_data/model_load_failure_test/config.yaml +2 -0
- truss/tests/test_data/model_load_failure_test/model/__init__.py +0 -0
- truss/tests/test_data/patch_ping_test_server/__init__.py +0 -0
- truss/{test_data → tests/test_data}/patch_ping_test_server/app.py +3 -9
- truss/{test_data → tests/test_data}/server.Dockerfile +20 -21
- truss/tests/test_data/server_conformance_test_truss/__init__.py +0 -0
- truss/tests/test_data/server_conformance_test_truss/model/__init__.py +0 -0
- truss/{test_data → tests/test_data}/server_conformance_test_truss/model/model.py +1 -3
- truss/tests/test_data/test_async_truss/__init__.py +0 -0
- truss/tests/test_data/test_async_truss/model/__init__.py +0 -0
- truss/tests/test_data/test_basic_truss/__init__.py +0 -0
- truss/tests/test_data/test_basic_truss/config.yaml +16 -0
- truss/tests/test_data/test_basic_truss/model/__init__.py +0 -0
- truss/tests/test_data/test_build_commands/__init__.py +0 -0
- truss/tests/test_data/test_build_commands/config.yaml +13 -0
- truss/tests/test_data/test_build_commands/model/__init__.py +0 -0
- truss/{test_data/test_streaming_async_generator_truss → tests/test_data/test_build_commands}/model/model.py +2 -3
- truss/tests/test_data/test_build_commands_failure/__init__.py +0 -0
- truss/tests/test_data/test_build_commands_failure/config.yaml +14 -0
- truss/tests/test_data/test_build_commands_failure/model/__init__.py +0 -0
- truss/tests/test_data/test_build_commands_failure/model/model.py +17 -0
- truss/tests/test_data/test_concurrency_truss/__init__.py +0 -0
- truss/tests/test_data/test_concurrency_truss/config.yaml +4 -0
- truss/tests/test_data/test_concurrency_truss/model/__init__.py +0 -0
- truss/tests/test_data/test_custom_server_truss/__init__.py +0 -0
- truss/tests/test_data/test_custom_server_truss/config.yaml +20 -0
- truss/tests/test_data/test_custom_server_truss/test_docker_image/Dockerfile +17 -0
- truss/tests/test_data/test_custom_server_truss/test_docker_image/README.md +10 -0
- truss/tests/test_data/test_custom_server_truss/test_docker_image/VERSION +1 -0
- truss/tests/test_data/test_custom_server_truss/test_docker_image/__init__.py +0 -0
- truss/tests/test_data/test_custom_server_truss/test_docker_image/app.py +19 -0
- truss/tests/test_data/test_custom_server_truss/test_docker_image/build_upload_new_image.sh +6 -0
- truss/tests/test_data/test_openai/__init__.py +0 -0
- truss/{test_data/test_basic_truss → tests/test_data/test_openai}/config.yaml +1 -2
- truss/tests/test_data/test_openai/model/__init__.py +0 -0
- truss/tests/test_data/test_openai/model/model.py +15 -0
- truss/tests/test_data/test_pyantic_v1/__init__.py +0 -0
- truss/tests/test_data/test_pyantic_v1/model/__init__.py +0 -0
- truss/tests/test_data/test_pyantic_v1/model/model.py +28 -0
- truss/tests/test_data/test_pyantic_v1/requirements.txt +1 -0
- truss/tests/test_data/test_pyantic_v2/__init__.py +0 -0
- truss/tests/test_data/test_pyantic_v2/config.yaml +13 -0
- truss/tests/test_data/test_pyantic_v2/model/__init__.py +0 -0
- truss/tests/test_data/test_pyantic_v2/model/model.py +30 -0
- truss/tests/test_data/test_pyantic_v2/requirements.txt +1 -0
- truss/tests/test_data/test_requirements_file_truss/__init__.py +0 -0
- truss/tests/test_data/test_requirements_file_truss/config.yaml +13 -0
- truss/tests/test_data/test_requirements_file_truss/model/__init__.py +0 -0
- truss/{test_data → tests/test_data}/test_requirements_file_truss/model/model.py +1 -0
- truss/tests/test_data/test_streaming_async_generator_truss/__init__.py +0 -0
- truss/tests/test_data/test_streaming_async_generator_truss/config.yaml +4 -0
- truss/tests/test_data/test_streaming_async_generator_truss/model/__init__.py +0 -0
- truss/tests/test_data/test_streaming_async_generator_truss/model/model.py +7 -0
- truss/tests/test_data/test_streaming_read_timeout/__init__.py +0 -0
- truss/tests/test_data/test_streaming_read_timeout/model/__init__.py +0 -0
- truss/tests/test_data/test_streaming_truss/__init__.py +0 -0
- truss/tests/test_data/test_streaming_truss/config.yaml +4 -0
- truss/tests/test_data/test_streaming_truss/model/__init__.py +0 -0
- truss/tests/test_data/test_streaming_truss_with_error/__init__.py +0 -0
- truss/tests/test_data/test_streaming_truss_with_error/model/__init__.py +0 -0
- truss/{test_data → tests/test_data}/test_streaming_truss_with_error/model/model.py +3 -11
- truss/tests/test_data/test_streaming_truss_with_error/packages/__init__.py +0 -0
- truss/tests/test_data/test_streaming_truss_with_error/packages/helpers_1.py +5 -0
- truss/tests/test_data/test_streaming_truss_with_error/packages/helpers_2.py +2 -0
- truss/tests/test_data/test_streaming_truss_with_tracing/__init__.py +0 -0
- truss/tests/test_data/test_streaming_truss_with_tracing/config.yaml +43 -0
- truss/tests/test_data/test_streaming_truss_with_tracing/model/__init__.py +0 -0
- truss/tests/test_data/test_streaming_truss_with_tracing/model/model.py +65 -0
- truss/tests/test_data/test_trt_llm_truss/__init__.py +0 -0
- truss/tests/test_data/test_trt_llm_truss/config.yaml +15 -0
- truss/tests/test_data/test_trt_llm_truss/model/__init__.py +0 -0
- truss/tests/test_data/test_trt_llm_truss/model/model.py +15 -0
- truss/tests/test_data/test_truss/__init__.py +0 -0
- truss/tests/test_data/test_truss/config.yaml +4 -0
- truss/tests/test_data/test_truss/model/__init__.py +0 -0
- truss/tests/test_data/test_truss/model/dummy +0 -0
- truss/tests/test_data/test_truss/packages/__init__.py +0 -0
- truss/tests/test_data/test_truss/packages/test_package/__init__.py +0 -0
- truss/tests/test_data/test_truss_server_caching_truss/__init__.py +0 -0
- truss/tests/test_data/test_truss_server_caching_truss/model/__init__.py +0 -0
- truss/tests/test_data/test_truss_with_error/__init__.py +0 -0
- truss/tests/test_data/test_truss_with_error/config.yaml +4 -0
- truss/tests/test_data/test_truss_with_error/model/__init__.py +0 -0
- truss/tests/test_data/test_truss_with_error/model/model.py +8 -0
- truss/tests/test_data/test_truss_with_error/packages/__init__.py +0 -0
- truss/tests/test_data/test_truss_with_error/packages/helpers_1.py +5 -0
- truss/tests/test_data/test_truss_with_error/packages/helpers_2.py +2 -0
- truss/tests/test_docker.py +2 -1
- truss/tests/test_model_inference.py +1340 -292
- truss/tests/test_model_schema.py +33 -26
- truss/tests/test_testing_utilities_for_other_tests.py +50 -5
- truss/tests/test_truss_gatherer.py +3 -5
- truss/tests/test_truss_handle.py +62 -59
- truss/tests/test_util.py +2 -1
- truss/tests/test_validation.py +15 -13
- truss/tests/trt_llm/test_trt_llm_config.py +41 -0
- truss/tests/trt_llm/test_validation.py +91 -0
- truss/tests/util/test_config_checks.py +40 -0
- truss/tests/util/test_env_vars.py +14 -0
- truss/tests/util/test_path.py +10 -23
- truss/trt_llm/config_checks.py +43 -0
- truss/trt_llm/validation.py +42 -0
- truss/truss_handle/__init__.py +0 -0
- truss/truss_handle/build.py +122 -0
- truss/{decorators.py → truss_handle/decorators.py} +1 -1
- truss/truss_handle/patch/__init__.py +0 -0
- truss/{patch → truss_handle/patch}/calc_patch.py +146 -92
- truss/{types.py → truss_handle/patch/custom_types.py} +35 -27
- truss/{patch → truss_handle/patch}/dir_signature.py +1 -1
- truss/truss_handle/patch/hash.py +71 -0
- truss/{patch → truss_handle/patch}/local_truss_patch_applier.py +6 -4
- truss/truss_handle/patch/signature.py +22 -0
- truss/truss_handle/patch/truss_dir_patch_applier.py +87 -0
- truss/{readme_generator.py → truss_handle/readme_generator.py} +3 -2
- truss/{truss_gatherer.py → truss_handle/truss_gatherer.py} +3 -2
- truss/{truss_handle.py → truss_handle/truss_handle.py} +174 -78
- truss/util/.truss_ignore +3 -0
- truss/{docker.py → util/docker.py} +6 -2
- truss/util/download.py +6 -15
- truss/util/env_vars.py +41 -0
- truss/util/log_utils.py +52 -0
- truss/util/path.py +20 -20
- truss/util/requirements.py +11 -0
- {truss-0.10.0rc1.dist-info → truss-0.60.0.dist-info}/METADATA +18 -16
- truss-0.60.0.dist-info/RECORD +324 -0
- {truss-0.10.0rc1.dist-info → truss-0.60.0.dist-info}/WHEEL +1 -1
- truss-0.60.0.dist-info/entry_points.txt +4 -0
- truss_chains/__init__.py +71 -0
- truss_chains/definitions.py +756 -0
- truss_chains/deployment/__init__.py +0 -0
- truss_chains/deployment/code_gen.py +816 -0
- truss_chains/deployment/deployment_client.py +871 -0
- truss_chains/framework.py +1480 -0
- truss_chains/public_api.py +231 -0
- truss_chains/py.typed +0 -0
- truss_chains/pydantic_numpy.py +131 -0
- truss_chains/reference_code/reference_chainlet.py +34 -0
- truss_chains/reference_code/reference_model.py +10 -0
- truss_chains/remote_chainlet/__init__.py +0 -0
- truss_chains/remote_chainlet/model_skeleton.py +60 -0
- truss_chains/remote_chainlet/stub.py +380 -0
- truss_chains/remote_chainlet/utils.py +332 -0
- truss_chains/streaming.py +378 -0
- truss_chains/utils.py +178 -0
- CODE_OF_CONDUCT.md +0 -131
- CONTRIBUTING.md +0 -48
- README.md +0 -137
- context_builder.Dockerfile +0 -24
- truss/blob/blob_backend.py +0 -10
- truss/blob/blob_backend_registry.py +0 -23
- truss/blob/http_public_blob_backend.py +0 -23
- truss/build/__init__.py +0 -2
- truss/build/build.py +0 -143
- truss/build/configure.py +0 -63
- truss/cli/__init__.py +0 -2
- truss/cli/console.py +0 -5
- truss/cli/create.py +0 -5
- truss/config/trt_llm.py +0 -81
- truss/constants.py +0 -61
- truss/model_inference.py +0 -123
- truss/patch/types.py +0 -30
- truss/pytest.ini +0 -7
- truss/server/common/errors.py +0 -100
- truss/server/common/termination_handler_middleware.py +0 -64
- truss/server/common/truss_server.py +0 -389
- truss/server/control/patch/model_code_patch_applier.py +0 -46
- truss/server/control/patch/requirement_name_identifier.py +0 -17
- truss/server/inference_server.py +0 -29
- truss/server/model_wrapper.py +0 -434
- truss/server/shared/logging.py +0 -81
- truss/templates/trtllm/model/model.py +0 -97
- truss/templates/trtllm/packages/build_engine_utils.py +0 -34
- truss/templates/trtllm/packages/constants.py +0 -11
- truss/templates/trtllm/packages/schema.py +0 -216
- truss/templates/trtllm/packages/tensorrt_llm_model_repository/ensemble/config.pbtxt +0 -246
- truss/templates/trtllm/packages/tensorrt_llm_model_repository/postprocessing/1/model.py +0 -181
- truss/templates/trtllm/packages/tensorrt_llm_model_repository/postprocessing/config.pbtxt +0 -64
- truss/templates/trtllm/packages/tensorrt_llm_model_repository/preprocessing/1/model.py +0 -260
- truss/templates/trtllm/packages/tensorrt_llm_model_repository/preprocessing/config.pbtxt +0 -99
- truss/templates/trtllm/packages/tensorrt_llm_model_repository/tensorrt_llm/config.pbtxt +0 -208
- truss/templates/trtllm/packages/triton_client.py +0 -150
- truss/templates/trtllm/packages/utils.py +0 -43
- truss/test_data/context_builder_image_test/test.py +0 -4
- truss/test_data/happy.ipynb +0 -54
- truss/test_data/model_load_failure_test/config.yaml +0 -2
- truss/test_data/test_concurrency_truss/config.yaml +0 -2
- truss/test_data/test_streaming_async_generator_truss/config.yaml +0 -2
- truss/test_data/test_streaming_truss/config.yaml +0 -3
- truss/test_data/test_truss/config.yaml +0 -2
- truss/tests/server/common/test_termination_handler_middleware.py +0 -93
- truss/tests/server/control/test_model_container_patch_applier.py +0 -203
- truss/tests/server/core/server/common/test_util.py +0 -19
- truss/tests/server/test_model_wrapper.py +0 -87
- truss/util/data_structures.py +0 -16
- truss-0.10.0rc1.dist-info/RECORD +0 -216
- truss-0.10.0rc1.dist-info/entry_points.txt +0 -3
- truss/{server/shared → base}/__init__.py +0 -0
- truss/{server → templates/control}/control/helpers/context_managers.py +0 -0
- truss/{server/control → templates/control/control/helpers}/errors.py +0 -0
- truss/{server/control/patch → templates/control/control/helpers/truss_patch}/__init__.py +0 -0
- truss/{server/control/patch → templates/control/control/helpers/truss_patch}/system_packages.py +0 -0
- truss/{test_data/annotated_types_truss/model → templates/server}/__init__.py +0 -0
- truss/{server → templates/server}/common/__init__.py +0 -0
- truss/{test_data/gcs_fix/model → templates/shared}/__init__.py +0 -0
- truss/templates/{trtllm → trtllm-briton}/README.md +0 -0
- truss/{test_data/server_conformance_test_truss/model → tests/test_data}/__init__.py +0 -0
- truss/{test_data/test_basic_truss/model → tests/test_data/annotated_types_truss}/__init__.py +0 -0
- truss/{test_data → tests/test_data}/annotated_types_truss/config.yaml +0 -0
- truss/{test_data/test_requirements_file_truss → tests/test_data/annotated_types_truss}/model/__init__.py +0 -0
- truss/{test_data → tests/test_data}/annotated_types_truss/model/model.py +0 -0
- truss/{test_data → tests/test_data}/auto-mpg.data +0 -0
- truss/{test_data → tests/test_data}/context_builder_image_test/Dockerfile +0 -0
- truss/{test_data/test_truss/model → tests/test_data/context_builder_image_test}/__init__.py +0 -0
- truss/{test_data/test_truss_server_caching_truss/model → tests/test_data/gcs_fix}/__init__.py +0 -0
- truss/{test_data → tests/test_data}/gcs_fix/config.yaml +0 -0
- truss/tests/{local → test_data/gcs_fix/model}/__init__.py +0 -0
- truss/{test_data → tests/test_data}/gcs_fix/model/model.py +0 -0
- truss/{test_data/test_truss/model/dummy → tests/test_data/model_load_failure_test/__init__.py} +0 -0
- truss/{test_data → tests/test_data}/model_load_failure_test/model/model.py +0 -0
- truss/{test_data → tests/test_data}/pima-indians-diabetes.csv +0 -0
- truss/{test_data → tests/test_data}/readme_int_example.md +0 -0
- truss/{test_data → tests/test_data}/readme_no_example.md +0 -0
- truss/{test_data → tests/test_data}/readme_str_example.md +0 -0
- truss/{test_data → tests/test_data}/server_conformance_test_truss/config.yaml +0 -0
- truss/{test_data → tests/test_data}/test_async_truss/config.yaml +0 -0
- truss/{test_data → tests/test_data}/test_async_truss/model/model.py +3 -3
- /truss/{test_data → tests/test_data}/test_basic_truss/model/model.py +0 -0
- /truss/{test_data → tests/test_data}/test_concurrency_truss/model/model.py +0 -0
- /truss/{test_data/test_requirements_file_truss → tests/test_data/test_pyantic_v1}/config.yaml +0 -0
- /truss/{test_data → tests/test_data}/test_requirements_file_truss/requirements.txt +0 -0
- /truss/{test_data → tests/test_data}/test_streaming_read_timeout/config.yaml +0 -0
- /truss/{test_data → tests/test_data}/test_streaming_read_timeout/model/model.py +0 -0
- /truss/{test_data → tests/test_data}/test_streaming_truss/model/model.py +0 -0
- /truss/{test_data → tests/test_data}/test_streaming_truss_with_error/config.yaml +0 -0
- /truss/{test_data → tests/test_data}/test_truss/examples.yaml +0 -0
- /truss/{test_data → tests/test_data}/test_truss/model/model.py +0 -0
- /truss/{test_data → tests/test_data}/test_truss/packages/test_package/test.py +0 -0
- /truss/{test_data → tests/test_data}/test_truss_server_caching_truss/config.yaml +0 -0
- /truss/{test_data → tests/test_data}/test_truss_server_caching_truss/model/model.py +0 -0
- /truss/{patch → truss_handle/patch}/constants.py +0 -0
- /truss/{notebook.py → util/notebook.py} +0 -0
- {truss-0.10.0rc1.dist-info → truss-0.60.0.dist-info}/LICENSE +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "code",
|
|
5
|
+
"execution_count": 13,
|
|
6
|
+
"id": "7a4aad7e",
|
|
7
|
+
"metadata": {},
|
|
8
|
+
"outputs": [],
|
|
9
|
+
"source": [
|
|
10
|
+
"import random\n",
|
|
11
|
+
"import tempfile\n",
|
|
12
|
+
"\n",
|
|
13
|
+
"import numpy as np\n",
|
|
14
|
+
"import pandas as pd\n",
|
|
15
|
+
"from sklearn.linear_model import LogisticRegression\n",
|
|
16
|
+
"\n",
|
|
17
|
+
"import truss\n",
|
|
18
|
+
"\n",
|
|
19
|
+
"# 10 rows of 10 features\n",
|
|
20
|
+
"features = random.choices(range(10), k=10)\n",
|
|
21
|
+
"values = np.random.randint(0, 100, size=(10, 10))\n",
|
|
22
|
+
"\n",
|
|
23
|
+
"df = pd.DataFrame(values, columns=features)\n",
|
|
24
|
+
"\n",
|
|
25
|
+
"lr = LogisticRegression(random_state=0, max_iter=1000)\n",
|
|
26
|
+
"lr.fit(df.values, df.iloc[:, 0])\n",
|
|
27
|
+
"\n",
|
|
28
|
+
"with tempfile.TemporaryDirectory() as tmp:\n",
|
|
29
|
+
" tr = truss.create(lr, target_directory=tmp)\n",
|
|
30
|
+
"\n",
|
|
31
|
+
" assert truss.load(tmp).spec.yaml_string == tr.spec.yaml_string"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"metadata": {
|
|
36
|
+
"kernelspec": {
|
|
37
|
+
"display_name": "Python 3 (ipykernel)",
|
|
38
|
+
"language": "python",
|
|
39
|
+
"name": "python3"
|
|
40
|
+
},
|
|
41
|
+
"language_info": {
|
|
42
|
+
"codemirror_mode": {
|
|
43
|
+
"name": "ipython",
|
|
44
|
+
"version": 3
|
|
45
|
+
},
|
|
46
|
+
"file_extension": ".py",
|
|
47
|
+
"mimetype": "text/x-python",
|
|
48
|
+
"name": "python",
|
|
49
|
+
"nbconvert_exporter": "python",
|
|
50
|
+
"pygments_lexer": "ipython3",
|
|
51
|
+
"version": "3.9.9"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"nbformat": 4,
|
|
55
|
+
"nbformat_minor": 5
|
|
56
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -22,9 +22,7 @@ def _inc_fn_call_stat():
|
|
|
22
22
|
@app.route("/hash_is_current", methods=["POST"])
|
|
23
23
|
def hash_is_current():
|
|
24
24
|
_inc_fn_call_stat()
|
|
25
|
-
return {
|
|
26
|
-
"is_current": True,
|
|
27
|
-
}
|
|
25
|
+
return {"is_current": True}
|
|
28
26
|
|
|
29
27
|
|
|
30
28
|
@app.route("/hash_is_current_but_only_every_third_call_succeeds", methods=["POST"])
|
|
@@ -33,18 +31,14 @@ def hash_is_current_but_only_every_third_call_succeeds():
|
|
|
33
31
|
global _stats
|
|
34
32
|
fn_name = inspect.stack()[0][3]
|
|
35
33
|
if _stats[f"{fn_name}_called_count"] % 3 == 0:
|
|
36
|
-
return {
|
|
37
|
-
"is_current": True,
|
|
38
|
-
}
|
|
34
|
+
return {"is_current": True}
|
|
39
35
|
return "simulated failure", 503
|
|
40
36
|
|
|
41
37
|
|
|
42
38
|
@app.route("/accepted", methods=["POST"])
|
|
43
39
|
def accepted():
|
|
44
40
|
_inc_fn_call_stat()
|
|
45
|
-
return {
|
|
46
|
-
"accepted": True,
|
|
47
|
-
}
|
|
41
|
+
return {"accepted": True}
|
|
48
42
|
|
|
49
43
|
|
|
50
44
|
@app.route("/health")
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
ARG PYVERSION=py39
|
|
2
|
-
FROM baseten/truss-server-base:3.9-v0.4.3
|
|
2
|
+
FROM baseten/truss-server-base:3.9-v0.4.3 AS truss_server
|
|
3
3
|
|
|
4
|
-
ENV PYTHON_EXECUTABLE
|
|
5
|
-
ENV JSON_LOG True
|
|
4
|
+
ENV PYTHON_EXECUTABLE="/usr/local/bin/python3"
|
|
6
5
|
|
|
7
6
|
RUN grep -w 'ID=debian\|ID_LIKE=debian' /etc/os-release || { echo "ERROR: Supplied base image is not a debian image"; exit 1; }
|
|
8
|
-
RUN $PYTHON_EXECUTABLE -c "import sys; sys.exit(0) if sys.version_info.major == 3 and sys.version_info.minor >=8 and sys.version_info.minor <=
|
|
9
|
-
|| { echo "ERROR: Supplied base image does not have 3.8 <= python <= 3.
|
|
7
|
+
RUN $PYTHON_EXECUTABLE -c "import sys; sys.exit(0) if sys.version_info.major == 3 and sys.version_info.minor >=8 and sys.version_info.minor <=12 else sys.exit(1)" \
|
|
8
|
+
|| { echo "ERROR: Supplied base image does not have 3.8 <= python <= 3.12"; exit 1; }
|
|
10
9
|
|
|
11
10
|
RUN pip install --upgrade pip --no-cache-dir \
|
|
12
11
|
&& rm -rf /root/.cache/pip
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
# Always install the truss package
|
|
16
|
-
COPY ./truss/ /lib/truss_pkg/truss
|
|
17
|
-
COPY ./pyproject.toml /lib/truss_pkg/
|
|
18
|
-
COPY ./README.md /lib/truss_pkg/
|
|
19
|
-
RUN pip install /lib/truss_pkg --no-cache-dir && rm -rf /root/.cache/pip
|
|
20
|
-
|
|
21
|
-
|
|
22
13
|
# If user base image is supplied in config, apply build commands from truss base image
|
|
23
|
-
ENV PYTHONUNBUFFERED
|
|
24
|
-
ENV DEBIAN_FRONTEND=noninteractive
|
|
14
|
+
ENV PYTHONUNBUFFERED="True"
|
|
15
|
+
ENV DEBIAN_FRONTEND="noninteractive"
|
|
25
16
|
|
|
26
17
|
RUN apt update && \
|
|
27
18
|
apt install -y bash \
|
|
@@ -34,16 +25,24 @@ RUN apt update && \
|
|
|
34
25
|
&& apt-get clean -y \
|
|
35
26
|
&& rm -rf /var/lib/apt/lists/*
|
|
36
27
|
|
|
37
|
-
|
|
28
|
+
COPY ./base_server_requirements.txt base_server_requirements.txt
|
|
29
|
+
RUN pip install -r base_server_requirements.txt --no-cache-dir && rm -rf /root/.cache/pip
|
|
30
|
+
|
|
31
|
+
COPY ./requirements.txt requirements.txt
|
|
32
|
+
RUN cat requirements.txt
|
|
33
|
+
RUN pip install -r requirements.txt --no-cache-dir && rm -rf /root/.cache/pip
|
|
34
|
+
|
|
35
|
+
ENV APP_HOME="/app"
|
|
38
36
|
WORKDIR $APP_HOME
|
|
39
37
|
|
|
40
38
|
# Copy data before code for better caching
|
|
41
39
|
COPY ./data /app/data
|
|
42
|
-
COPY ./
|
|
40
|
+
COPY ./server /app
|
|
43
41
|
COPY ./config.yaml /app/config.yaml
|
|
42
|
+
COPY ./model /app/model
|
|
44
43
|
|
|
45
|
-
COPY ./packages /
|
|
44
|
+
COPY ./packages /packages
|
|
46
45
|
|
|
47
|
-
ENV INFERENCE_SERVER_PORT
|
|
48
|
-
ENV SERVER_START_CMD="/usr/local/bin/python3
|
|
49
|
-
ENTRYPOINT ["/usr/local/bin/python3", "
|
|
46
|
+
ENV INFERENCE_SERVER_PORT="8080"
|
|
47
|
+
ENV SERVER_START_CMD="/usr/local/bin/python3 /app/main.py"
|
|
48
|
+
ENTRYPOINT ["/usr/local/bin/python3", "/app/main.py"]
|
|
File without changes
|
|
File without changes
|
|
@@ -10,11 +10,9 @@ class Model:
|
|
|
10
10
|
self._model = None
|
|
11
11
|
|
|
12
12
|
def load(self):
|
|
13
|
-
|
|
14
|
-
print("Taking 20 seconds to load")
|
|
13
|
+
print("Starting loading over 20 seconds.")
|
|
15
14
|
time.sleep(20)
|
|
16
15
|
|
|
17
16
|
def predict(self, model_input: Any) -> Dict[str, List]:
|
|
18
|
-
# Invoke model on model_input and calculate predictions here.
|
|
19
17
|
print("Taking 20 seconds to predict")
|
|
20
18
|
time.sleep(20)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
environment_variables:
|
|
2
|
+
OTEL_TRACING_NDJSON_FILE: "/tmp/otel_traces.ndjson"
|
|
3
|
+
external_package_dirs: []
|
|
4
|
+
model_metadata: {}
|
|
5
|
+
model_name: basic truss
|
|
6
|
+
python_version: py39
|
|
7
|
+
requirements: []
|
|
8
|
+
resources:
|
|
9
|
+
accelerator: null
|
|
10
|
+
cpu: '1'
|
|
11
|
+
memory: 2Gi
|
|
12
|
+
use_gpu: false
|
|
13
|
+
secrets:
|
|
14
|
+
foo: "foo"
|
|
15
|
+
bar: "bar"
|
|
16
|
+
system_packages: []
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
build_commands:
|
|
2
|
+
- mkdir example_dir
|
|
3
|
+
- cd example_dir && touch testing.py
|
|
4
|
+
model_metadata: {}
|
|
5
|
+
model_name: null
|
|
6
|
+
model_type: custom
|
|
7
|
+
python_version: py39
|
|
8
|
+
requirements: []
|
|
9
|
+
resources:
|
|
10
|
+
accelerator: null
|
|
11
|
+
cpu: 500m
|
|
12
|
+
memory: 512Mi
|
|
13
|
+
use_gpu: false
|
|
File without changes
|
|
@@ -12,7 +12,6 @@ class Model:
|
|
|
12
12
|
# Load model here and assign to self._model.
|
|
13
13
|
pass
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
def predict(self, model_input: Any) -> Dict[str, List]:
|
|
16
16
|
# Invoke model on model_input and calculate predictions here.
|
|
17
|
-
|
|
18
|
-
yield str(i)
|
|
17
|
+
return {"predictions": [1, 2]}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
build_commands:
|
|
2
|
+
- mkdir example_dir
|
|
3
|
+
- cd example_dir && touch testing.py
|
|
4
|
+
- haha lol
|
|
5
|
+
model_metadata: {}
|
|
6
|
+
model_name: null
|
|
7
|
+
model_type: custom
|
|
8
|
+
python_version: py39
|
|
9
|
+
requirements: []
|
|
10
|
+
resources:
|
|
11
|
+
accelerator: null
|
|
12
|
+
cpu: 500m
|
|
13
|
+
memory: 512Mi
|
|
14
|
+
use_gpu: false
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Any, Dict, List
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Model:
|
|
5
|
+
def __init__(self, **kwargs) -> None:
|
|
6
|
+
self._data_dir = kwargs["data_dir"]
|
|
7
|
+
self._config = kwargs["config"]
|
|
8
|
+
self._secrets = kwargs["secrets"]
|
|
9
|
+
self._model = None
|
|
10
|
+
|
|
11
|
+
def load(self):
|
|
12
|
+
# Load model here and assign to self._model.
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
def predict(self, model_input: Any) -> Dict[str, List]:
|
|
16
|
+
# Invoke model on model_input and calculate predictions here.
|
|
17
|
+
return {"predictions": [1, 2]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
base_image:
|
|
2
|
+
image: baseten/fastapi-test:0.1.2
|
|
3
|
+
docker_server:
|
|
4
|
+
start_command: python main.py
|
|
5
|
+
predict_endpoint: /predict
|
|
6
|
+
server_port: 8000
|
|
7
|
+
readiness_endpoint: /
|
|
8
|
+
liveness_endpoint: /
|
|
9
|
+
resources:
|
|
10
|
+
accelerator: null
|
|
11
|
+
cpu: '1'
|
|
12
|
+
memory: 2Gi
|
|
13
|
+
use_gpu: false
|
|
14
|
+
model_name: Test Docker Server Truss
|
|
15
|
+
secrets:
|
|
16
|
+
hf_access_token: null
|
|
17
|
+
environment_variables:
|
|
18
|
+
HF_TOKEN: 123456
|
|
19
|
+
runtime:
|
|
20
|
+
predict_concurrency: 1
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
FROM python:3.11-slim
|
|
2
|
+
|
|
3
|
+
# Update package lists and install curl
|
|
4
|
+
RUN apt-get update && apt-get install -y curl
|
|
5
|
+
|
|
6
|
+
# Install pip dependencies
|
|
7
|
+
RUN pip install fastapi[standard]
|
|
8
|
+
|
|
9
|
+
# Copy the FastAPI application code
|
|
10
|
+
COPY app.py /home/app.py
|
|
11
|
+
COPY main.py /home/main.py
|
|
12
|
+
|
|
13
|
+
# Set the working directory
|
|
14
|
+
WORKDIR /home
|
|
15
|
+
|
|
16
|
+
# Command to run FastAPI directly
|
|
17
|
+
ENTRYPOINT ["python", "main.py"]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
We built this minimal fastapi docker image to be used in integration test `test_custom_server_truss.py::test_custom_server_truss`
|
|
2
|
+
|
|
3
|
+
Steps to update testing docker image
|
|
4
|
+
|
|
5
|
+
1. run `docker login`
|
|
6
|
+
2. cd into this directory
|
|
7
|
+
3. update version number in VERSION file
|
|
8
|
+
(before running the next step, make sure you meet with the [prerequisites](https://docs.docker.com/build/building/multi-platform/#prerequisites) here)
|
|
9
|
+
4. run `sh build_upload_new_image.sh`
|
|
10
|
+
5. update image tag to latest version in config.yaml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.1
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from fastapi import FastAPI
|
|
4
|
+
|
|
5
|
+
app = FastAPI()
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@app.get("/health")
|
|
9
|
+
async def health():
|
|
10
|
+
return {"message": "OK"}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@app.post("/predict")
|
|
14
|
+
async def root():
|
|
15
|
+
return {
|
|
16
|
+
"message": "Hello World",
|
|
17
|
+
"is_env_var_passed": os.environ.get("HF_TOKEN") is not None,
|
|
18
|
+
"is_secret_mounted": os.path.exists("/secrets/hf_access_token"),
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Read the version from the VERSION file
|
|
2
|
+
VERSION=$(cat VERSION)
|
|
3
|
+
|
|
4
|
+
docker buildx build --platform linux/amd64,linux/arm64 -f ./Dockerfile -t fastapi-test:$VERSION . || { echo "Failed to build the Docker image"; exit 1; }
|
|
5
|
+
docker tag fastapi-test:$VERSION baseten/fastapi-test:$VERSION || { echo "Failed to tag the Docker image."; exit 1; }
|
|
6
|
+
docker push baseten/fastapi-test:$VERSION || { echo "Failed to push the Docker image."; exit 1; }
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from typing import Dict
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Model:
|
|
5
|
+
def __init__(self, **kwargs):
|
|
6
|
+
pass
|
|
7
|
+
|
|
8
|
+
def chat_completions(self, input: Dict) -> str:
|
|
9
|
+
return "chat_completions"
|
|
10
|
+
|
|
11
|
+
def completions(self, input: Dict) -> str:
|
|
12
|
+
return "completions"
|
|
13
|
+
|
|
14
|
+
def predict(self, input: Dict) -> str:
|
|
15
|
+
return "predict"
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The `Model` class is an interface between the ML model that you're packaging and the model
|
|
3
|
+
server that you're running it on.
|
|
4
|
+
|
|
5
|
+
The main methods to implement here are:
|
|
6
|
+
* `load`: runs exactly once when the model server is spun up or patched and loads the
|
|
7
|
+
model onto the model server. Include any logic for initializing your model, such
|
|
8
|
+
as downloading model weights and loading the model into memory.
|
|
9
|
+
* `predict`: runs every time the model server is called. Include any logic for model
|
|
10
|
+
inference and return the model output.
|
|
11
|
+
|
|
12
|
+
See https://truss.baseten.co/quickstart for more.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import pydantic
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DummyData(pydantic.BaseModel):
|
|
19
|
+
foo: str
|
|
20
|
+
bar: int
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Model:
|
|
24
|
+
def __init__(self, **kwargs):
|
|
25
|
+
self._model = DummyData(foo="bla", bar=123)
|
|
26
|
+
|
|
27
|
+
def predict(self, model_input):
|
|
28
|
+
return self._model.json(indent=4)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pydantic<2.0
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
environment_variables: {}
|
|
2
|
+
external_package_dirs: []
|
|
3
|
+
model_metadata: {}
|
|
4
|
+
model_name: Test Requirements File
|
|
5
|
+
python_version: py39
|
|
6
|
+
requirements_file: ./requirements.txt
|
|
7
|
+
resources:
|
|
8
|
+
accelerator: null
|
|
9
|
+
cpu: '1'
|
|
10
|
+
memory: 2Gi
|
|
11
|
+
use_gpu: false
|
|
12
|
+
secrets: {}
|
|
13
|
+
system_packages: []
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The `Model` class is an interface between the ML model that you're packaging and the model
|
|
3
|
+
server that you're running it on.
|
|
4
|
+
|
|
5
|
+
The main methods to implement here are:
|
|
6
|
+
* `load`: runs exactly once when the model server is spun up or patched and loads the
|
|
7
|
+
model onto the model server. Include any logic for initializing your model, such
|
|
8
|
+
as downloading model weights and loading the model into memory.
|
|
9
|
+
* `predict`: runs every time the model server is called. Include any logic for model
|
|
10
|
+
inference and return the model output.
|
|
11
|
+
|
|
12
|
+
See https://truss.baseten.co/quickstart for more.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import pydantic
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DummyData(pydantic.BaseModel):
|
|
19
|
+
model_config = pydantic.ConfigDict()
|
|
20
|
+
|
|
21
|
+
foo: str
|
|
22
|
+
bar: int
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Model:
|
|
26
|
+
def __init__(self, **kwargs):
|
|
27
|
+
self._model = DummyData(foo="bla", bar=123)
|
|
28
|
+
|
|
29
|
+
def predict(self, model_input):
|
|
30
|
+
return self._model.model_dump_json(indent=4)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pydantic>=2.0
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
environment_variables: {}
|
|
2
|
+
external_package_dirs: []
|
|
3
|
+
model_metadata: {}
|
|
4
|
+
model_name: Test Requirements File
|
|
5
|
+
python_version: py39
|
|
6
|
+
requirements_file: ./requirements.txt
|
|
7
|
+
resources:
|
|
8
|
+
accelerator: null
|
|
9
|
+
cpu: '1'
|
|
10
|
+
memory: 2Gi
|
|
11
|
+
use_gpu: false
|
|
12
|
+
secrets: {}
|
|
13
|
+
system_packages: []
|
|
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
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
from typing import Any, Dict, List
|
|
2
2
|
|
|
3
|
+
import helpers_1
|
|
3
4
|
|
|
4
|
-
class Model:
|
|
5
|
-
def __init__(self, **kwargs) -> None:
|
|
6
|
-
self._data_dir = kwargs["data_dir"]
|
|
7
|
-
self._config = kwargs["config"]
|
|
8
|
-
self._secrets = kwargs["secrets"]
|
|
9
|
-
self._model = None
|
|
10
|
-
|
|
11
|
-
def load(self):
|
|
12
|
-
# Load model here and assign to self._model.
|
|
13
|
-
pass
|
|
14
5
|
|
|
6
|
+
class Model:
|
|
15
7
|
def predict(self, model_input: Any) -> Dict[str, List]:
|
|
16
8
|
def inner():
|
|
17
9
|
for i in range(5):
|
|
18
10
|
# Raise error partway through if throw_error is set
|
|
19
11
|
if i == 3 and model_input.get("throw_error"):
|
|
20
|
-
|
|
12
|
+
helpers_1.foo(123)
|
|
21
13
|
yield str(i)
|
|
22
14
|
|
|
23
15
|
return inner()
|
|
File without changes
|
|
File without changes
|