Finish concrete Recipe entrypoint and documentation cleanup - #4983
Finish concrete Recipe entrypoint and documentation cleanup#4983nvkevlu wants to merge 7 commits into
Conversation
Greptile SummaryThe PR promotes concrete Recipe entrypoints while keeping lower-level job assembly encapsulated.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "address PR comments" | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
This PR finishes the shift toward concrete, named Recipe entrypoints (vs. instantiating Recipe directly or depending on exposing/generated FedJob objects), and updates docs/examples to reflect the intended separation between the high-level Recipe API and the lower-level FedJob API.
Changes:
- Introduces concrete recipe implementations for FedBPT and Kaplan–Meier examples, updating the
job.pyentrypoints to instantiate those recipes directly. - Refactors Swarm recipe construction to expose
min_clientsdirectly (instead of optionally accepting a pre-created backing job). - Updates user/programming guide docs to remove “technical preview” wording and clarify when to use Recipes vs
FedJob.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| research/fed-bpt/README.md | Updates FedBPT example narrative to describe the new concrete recipe entrypoint. |
| research/fed-bpt/job.py | Simplifies entrypoint to instantiate FedBPTRecipe directly. |
| research/fed-bpt/fedbpt_recipe.py | Adds a dedicated FedBPTRecipe encapsulating FedJob assembly and execution/export behavior. |
| nvflare/app_opt/pt/recipes/swarm.py | Refactors Swarm recipe construction to use min_clients directly and adjusts checkpoint bundling flow. |
| examples/advanced/kaplan-meier-he/README.md | Updates documentation to reflect use of a concrete KaplanMeierRecipe. |
| examples/advanced/kaplan-meier-he/km_recipe.py | Adds dedicated KaplanMeierRecipe encapsulating Kaplan–Meier FedJob assembly. |
| examples/advanced/kaplan-meier-he/job.py | Simplifies entrypoint to instantiate KaplanMeierRecipe directly. |
| docs/user_guide/data_scientist_guide/recipe_api.rst | Clarifies concrete recipes as the intended public constructor surface and separates Recipe vs FedJob guidance. |
| docs/user_guide/data_scientist_guide/job_recipe.rst | Updates note to remove technical-preview wording and point to FedJob docs for advanced workflows. |
| docs/programming_guide/fed_job_api.rst | Adds note clarifying FedJob docs are intentionally separate from Recipe docs. |
| docs/programming_guide/controllers/client_controlled_workflows.rst | Updates Swarm recipe examples/docs to include and explain min_clients. |
| docs/migration_guide.rst | Removes “technical preview” label from Job Recipe API migration note. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4983 +/- ##
=======================================
Coverage 64.26% 64.26%
=======================================
Files 1030 1030
Lines 103578 103577 -1
=======================================
+ Hits 66560 66561 +1
+ Misses 37018 37016 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Finishs concrete Recipe entrypoint and documentation cleanup.
Description
Recipe-facing application code should work through documented concrete recipe constructors without depending on the generated backing job. This keeps internal
FedJobassembly encapsulated while preserving the lower-level Job API for advanced use cases.CCWFJobparameter fromBaseSwarmLearningRecipeand exposedmin_clientsdirectly for job scheduling.KaplanMeierRecipeandFedBPTRecipeimplementations.job.pyentrypoints to instantiate concrete recipes without exposingRecipeorFedJob.FedAvgRecipeandCyclicRecipeas the primary public entrypoints.Validation
recipe.jobor instantiate the baseRecipe.Types of changes
./runtest.sh.