Skip to content

fix: add missing requirements.txt for federated-llm example#576

Open
31groot wants to merge 2 commits into
kubeedge:mainfrom
31groot:fix/add-requirements-federated-llm
Open

fix: add missing requirements.txt for federated-llm example#576
31groot wants to merge 2 commits into
kubeedge:mainfrom
31groot:fix/add-requirements-federated-llm

Conversation

@31groot

@31groot 31groot commented Jul 2, 2026

Copy link
Copy Markdown

What type of PR is this?
/kind documentation

What this PR does / why we need it:
federated-llm example had no requirements.txt, causing contributors
to hit ModuleNotFoundError with no guidance. Added dependencies based
on actual imports in model.py, FedAvg-PEFT.py, and FedAvgM-PEFT.py.

Dependencies added: torch, transformers, peft, tqdm, numpy, evaluate.

Which issue(s) this PR fixes:
Fixes #563

Signed-off-by: Parv Agrawal <agrawalparv13@gmail.com>
@kubeedge-bot kubeedge-bot added the kind/documentation Categorizes issue or PR as related to documentation. label Jul 2, 2026
@kubeedge-bot kubeedge-bot requested review from Poorunga and hsj576 July 2, 2026 17:31
@kubeedge-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 31groot
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 added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 2, 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 introduces a requirements.txt file for the federated LLM example, specifying core dependencies such as torch, transformers, peft, and evaluate. The feedback highlights a missing dependency, rouge_score, which is required by the evaluate library's ROUGE metric and should be added to prevent runtime import errors.

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.

peft>=0.4.0
tqdm>=4.65.0
numpy>=1.24.0
evaluate>=0.4.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The evaluate library's ROUGE metric (used in model.py via load_metric("rouge")) requires the rouge_score package to be installed. Without it, running the evaluation will fail with an ImportError. Please add rouge_score to the requirements.

evaluate>=0.4.0
rouge_score>=0.1.2

Signed-off-by: Parv Agrawal <agrawalparv13@gmail.com>
@31groot

31groot commented Jul 3, 2026

Copy link
Copy Markdown
Author

/assign @jaypume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/documentation Categorizes issue or PR as related to documentation. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Core setup failures on fresh install: API rename, missing class, wrong docs path, undocumented deps

3 participants