fix: remove undefined LadeSpecDecLLM import from edge_model -- issue#568#569
fix: remove undefined LadeSpecDecLLM import from edge_model -- issue#568#569Priyanshu6968 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Priyanshu6968 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request removes the unused LadeSpecDec backend from the cloud-edge collaborative inference example and cleans up the llm_simple_qa example by replacing hardcoded absolute paths with relative paths and Hugging Face model IDs. It also adds a basic length check in the accuracy metric calculation. The review feedback points out that the EagleSpecDec backend is currently unreachable due to validation checks in edge_model.py and suggests making the accuracy metric check more robust to prevent potential TypeError exceptions when y_true is invalid.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| elif self.backend == "EagleSpecDec": | ||
| self.model = EagleSpecDecModel(**self.kwargs) |
There was a problem hiding this comment.
The "EagleSpecDec" backend is handled here in load(), but the validation check in __init__ (line 47) only permits ["huggingface", "vllm", "api"]. This makes the "EagleSpecDec" branch unreachable and will cause a ValueError during initialization if a user attempts to use it. Please update the allowed backends list in __init__ to include "EagleSpecDec".
| if not y_pred or len(y_pred) != len(y_true): | ||
| return 0 |
There was a problem hiding this comment.
If y_true is None or not a collection, calling len(y_true) will raise a TypeError. To make this function more robust and prevent potential runtime crashes, we should also check if y_true is valid before comparing their lengths.
| if not y_pred or len(y_pred) != len(y_true): | |
| return 0 | |
| if not y_true or not y_pred or len(y_pred) != len(y_true): | |
| return 0 |
2f022bd to
23c837f
Compare
Signed-off-by: Priyanshu6968 <priyanshunigam469@gmail.com>
23c837f to
84c441f
Compare
|
/assign @jaypume |
What type of PR is this?
/kind bug
What this PR does / why we need it:
edge_model.pyin thecloud-edge-collaborative-inference-for-llmexample importedLadeSpecDecLLMfrom themodelspackage, but that class is not defined or exported anywhere.This was a half merged "lookahead decoding" backend: the import and the
load()call site were added, but the implementation module and its export were never committed. This PR removes the dead wiring.Drop
LadeSpecDecLLMfrom thefrom models import ...statement.Remove the unreachable
elif self.backend == "LadeSpecDec"branch inload().Remove the stale
"LadeSepcDec"backend comment intest_queryrouting.yaml.Which issue(s) this PR fixes:
Fixes #568