-
Notifications
You must be signed in to change notification settings - Fork 223
[LLM Tutorial] Restructure codes #3850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Holger Roth <[email protected]>
Greptile Summary
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant JobScript as "job.py"
participant FedJob
participant Server as "NVFlare Server"
participant Client as "NVFlare Client"
participant Trainer as "SFTTrainer"
User->>JobScript: "Execute python job.py"
JobScript->>FedJob: "Create FedJob with config"
JobScript->>FedJob: "Add FedAvg controller"
JobScript->>FedJob: "Add model persistor"
JobScript->>FedJob: "Configure ScriptRunner for clients"
JobScript->>FedJob: "Export and run simulator"
FedJob->>Server: "Initialize server with controller"
FedJob->>Client: "Initialize clients with client.py script"
loop "For each federated round"
Server->>Client: "Send global model"
Client->>Trainer: "Load global model"
Client->>Trainer: "Train on local data"
Trainer-->>Client: "Return trained model"
Client->>Server: "Send model updates"
Server->>Server: "Aggregate updates (FedAvg)"
end
Server-->>User: "Training complete"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 files reviewed, 2 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
...ning/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.2_llm_sft/job.py
Outdated
Show resolved
Hide resolved
...ing/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.3_llm_peft/job.py
Outdated
Show resolved
Hide resolved
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (5)
-
examples/tutorials/self-paced-training/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.4_llm_quantization/job.py, line 29 (link)logic:
train_scriptreferences old path but file moved tohf_sft_peft_fl.py(nosrc/prefix) -
examples/tutorials/self-paced-training/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.4_llm_quantization/job.py, line 77 (link)logic: File path references
src/directory but file moved tohf_sft_model.pyin root -
examples/tutorials/self-paced-training/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.4_llm_quantization/job.py, line 79 (link)logic: Module path references
src.prefix but files moved to root directory -
examples/tutorials/self-paced-training/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.5_llm_streaming/job.py, line 17-18 (link)logic: Imports reference
src.module but files moved to root directory -
examples/tutorials/self-paced-training/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.4_llm_quantization/job.py, line 129 (link)syntax: 'Clinet IDs' is mis-spelled
12 files reviewed, 5 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
…nto llm_tutorial_update
|
/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (2)
-
examples/tutorials/self-paced-training/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.4_llm_quantization/job.py, line 77-79 (link)logic:
src/directory was removed but still referenced here, causing import failure -
examples/tutorials/self-paced-training/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.4_llm_quantization/job.py, line 135 (link)syntax: Help text says "default to 5" but default is 3
17 files reviewed, 3 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
| def main(): | ||
| args = define_parser() | ||
| train_script = "src/hf_sft_peft_fl.py" | ||
| train_script = "job.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: train_script should be hf_sft_peft_fl.py not job.py (self-reference causes circular execution)
| train_script = "job.py" | |
| train_script = "hf_sft_peft_fl.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
examples/tutorials/self-paced-training/part-4_advanced_federated_learning/chapter-8_federated_LLM_training/08.5_llm_streaming/job.py, line 16-17 (link)logic: imports reference old
src/directory but files moved to current directory
19 files reviewed, 1 comment
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
Fixes # .
Description
Use consistent file names and code structure.
Types of changes
./runtest.sh.