Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
f1896c49
Unverified
Commit
f1896c49
authored
May 21, 2025
by
Graham King
Committed by
GitHub
May 21, 2025
Browse files
fix(llmctl): Add back the model_type in remove (#1158)
parent
b226b7b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
launch/llmctl/src/main.rs
launch/llmctl/src/main.rs
+11
-4
No files found.
launch/llmctl/src/main.rs
View file @
f1896c49
...
...
@@ -204,8 +204,8 @@ async fn handle_command(runtime: Runtime, namespace: String, command: Commands)
}
}
HttpCommands
::
Remove
{
model_type
}
=>
{
let
(
_
,
name
)
=
model_type
.into_parts
();
remove_model
(
&
distributed
,
&
name
)
.await
?
;
let
(
model_type
,
name
)
=
model_type
.into_parts
();
remove_model
(
&
distributed
,
model_type
,
&
name
)
.await
?
;
}
}
}
...
...
@@ -303,7 +303,11 @@ async fn list_models(
Ok
(())
}
async
fn
remove_model
(
distributed
:
&
DistributedRuntime
,
model_name
:
&
str
)
->
Result
<
()
>
{
async
fn
remove_model
(
distributed
:
&
DistributedRuntime
,
model_type
:
ModelType
,
model_name
:
&
str
,
)
->
Result
<
()
>
{
// We have to do this manually because normally the etcd lease system does it for us
let
watcher
=
ModelWatcher
::
new
(
distributed
.clone
(),
...
...
@@ -314,7 +318,10 @@ async fn remove_model(distributed: &DistributedRuntime, model_name: &str) -> Res
anyhow
::
bail!
(
"llmctl is only useful with dynamic workers"
);
};
let
active_instances
=
watcher
.entries_for_model
(
model_name
)
.await
?
;
for
entry
in
active_instances
{
for
entry
in
active_instances
.into_iter
()
.filter
(|
entry
|
entry
.model_type
==
model_type
)
{
let
network_name
=
ModelNetworkName
::
from_entry
(
&
entry
,
0
);
tracing
::
debug!
(
"deleting key: {network_name}"
);
etcd_client
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment