Skip to content

Conversation

@ZiyueXu77
Copy link
Collaborator

@ZiyueXu77 ZiyueXu77 commented Aug 27, 2025

Fixes # .

Description

Following the job recipe doc, convert it to a tutorial notebook with hello-pt example.

Pending further tests once the recipe env PRs are merged

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

@ZiyueXu77 ZiyueXu77 marked this pull request as draft August 27, 2025 19:18
@ZiyueXu77 ZiyueXu77 marked this pull request as ready for review September 9, 2025 21:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a comprehensive Job Recipe tutorial notebook to demonstrate how to use NVFLARE's Job Recipes for simplified federated learning job creation and execution. The tutorial covers different execution environments and provides practical examples using PyTorch.

  • Converts job recipe documentation into an interactive tutorial notebook
  • Demonstrates FedAvg recipe usage with three execution environments (SimEnv, PocEnv, ProdEnv)
  • Includes supporting files for provisioning and client training scripts

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
examples/tutorials/job_recipe.ipynb Main tutorial notebook explaining Job Recipe concepts with executable examples
examples/tutorials/project.yml NVFLARE project configuration file for provisioning production environment
examples/tutorials/client.py PyTorch training script used in the Job Recipe examples
Comments suppressed due to low confidence (2)

examples/tutorials/job_recipe.ipynb:1

  • The parameter name startup_kit_location is inconsistent with the documented parameter name startup_kit_dir mentioned in line 221. This could cause confusion for users following the tutorial.
{

examples/tutorials/job_recipe.ipynb:1

  • The recipe creation code is duplicated from lines 73-81. Consider defining the recipe once at the beginning of the notebook and reusing it across different environment examples to avoid code duplication.
{

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@chesterxgchen chesterxgchen left a comment

Choose a reason for hiding this comment

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

  1. add few change suggestions
  2. you also need to add a separate section on edge simulations in the ExecEnv, which you could point to different tutorials for edge, or briefly talk about it.

@ZiyueXu77
Copy link
Collaborator Author

/build

@ZiyueXu77 ZiyueXu77 enabled auto-merge (squash) September 16, 2025 19:17
@holgerroth
Copy link
Collaborator

Minor comment. It looks good. In the future, we could add tutorials for adding filters and metric tracking.

@ZiyueXu77
Copy link
Collaborator Author

/build

Copy link
Collaborator

@chesterxgchen chesterxgchen left a comment

Choose a reason for hiding this comment

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

add few comments

@ZiyueXu77
Copy link
Collaborator Author

/build

@ZiyueXu77
Copy link
Collaborator Author

/build

Copy link
Collaborator

@YuanTingHsieh YuanTingHsieh left a comment

Choose a reason for hiding this comment

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

overall LGTM with a few suggestions

@ZiyueXu77
Copy link
Collaborator Author

/build

@ZiyueXu77 ZiyueXu77 dismissed chesterxgchen’s stale review September 19, 2025 15:40

dismiss changes fixed for merging

@ZiyueXu77 ZiyueXu77 merged commit d2ecc40 into NVIDIA:main Sep 19, 2025
20 checks passed
@ZiyueXu77 ZiyueXu77 deleted the recipe_nb branch September 19, 2025 15:40
chesterxgchen pushed a commit to chesterxgchen/NVFlare that referenced this pull request Sep 30, 2025
Fixes # .

### Description

Following the job recipe doc, convert it to a tutorial notebook with
hello-pt example.

Pending further tests once the recipe env PRs are merged

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Quick tests passed locally by running `./runtest.sh`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated.
chesterxgchen pushed a commit to chesterxgchen/NVFlare that referenced this pull request Oct 11, 2025
Fixes # .

### Description

Following the job recipe doc, convert it to a tutorial notebook with
hello-pt example.

Pending further tests once the recipe env PRs are merged

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Quick tests passed locally by running `./runtest.sh`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants