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

fix: should check model status before start it #1277

Merged
merged 3 commits into from
Sep 20, 2024
Merged

Conversation

vansangpfiev
Copy link
Contributor

Describe Your Changes

llamacpp engine does not handle the case when we load a model second time. Should check the model's status before starting it.

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@vansangpfiev vansangpfiev marked this pull request as ready for review September 20, 2024 04:38
@@ -342,20 +342,22 @@ void server::LoadModel(const HttpRequestPtr& req,
auto func =
engines_[engine_type].dl->get_function<EngineI*()>("get_engine");
engines_[engine_type].engine = func();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only set logger for engine once, or it will crash if load/unload/load model

@vansangpfiev vansangpfiev merged commit 3f7d3ec into dev Sep 20, 2024
4 checks passed
@vansangpfiev vansangpfiev deleted the fix/run-flaky branch September 20, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants