Skip to content

fix(examples): replace hardcoded developer paths in smart_coding#580

Open
karanthengane23 wants to merge 2 commits into
kubeedge:mainfrom
karanthengane23:fix-smart-coding-paths
Open

fix(examples): replace hardcoded developer paths in smart_coding#580
karanthengane23 wants to merge 2 commits into
kubeedge:mainfrom
karanthengane23:fix-smart-coding-paths

Conversation

@karanthengane23

Copy link
Copy Markdown

/kind cleanup

What this PR does / why we need it:

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/...). This makes the example non-portable — it fails with FileNotFoundError/HFValidationError for any contributor other than the original author.

Changes:

  • benchmarkingjob.yaml (both variants): workspace, testenv, and algorithm config url fields changed to relative paths (./...), matching the convention already used elsewhere in the repo.
  • testenv.yaml (both variants): train_data and test_data_info changed 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.

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>
@kubeedge-bot kubeedge-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 7, 2026
@kubeedge-bot

Copy link
Copy Markdown
Collaborator

Welcome @karanthengane23! It looks like this is your first PR to kubeedge/ianvs 🎉

@kubeedge-bot kubeedge-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kubeedge-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: karanthengane23
To complete the pull request process, please assign jaypume after the PR has been reviewed.
You can assign the PR to them by writing /assign @jaypume in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot requested review from Poorunga and hsj576 July 7, 2026 12:48
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants