Skip to content

Conversation

@nvkevlu
Copy link
Collaborator

@nvkevlu nvkevlu commented Jan 7, 2026

Fix path for FedAvgRecipe.

Description

Fix path for FedAvgRecipe.

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 January 7, 2026 16:39
@nvkevlu
Copy link
Collaborator Author

nvkevlu commented Jan 7, 2026

/build

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Greptile Overview

Greptile Summary

Updates import statements across experiment tracking examples and tests from from nvflare.app_opt.pt.recipes import FedAvgRecipe to from nvflare.app_opt.pt.recipes.fedavg import FedAvgRecipe. The new import path explicitly references the fedavg module, improving code clarity and consistency with the refactored module structure. Both import paths remain functional due to re-exports in __init__.py, ensuring backward compatibility.

Confidence Score: 5/5

  • Safe to merge - mechanical import path update with full backward compatibility
  • This PR consists entirely of mechanical import path changes from nvflare.app_opt.pt.recipes to nvflare.app_opt.pt.recipes.fedavg. The __init__.py file in the recipes package re-exports FedAvgRecipe, ensuring both import paths work correctly and maintaining backward compatibility. All changes are consistent across documentation files, example scripts, and test files. One similar file was identified outside this PR scope that could benefit from the same update.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
examples/advanced/experiment-tracking/mlflow/hello-lightning-mlflow/job.py 5/5 Updates import statement from nvflare.app_opt.pt.recipes to nvflare.app_opt.pt.recipes.fedavg
examples/advanced/experiment-tracking/mlflow/hello-pt-mlflow/job.py 5/5 Updates FedAvgRecipe import to use explicit fedavg module path
tests/integration_test/test_experiment_tracking_recipes.py 5/5 Updates test file import to use new path

Sequence Diagram

sequenceDiagram
    participant Code as "Example/Test Code"
    participant Init as "recipes/__init__.py"
    participant FedAvg as "recipes/fedavg.py"
    
    Note over Code,FedAvg: New Import Path (This PR)
    Code->>FedAvg: "from nvflare.app_opt.pt.recipes.fedavg import FedAvgRecipe"
    FedAvg-->>Code: "FedAvgRecipe class"
    
    Note over Code,FedAvg: Old Import Path (Still works)
    Code->>Init: "from nvflare.app_opt.pt.recipes import FedAvgRecipe"
    Init->>FedAvg: "Re-export from fedavg module"
    FedAvg-->>Init: "FedAvgRecipe class"
    Init-->>Code: "FedAvgRecipe class"
Loading

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 standardizes the import path for FedAvgRecipe across examples, tests, and documentation by changing from the implicit module-level import to the explicit submodule import path.

  • Updates import statement from from nvflare.app_opt.pt.recipes import FedAvgRecipe to from nvflare.app_opt.pt.recipes.fedavg import FedAvgRecipe
  • Ensures consistency with the rest of the codebase which already uses the explicit import path
  • Affects documentation, example code, and integration tests

Reviewed changes

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

Show a summary per file
File Description
tests/integration_test/test_experiment_tracking_recipes.py Updates FedAvgRecipe import path in integration test
examples/advanced/experiment-tracking/wandb/job.py Updates FedAvgRecipe import path in WandB experiment tracking example
examples/advanced/experiment-tracking/wandb/README.md Updates FedAvgRecipe import path in WandB documentation
examples/advanced/experiment-tracking/tensorboard/job.py Updates FedAvgRecipe import path in TensorBoard experiment tracking example
examples/advanced/experiment-tracking/tensorboard/README.md Updates FedAvgRecipe import path in TensorBoard documentation
examples/advanced/experiment-tracking/mlflow/hello-pt-mlflow/job.py Updates FedAvgRecipe import path in MLflow PyTorch example
examples/advanced/experiment-tracking/mlflow/hello-pt-mlflow/README.md Updates FedAvgRecipe import path in MLflow PyTorch documentation
examples/advanced/experiment-tracking/mlflow/hello-pt-mlflow-client/job.py Updates FedAvgRecipe import path in MLflow client-side tracking example
examples/advanced/experiment-tracking/mlflow/hello-pt-mlflow-client/README.md Updates FedAvgRecipe import path in MLflow client-side tracking documentation
examples/advanced/experiment-tracking/mlflow/hello-lightning-mlflow/job.py Updates FedAvgRecipe import path in MLflow Lightning example
examples/advanced/experiment-tracking/mlflow/hello-lightning-mlflow/README.md Updates FedAvgRecipe import path in MLflow Lightning documentation
examples/advanced/experiment-tracking/README.md Updates FedAvgRecipe import path in experiment tracking overview documentation

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

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.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 10, 2026

Additional Comments (1)

examples/hello-world/hello-numpy-cross-val/README.md
This file contains the old import path from nvflare.app_opt.pt.recipes import FedAvgRecipe on line 199, which should be updated to match the changes in this PR. Consider updating to from nvflare.app_opt.pt.recipes.fedavg import FedAvgRecipe for consistency.

@nvkevlu
Copy link
Collaborator Author

nvkevlu commented Jan 12, 2026

/build

@chesterxgchen chesterxgchen merged commit 895cdf8 into NVIDIA:main Jan 12, 2026
20 checks passed
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.

3 participants