Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary wait in case of failed stub creation #7192

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions qa/L0_backend_python/model_control/model_control_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,23 @@ def test_model_reload(self):
self.assertFalse(client.is_model_ready(model_name))
self.assertFalse(client.is_model_ready(ensemble_model_name))

def test_faulty_model_load(self):
working_model_name = "identity_fp32"
faulty_model_name = "auto_complete_error"
with httpclient.InferenceServerClient(f"{_tritonserver_ipaddr}:8000") as client:
# Load a correct model
client.load_model(working_model_name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment why a working model is required to reproduce the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still trying to figure this out.
I think we can merge this Test for 24.05 and meanwhile I will continue my investigation.
We have already merged the python backend change.

# Load a faulty model
with self.assertRaises(InferenceServerException) as cm:
_ = client.load_model(faulty_model_name)
self.assertIn("load failed for model", str(cm.exception))

# Check if server is responsive
self.assertTrue(client.is_model_ready(working_model_name))
# Verify faulty model is not loaded
self.assertFalse(client.is_model_ready(faulty_model_name))
client.unload_model(working_model_name)


if __name__ == "__main__":
unittest.main()
3 changes: 3 additions & 0 deletions qa/L0_backend_python/model_control/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ source ../../common/util.sh

mkdir -p models/identity_fp32/1/
mkdir -p models/simple_identity_fp32/1/
mkdir -p models/auto_complete_error/1/

cp ../../python_models/auto_complete_error/model.py ./models/auto_complete_error/1/
cp ../../python_models/identity_fp32/model.py ./models/identity_fp32/1/model.py
cp ../../python_models/identity_fp32/config.pbtxt ./models/identity_fp32/config.pbtxt
cp ../../python_models/simple_identity_fp32/config.pbtxt ./models/simple_identity_fp32/config.pbtxt
Expand Down
Loading