Repository navigation
fix(research): resolve undefined names (tqdm import, raw_size_to_cache) - #1640
Open
sarankumar1325 wants to merge 1 commit into
Open
sarankumar1325 wants to merge 1 commit into
sarankumar1325 wants to merge 1 commit into
Conversation
…vation_beacon - coderag_eval/test/create/utils.py: cost_esitmate used tqdm without importing it. - activation_beacon/src/modeling_beacon.py: Memory.update used the undefined local raw_size_to_cache; it must read self._raw_size_to_cache, like the condition just above. Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com>
This branch has not been deployed
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.
What
Two
NameErrors inresearch/code, found withruff --select F821:research/BGE_Coder/evaluation/coderag_eval/test/create/utils.py:cost_esitmate()callstqdm(...)but the module never imports it (the sibling scripts in that folder dofrom tqdm import tqdm).research/Long_LLM/activation_beacon/src/modeling_beacon.py:Memory.updateguards withif self._raw_size_to_cache > 0:and then slices withstart=-raw_size_to_cache, a name that is not defined in that method (the same-named locals live inforward). It now readsself._raw_size_to_cache, so the raw-KV branch no longer raisesNameError.Verification
ruff check --select F821is clean on both files after the change (it reported the three undefined-name errors before), and both files compile. These are research scripts that need GPUs/checkpoints and have no tests in the repo (tests/only covers theFlagEmbeddingpackage), so I did not add a test.Notes
Not overlapping with #1638 (tokenizer in
save_merged_model).AI assistance
This PR was prepared with AI assistance (Grok Bot, on behalf of @sarankumar1325).