Skip to content

Conversation

@nvkevlu
Copy link
Collaborator

@nvkevlu nvkevlu commented Dec 31, 2025

Comprehensively remove mention of SAG and update instructions for running jobs.

Description

Comprehensively remove mention of SAG since the example no longer exists, and update instructions for running jobs.

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.

Copilot AI review requested due to automatic review settings December 31, 2025 18:08
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 removes all references to "SAG" (Scatter and Gather) from the codebase, updating example names, paths, and documentation to reflect that the hello-numpy-sag example has been consolidated into the hello-numpy example.

Key Changes:

  • Updated all references from hello-numpy-sag to hello-numpy across documentation and examples
  • Cleaned up trailing whitespace in documentation files
  • Updated command examples, file paths, and configuration references

Reviewed changes

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

Show a summary per file
File Description
nvflare/apis/job_def.py Updated deployment map example in docstring to use hello-numpy naming
examples/tutorials/logging.ipynb Updated simulator commands and workspace paths from hello-numpy-sag to hello-numpy
examples/tutorials/flare_simulator.ipynb Updated job folder paths and workspace references in tutorial
examples/tutorials/flare_api.ipynb Updated job submission paths and example job references
examples/advanced/keycloak-site-authentication/README.md Updated job references and removed trailing spaces in commands
examples/advanced/job-level-authorization/setup.sh Updated source path for copying hello-numpy example
examples/advanced/job-level-authorization/jobs/job1/meta.json Updated job name from hello-numpy-sag to hello-numpy
examples/advanced/job-level-authorization/README.md Updated job description and removed trailing blank lines
examples/advanced/federated-policies/setup.sh Updated source path for copying hello-numpy example
docs/user_guide/nvflare_cli/poc_command.rst Updated submit_job examples and removed trailing spaces
docs/user_guide/nvflare_cli/fl_simulator.rst Updated simulator command examples and removed trailing spaces throughout
docs/user_guide/data_scientist_guide/poc.rst Updated job submit command example
docs/user_guide/core_concepts/job.rst Updated deploy_map example in job documentation and removed trailing spaces
docs/user_guide/admin_guide/configurations/logging_configuration.rst Updated simulator and job API examples
docs/programming_guide/migrating_to_flare_api.rst Updated job paths and app_name references, removed trailing spaces
docs/programming_guide/controllers/scatter_and_gather_workflow.rst Updated example reference link and description
docs/examples/hello_scatter_and_gather.rst Comprehensive updates to hello-numpy references and note about Recipe API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 31, 2025

Greptile Summary

This PR comprehensively removes all references to the hello-numpy-sag example and replaces them with hello-numpy throughout documentation, examples, and code comments. The changes reflect that the SAG (Scatter and Gather) example no longer exists as a standalone example, and users should now use the hello-numpy example which uses the modern Recipe API.

Key changes:

  • Rewrote main tutorial (docs/examples/hello_scatter_and_gather.rst) to focus on Recipe API approach instead of legacy SAG structure
  • Updated 19 files across documentation, example scripts, notebooks, and configuration files
  • Changed all command examples, paths, and references from hello-numpy-sag to hello-numpy
  • Updated setup scripts to copy hello-numpy directory instead of the removed hello-numpy-sag
  • Modified job metadata and configuration examples to reflect new naming

The changes are consistent and thorough, covering all instances where hello-numpy-sag was referenced.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • This is a purely documentation and example update PR with no functional code changes. All modifications are straightforward find-and-replace operations changing hello-numpy-sag to hello-numpy. The referenced hello-numpy directory exists and the changes are consistent across all 19 files.
  • No files require special attention

Important Files Changed

Filename Overview
docs/examples/hello_scatter_and_gather.rst Completely rewrote tutorial to focus on hello-numpy with Recipe API instead of hello-numpy-sag
docs/user_guide/nvflare_cli/fl_simulator.rst Updated examples and instructions for hello-numpy with Recipe API, added guidance for traditional jobs
examples/advanced/federated-policies/setup.sh Updated script to copy hello-numpy example instead of hello-numpy-sag
examples/advanced/job-level-authorization/setup.sh Updated script to copy hello-numpy example instead of hello-numpy-sag
nvflare/apis/job_def.py Updated deploy_map documentation example comments to use hello-numpy naming

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Docs as Documentation
    participant Examples as Example Scripts
    participant Users as End Users
    
    Note over Dev,Users: PR #3924: Remove SAG References
    
    Dev->>Docs: Update hello_scatter_and_gather.rst
    Note right of Docs: Change from hello-numpy-sag<br/>to hello-numpy with Recipe API
    
    Dev->>Docs: Update programming guides
    Note right of Docs: Change all SAG example links<br/>to hello-numpy
    
    Dev->>Docs: Update CLI documentation
    Note right of Docs: Modify simulator commands<br/>from hello-numpy-sag to hello-numpy
    
    Dev->>Examples: Update setup.sh scripts
    Note right of Examples: Change copied directory<br/>from hello-numpy-sag to hello-numpy
    
    Dev->>Examples: Update meta.json files
    Note right of Examples: Rename job from<br/>hello-numpy-sag to hello-numpy
    
    Dev->>Examples: Update Jupyter notebooks
    Note right of Examples: Change all code cells<br/>to reference hello-numpy
    
    Dev->>Docs: Update template files
    Note right of Docs: Change Q&A examples<br/>to hello-numpy
    
    Users->>Docs: Read updated documentation
    Users->>Examples: Run hello-numpy example
    Note right of Users: Uses Recipe API instead<br/>of legacy SAG structure
Loading

@nvkevlu nvkevlu marked this pull request as draft December 31, 2025 18:47
@nvkevlu nvkevlu marked this pull request as ready for review December 31, 2025 20:08
@nvkevlu
Copy link
Collaborator Author

nvkevlu commented Dec 31, 2025

/build

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (2)

  1. examples/advanced/federated-policies/README.rst, line 101 (link)

    logic: Reference to numpy-sag should be updated to numpy or hello-numpy for consistency with the PR's goal.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

  2. .github/DISCUSSION_TEMPLATE/q-a.yml, line 38-40 (link)

    logic: hello-numpy-sag references should be updated to hello-numpy to match the current example name.

17 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@nvkevlu
Copy link
Collaborator Author

nvkevlu commented Dec 31, 2025

/build

Comment on lines +382 to +393
**For Recipe API examples** (like hello-numpy):

Recipe API jobs must be exported to traditional format before submission:

.. code-block:: bash
# Export the Recipe API job
cd hello-world/hello-numpy
python job.py --export_config
# Then submit the exported job after logging in to the FLARE console
submit_job /tmp/nvflare/jobs/job_config/hello-numpy
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not true though, that job can be writtent in a way to use PocEnv to execute directly

@@ -1,7 +1,7 @@
.. _hello_scatter_and_gather:
Copy link
Collaborator

Choose a reason for hiding this comment

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

this doc still call "docs/examples/hello_scatter_and_gather.rst"
does that matter?
why do we need to remove the name "sag"?

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.

2 participants