Skip to content

Conversation

@ZiyueXu77
Copy link
Collaborator

Fixes # .

Description

cherry pick #4088 to 2.7

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 February 2, 2026 15:51
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 2, 2026

Greptile Overview

Greptile Summary

This PR cherry-picks updates from PR #4088 to the 2.7 branch, improving the AMPLIFY tutorial notebook with bug fixes and documentation enhancements.

Key Changes:

  • Fixed string interpolation bug: Changed from shell-style $task to Python f-string {task} syntax in the data combination loop
  • Corrected typo: "Combing" → "Combining"
  • Updated Python version requirement in metadata from 3.10.12 to 3.11.0
  • Enhanced installation instructions with explicit Python 3.11 compatibility warning
  • Improved documentation structure by adding "Prerequisites" section and reorganizing content
  • Fixed numbered list sequence (was 1,2,3,5, now correctly 1,2,3,4)
  • Grammar fixes: "set up" → "is set up", "recommoned" → "recommend"
  • Removed specific date reference "(at commit from Jan 13, 2025)" for better maintainability
  • Reformatted JSON structure with consistent 2-space indentation

The previously reported string interpolation issue has been properly resolved in this update.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward documentation and formatting improvements to a tutorial notebook. The critical string interpolation bug has been properly fixed, typos corrected, and Python version requirements clarified. No functional code changes affect the actual implementation logic.
  • No files require special attention

Important Files Changed

Filename Overview
examples/tutorials/self-paced-training/part-5_federated_learning_applications_in_industries/chapter-11_federated_learning_in_healthcare_lifescience/11.2_drug_discovery/11.2.2_drug_discovery_amplify/finetuning_amplify.ipynb Tutorial notebook improvements including string interpolation fix, typo corrections, and Python version update to 3.11.0

Sequence Diagram

sequenceDiagram
    participant User
    participant Notebook as Jupyter Notebook
    participant FLAb as FLAb Repository
    participant AMPLIFY as AMPLIFY Model
    participant NVFlare as NVFlare Framework
    participant Clients as FL Clients (6)
    
    User->>Notebook: Start tutorial
    Notebook->>FLAb: Clone repository
    FLAb-->>Notebook: Antibody dataset (6 properties)
    Notebook->>AMPLIFY: Clone & install AMPLIFY
    AMPLIFY-->>Notebook: 120M pretrained model
    
    Note over Notebook,FLAb: Data Preparation Phase
    loop For each task (aggregation, binding, etc.)
        Notebook->>Notebook: Run combine_data.py
        Notebook->>Notebook: Combine heavy/light sequences
        Notebook->>Notebook: Split train/test (80/20)
    end
    
    Note over Notebook,Clients: Local Training Phase
    Notebook->>NVFlare: Start local training (1 round)
    NVFlare->>Clients: Distribute model to 6 clients
    loop 3 local epochs
        Clients->>Clients: Train on local task data
    end
    Clients-->>NVFlare: Return trained models
    
    Note over Notebook,Clients: Federated Learning Phase
    Notebook->>NVFlare: Start FedAvg (3 rounds)
    loop 3 FL rounds
        NVFlare->>Clients: Distribute global model
        loop 1 local epoch
            Clients->>Clients: Train on task-specific data
            Clients->>Clients: Apply ExcludeParamsFilter
        end
        Clients-->>NVFlare: Return trunk updates (no regression head)
        NVFlare->>NVFlare: Aggregate using FedAvg
        NVFlare->>NVFlare: Update global model
    end
    
    Note over Notebook,User: Visualization Phase
    Notebook->>Notebook: Generate RMSE plots
    Notebook->>Notebook: Generate Pearson coefficient plots
    Notebook-->>User: Display comparison results
Loading

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

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 is a cherry-pick of #4088 to the 2.7 branch, primarily adding Python 3.11 environment requirement documentation to the AMPLIFY tutorial notebook. The changes improve the setup instructions by clarifying version requirements and updating installation commands to use the more explicit python3 -m pip syntax.

Changes:

  • Added prominent note about Python 3.11 requirement with warning about dependency conflicts
  • Updated pip installation commands to use python3 -m pip instead of pip
  • Reorganized documentation sections with clearer "Installation" heading

💡 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, no comments

Edit Code Review Agent Settings | Greptile

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, no comments

Edit Code Review Agent Settings | Greptile

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, no comments

Edit Code Review Agent Settings | Greptile

@ZiyueXu77
Copy link
Collaborator Author

build

@ZiyueXu77 ZiyueXu77 requested a review from holgerroth February 2, 2026 16:35
@ZiyueXu77 ZiyueXu77 enabled auto-merge (squash) February 2, 2026 16:44
@ZiyueXu77
Copy link
Collaborator Author

/build

@ZiyueXu77 ZiyueXu77 merged commit 58b94e3 into NVIDIA:2.7 Feb 2, 2026
19 of 20 checks passed
@ZiyueXu77 ZiyueXu77 deleted the apf_version_27 branch February 2, 2026 18:14
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