Skip to content

fix(aoa/TForest) : add requirements.txt and harden hardcoded paths in tools.py#546

Open
SurbhiD404 wants to merge 1 commit into
kubeedge:mainfrom
SurbhiD404:fix-tforest-dependencies
Open

fix(aoa/TForest) : add requirements.txt and harden hardcoded paths in tools.py#546
SurbhiD404 wants to merge 1 commit into
kubeedge:mainfrom
SurbhiD404:fix-tforest-dependencies

Conversation

@SurbhiD404

Copy link
Copy Markdown

Summary

Fixes the dependency and path-handling issues reported in #323 for the TForest example.

Changes

  • Add requirements.txt containing the runtime dependencies required by the TForest example:

    • numpy
    • joblib
    • matplotlib
    • statsmodels
    • scienceplots
    • scikit-learn
    • tqdm
    • pandas
  • Replace hardcoded relative paths in tools.py with pathlib-based paths resolved relative to the script location.

Issue Reproduction

On a clean environment, running the TForest example fails immediately with:

ModuleNotFoundError: No module named 'statsmodels'

In addition, tools.py relied on relative paths that depend on the current working directory, making execution fragile when launched from different locations.

Validation

Installed dependencies using:

pip install -r examples/aoa/single_task_bench/TForest/requirements.txt

Verified imports:

python -c "import numpy, joblib, matplotlib, statsmodels, scienceplots, sklearn, tqdm, pandas; print('All imports OK')"

Output:

All imports OK

After installing dependencies, execution proceeds beyond the original import failure and reaches the next stage of the workflow.

Fixes #323

@kubeedge-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: SurbhiD404
To complete the pull request process, please assign moorezheng after the PR has been reviewed.
You can assign the PR to them by writing /assign @moorezheng 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 added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 14, 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 adds a requirements.txt file for the TForest benchmark and refactors path resolution in tools.py to use pathlib.Path relative to the file's base directory. Feedback suggests improving the robustness of load_test by resolving any relative path argument relative to BASE_DIR as well.

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.

Comment thread examples/aoa/single_task_bench/TForest/tools.py Outdated
@kubeedge-bot kubeedge-bot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jun 14, 2026
@SurbhiD404 SurbhiD404 force-pushed the fix-tforest-dependencies branch 4 times, most recently from 89e222a to 52a6139 Compare June 14, 2026 12:29
…n tools.py

Signed-off-by: Surbhi Dharvan <dharvansurbhi@gmail.com>
@SurbhiD404 SurbhiD404 force-pushed the fix-tforest-dependencies branch from 52a6139 to 86e1e16 Compare June 14, 2026 12:33
@kubeedge-bot kubeedge-bot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[PRE-TASK] : Critical Environment Integrity and Data Integration Bugs in examples/aoa/single_task_bench/Example

2 participants