diff --git a/truss/templates/server/model_wrapper.py b/truss/templates/server/model_wrapper.py index 290f4692a..0e3abae0c 100644 --- a/truss/templates/server/model_wrapper.py +++ b/truss/templates/server/model_wrapper.py @@ -469,7 +469,7 @@ async def setup_environment(self, environment: Optional[dict]): if not descriptor: return self._logger.info( - f"Executing model.setup_environment with new environment: {environment}" + f"Executing model.setup_environment with environment: {environment}" ) if descriptor.is_async: return await self._model.setup_environment(environment) diff --git a/truss/tests/test_model_inference.py b/truss/tests/test_model_inference.py index b653224d8..04db1b7fa 100644 --- a/truss/tests/test_model_inference.py +++ b/truss/tests/test_model_inference.py @@ -792,11 +792,11 @@ def predict(self, model_input): ] ) time.sleep(30) - single_quote_beta_env_str = beta_env_str.replace('"', "'") assert ( - f"Executing model.setup_environment with environment: {single_quote_beta_env_str}" + f"Executing model.setup_environment with environment: {beta_env}" in container.logs() ) + single_quote_beta_env_str = beta_env_str.replace('"', "'") assert ( f"setup_environment called with {single_quote_beta_env_str}" in container.logs() @@ -837,11 +837,11 @@ def predict(self, model_input): wait_for_server_ready=True, ) # Don't need to wait here because we explicitly grab the environment from dynamic_config_resolver before calling user's load() - single_quote_staging_env_str = staging_env_str.replace('"', "'") assert ( - f"Executing model.setup_environment with environment: {single_quote_staging_env_str}" + f"Executing model.setup_environment with environment: {staging_env}" in container.logs() ) + single_quote_staging_env_str = staging_env_str.replace('"', "'") assert ( f"setup_environment called with {single_quote_staging_env_str}" in container.logs() @@ -860,7 +860,7 @@ def predict(self, model_input): ) time.sleep(30) assert ( - f"Executing model.setup_environment with new environment: {no_env}" + f"Executing model.setup_environment with environment: {no_env}" in container.logs() ) assert "setup_environment called with None" in container.logs()