Reorganize Collab examples by difficulty - #4960
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4960 +/- ##
=======================================
Coverage 64.28% 64.28%
=======================================
Files 1030 1030
Lines 103739 103739
=======================================
+ Hits 66686 66693 +7
+ Misses 37053 37046 -7
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:
|
nvidianz
left a comment
There was a problem hiding this comment.
Notice the unit test for collab example. I think that's too much, should we remove it?
|
@nvidianz Good point — agreed that asserting example behavior is testing documentation. Pushed 3f91cc7:
If you'd rather have zero pytest coupling to examples, I'd swap the smoke layer for a CI step that runs |
Per review feedback, drop assertions on example training behavior: examples are documentation. Keep one parametrized smoke test that imports each cataloged example and finalizes its recipe, as a cheap alarm for API drift. The torch-free base-install constraint moves fully to the library level: the public-surface torch test now also imports CollabRecipe, the export the removed example test covered.
3f91cc7 to
a644012
Compare
Greptile SummaryReorganizes Collab examples by difficulty.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (9): Last reviewed commit: "Merge branch 'main' into feat/reorganize..." | Re-trigger Greptile |
What changed
examples/hello-world/hello-collab/.hello_fedavg,simple_split_learning, async aggregation, and swarm toexamples/advanced/collab/while preserving their sharedcollabpackage layout.Why
NVFlare already tiers examples by difficulty. Putting the minimal Collab workflow beside
hello-numpymakes the recommended custom-workflow path visible where new users start, while keeping the more specialized response-callback, split-learning, and decentralized workflows in the advanced tier.The hello example is already self-contained in one file, so it does not depend on the shared advanced package context.
Validation
pytest tests/unit_test/collab/examples_test.py -q— 2 passedsimple_split_learningimport and recipe finalization — passed./runtest.sh -s --skip-install— Black, isort, flake8, and agent-skill lint passed./build_doc.sh --html --skip-api— Sphinx HTML build passedgit diff --check