fix(examples): replace hardcoded developer paths in smart_coding#580
fix(examples): replace hardcoded developer paths in smart_coding#580karanthengane23 wants to merge 2 commits into
Conversation
The smart_coding_learning_bench example (both comment/ and issue/ sub-benchmarks) contained hardcoded absolute paths pointing to the original contributor's local machine (/home/xiebo/... and /root/xieb/...), making the example non-portable and causing FileNotFoundError/HFValidationError for any other contributor. - benchmarkingjob.yaml: workspace, testenv, and algorithm config urls changed to relative paths (./...) - testenv.yaml: train_data and test_data_info changed to relative dataset paths, following the convention already used elsewhere in the repo (e.g. llm-edge-benchmark-suite) - basemodel.py: replaced hardcoded local model checkpoint path with the public Hugging Face model id (Qwen/Qwen2.5-Coder-1.5B-Instruct) so the model downloads correctly for any user instead of assuming a pre-existing local copy Addresses Bug 2 (hardcoded /home/xiebo/ and /root/xieb/ paths) documented in kubeedge#440, part of the Comprehensive Example Restoration effort tracked in kubeedge#230. Signed-off-by: Karan Thengane <karanthengane23@gmail.com>
|
Welcome @karanthengane23! It looks like this is your first PR to kubeedge/ianvs 🎉 |
There was a problem hiding this comment.
Code Review
This pull request replaces hardcoded absolute paths with relative paths in configuration files and updates the model path in basemodel.py from a local directory to the public Hugging Face model ID. The review feedback recommends further improving this by allowing the model name or path to be passed dynamically via kwargs instead of hardcoding it, which enhances flexibility for different environments.
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.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: karanthengane23 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 |
Per review feedback: hardcoding the model ID in Python still limits flexibility for other model variants or offline/air-gapped checkpoints. Accept model_name_or_path via kwargs, defaulting to the public Qwen/Qwen2.5-Coder-1.5B-Instruct model id from this PR's original fix. Signed-off-by: Karan Thengane <karanthengane23@gmail.com>
/kind cleanup
What this PR does / why we need it:
The
smart_coding_learning_benchexample (bothcomment/andissue/sub-benchmarks) contained hardcoded absolute paths pointing to the original contributor's local machine (/home/xiebo/...and/root/xieb/...). This makes the example non-portable — it fails withFileNotFoundError/HFValidationErrorfor any contributor other than the original author.Changes:
benchmarkingjob.yaml(both variants):workspace,testenv, and algorithm configurlfields changed to relative paths (./...), matching the convention already used elsewhere in the repo.testenv.yaml(both variants):train_dataandtest_data_infochanged to relative dataset paths (./dataset/smart_coding/...).basemodel.py(both variants): replaced the hardcoded local model checkpoint path with the public Hugging Face model id (Qwen/Qwen2.5-Coder-1.5B-Instruct), so the model downloads correctly for any user instead of assuming a pre-existing local copy at a specific path.I verified these paths are still broken on current
main, and confirmed no open PR currently fixes this specific example (PR #420 attempted a similar fix for a different example,cifar100, but was closed for using non-functional/path/to/...placeholders instead of real relative paths — this PR uses genuinely portable relative paths throughout, consistent with the reviewer feedback on that PR).Which issue(s) this PR fixes:
Addresses Bug 2 ("Hardcoded
/home/xiebo/and/root/xieb/paths") documented in #440, and is part of the broader Comprehensive Example Restoration effort tracked in #230.