Skip to content

Properly resolve merge conflicts.

1a89e8d
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Closed

Support Async Load #1285

Properly resolve merge conflicts.
1a89e8d
Select commit
Loading
Failed to load commit list.
GitHub Actions / JUnit Test Report failed Mar 13, 2025 in 0s

487 tests run, 483 passed, 3 skipped, 1 failed.

Annotations

Check failure on line 221 in truss/tests/templates/server/test_model_wrapper.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_model_wrapper.test_open_ai_completion_endpoints

common.errors.ModelNotReady: Model with name model is not ready.
Raw output
open_ai_container_fs = PosixPath('/tmp/pytest-of-runner/pytest-0/test_open_ai_completion_endpoi0/truss_fs')
helpers = <truss.tests.conftest.Helpers object at 0x7fdb1dff6640>

    @pytest.mark.anyio
    async def test_open_ai_completion_endpoints(open_ai_container_fs, helpers):
        app_path = open_ai_container_fs / "app"
        with (
            _clear_model_load_modules(),
            helpers.sys_paths(app_path),
            _change_directory(app_path),
        ):
            model_wrapper_module = importlib.import_module("model_wrapper")
            model_wrapper_class = getattr(model_wrapper_module, "ModelWrapper")
            config = yaml.safe_load((app_path / "config.yaml").read_text())
    
            model_wrapper = model_wrapper_class(config, sdk_trace.NoOpTracer())
            model_wrapper.load()
    
            mock_req = MagicMock(spec=Request)
>           predict_resp = await model_wrapper.predict({}, mock_req)

/home/runner/work/truss/truss/truss/tests/templates/server/test_model_wrapper.py:221: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/pytest-of-runner/pytest-0/test_open_ai_completion_endpoi0/truss_fs/app/model_wrapper.py:858: in predict
    if self.model_descriptor.preprocess:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <model_wrapper.ModelWrapper object at 0x7fdb1dfe89d0>

    @property
    def model_descriptor(self) -> ModelDescriptor:
        if self._maybe_model_descriptor:
            return self._maybe_model_descriptor
        else:
>           raise errors.ModelNotReady(self.name)
E           common.errors.ModelNotReady: Model with name model is not ready.

/tmp/pytest-of-runner/pytest-0/test_open_ai_completion_endpoi0/truss_fs/app/model_wrapper.py:397: ModelNotReady