BioNeMo Conversion to Recipes#4001
Merged
holgerroth merged 2 commits intoNVIDIA:mainfrom Jan 21, 2026
Merged
Conversation
Collaborator
Author
|
/build |
ZiyueXu77
previously approved these changes
Jan 21, 2026
Contributor
Greptile SummaryThis PR cherry-picks #3982 to add BioNeMo Task Fitting with PyTorch. The changes replace the previous BioNeMo implementation with a cleaner PyTorch-based approach for federated protein embeddings and MLP training. Major Changes:
Key Improvements:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant InferenceJob as Inference Job (job.py)
participant InferenceClient as Inference Client
participant ESM2Model as ESM2 Model
participant TrainingJob as Training Job (job.py)
participant TrainingClient as MLP Training Client
participant Server as FedAvg Server
Note over User,Server: Phase 1: Embedding Extraction
User->>InferenceJob: Run inference job
InferenceJob->>Server: Initialize FedAvgRecipe (1 round)
Server->>InferenceClient: Send inference task
InferenceClient->>ESM2Model: Run infer_esm2 subprocess
ESM2Model-->>InferenceClient: Return protein embeddings
InferenceClient->>InferenceClient: Save embeddings to /tmp/data/.../results
InferenceClient->>Server: Send metadata (num_sequences, shapes)
Note over User,Server: Phase 2: MLP Training
User->>TrainingJob: Run training job (select mode)
TrainingJob->>Server: Initialize FedAvgRecipe (50 rounds)
loop For each round (1-50)
Server->>TrainingClient: Send global model weights
TrainingClient->>TrainingClient: Load embeddings and labels
TrainingClient->>TrainingClient: Evaluate global model
TrainingClient->>TrainingClient: Train locally for N epochs
TrainingClient->>TrainingClient: Evaluate trained model
TrainingClient->>Server: Send updated weights + metrics
Server->>Server: Aggregate weights from all clients
end
Server-->>User: Final global model
User->>User: View results in TensorBoard
|
Fixes # . ### Description Convert bionemo examples to use FedAvgRecipe ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] 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. - [x] Quick tests passed locally by running `./runtest.sh`. - [ ] In-line docstrings updated. - [ ] Documentation updated. --------- Signed-off-by: Holger Roth <hroth@nvidia.com> Co-authored-by: Chester Chen <512707+chesterxgchen@users.noreply.github.com>
Fixes # . ### Description Switch to PyTorch for task fitting experiments. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] 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. --------- Signed-off-by: Holger Roth <hroth@nvidia.com> Co-authored-by: root <root@r1u14.cm.cluster>
a1d008d to
ebbbeb8
Compare
ZiyueXu77
approved these changes
Jan 21, 2026
Collaborator
Author
|
/build |
This was referenced Mar 9, 2026
Merged
This was referenced Mar 25, 2026
Add hello-numpy-robust example with optional median aggregation and poisoned-client simulation
#4373
Closed
Closed
This was referenced Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes # .
Description
Cherry-pick #3943 and #3982
Types of changes
./runtest.sh.