refactor(backend): typing for park and unpark operations#517
Open
Graffioh wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 17 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="server/src/qwen3/qwen3_backend.h">
<violation number="1" location="server/src/qwen3/qwen3_backend.h:79">
P1: Bare `park` and `unpark` commands no longer park/reload Qwen3 weights: they now pass `ParkTarget::Empty`, which this backend rejects. Preserve Qwen3's no-target behavior by treating `Empty` as including the target model in both implementations.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
|
||
| bool park(const std::string & what) override; | ||
| bool unpark(const std::string & what) override; | ||
| bool park(ParkTarget target) override; |
Contributor
There was a problem hiding this comment.
P1: Bare park and unpark commands no longer park/reload Qwen3 weights: they now pass ParkTarget::Empty, which this backend rejects. Preserve Qwen3's no-target behavior by treating Empty as including the target model in both implementations.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At server/src/qwen3/qwen3_backend.h, line 79:
<comment>Bare `park` and `unpark` commands no longer park/reload Qwen3 weights: they now pass `ParkTarget::Empty`, which this backend rejects. Preserve Qwen3's no-target behavior by treating `Empty` as including the target model in both implementations.</comment>
<file context>
@@ -76,8 +76,8 @@ class Qwen3Backend : public ModelBackend {
- bool park(const std::string & what) override;
- bool unpark(const std::string & what) override;
+ bool park(ParkTarget target) override;
+ bool unpark(ParkTarget target) override;
bool is_target_parked() const override { return parked_; }
</file context>
Contributor
Author
There was a problem hiding this comment.
false positive.
before this PR "" was not considered in the condition -> it returned false
now we have ParkTarget::Empty, but qwen3 still checks only for TargetModel and DraftModel -> still return false
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace string-based
ModelBackend::parkandunparkarguments with a typedParkTargetenum. Centralize enum/string conversion, parse daemon arguments at the protocol boundary, and preserve each backend's existing behavior for commands without an explicit target.Validation
ModelBackendimplementations, internal callers, and test mocks use the typed API.git diff --checkpasses.