Skip to content

Fix esm2 finetune loss#959

Merged
yzhang123 merged 11 commits into
mainfrom
fix_esm2_finetune_loss
Jun 30, 2025
Merged

Fix esm2 finetune loss#959
yzhang123 merged 11 commits into
mainfrom
fix_esm2_finetune_loss

Conversation

@yzhang123
Copy link
Copy Markdown
Collaborator

@yzhang123 yzhang123 commented Jun 26, 2025

Description

  1. fixed esm2 finetuning loss for token classification, regression, and sequence classification to work with data parallelism
    and classification to work with vocab tp parallelism

  2. updated fine-tuning notebook to have test evaluation

  3. added accuracy threshold to fine-tuning tests

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactor
  • Documentation update
  • Other (please describe):

CI Pipeline Configuration

Configure CI behavior by applying the relevant labels:

Note

By default, the notebooks validation tests are skipped unless explicitly enabled.

Authorizing CI Runs

We use copy-pr-bot to manage authorization of CI
runs on NVIDIA's compute resources.

  • If a pull request is opened by a trusted user and contains only trusted changes, the pull request's code will
    automatically be copied to a pull-request/ prefixed branch in the source repository (e.g. pull-request/123)
  • If a pull request is opened by an untrusted user or contains untrusted changes, an NVIDIA org member must leave an
    /ok to test comment on the pull request to trigger CI. This will need to be done for each new commit.

Usage

TODO: Add code snippet

Pre-submit Checklist

  • I have tested these changes locally
  • I have updated the documentation accordingly
  • I have added/updated tests as needed
  • All existing tests pass successfully

Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 27, 2025

Codecov Report

❌ Patch coverage is 67.85714% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.18%. Comparing base (2d73084) to head (e58d630).
⚠️ Report is 377 commits behind head on main.

Files with missing lines Patch % Lines
...onemo-esm2/src/bionemo/esm2/model/finetune/loss.py 78.26% 5 Missing ⚠️
...mo-esm2/src/bionemo/esm2/model/finetune/dataset.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #959      +/-   ##
==========================================
- Coverage   84.18%   84.18%   -0.01%     
==========================================
  Files         144      144              
  Lines        9227     9231       +4     
==========================================
+ Hits         7768     7771       +3     
- Misses       1459     1460       +1     
Files with missing lines Coverage Δ
...mo-esm2/src/bionemo/esm2/model/finetune/dataset.py 79.24% <20.00%> (+2.10%) ⬆️
...onemo-esm2/src/bionemo/esm2/model/finetune/loss.py 85.00% <78.26%> (-9.60%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
Comment thread sub-packages/bionemo-esm2/src/bionemo/esm2/model/finetune/loss.py
Comment thread sub-packages/bionemo-esm2/src/bionemo/esm2/model/finetune/loss.py Outdated
Comment thread sub-packages/bionemo-esm2/src/bionemo/esm2/model/finetune/loss.py Outdated
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
@yzhang123 yzhang123 requested a review from jstjohn June 27, 2025 18:31
Signed-off-by: Yang Zhang <yangzhang@nvidia.com>
@yzhang123 yzhang123 enabled auto-merge June 30, 2025 16:35
Comment thread sub-packages/bionemo-esm2/src/bionemo/esm2/model/finetune/loss.py
Comment thread sub-packages/bionemo-esm2/src/bionemo/esm2/model/finetune/loss.py
Copy link
Copy Markdown
Collaborator

@skothenhill-nv skothenhill-nv left a comment

Choose a reason for hiding this comment

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

thanks yang!

@yzhang123 yzhang123 added this pull request to the merge queue Jun 30, 2025
Merged via the queue into main with commit 5c254b6 Jun 30, 2025
28 checks passed
@yzhang123 yzhang123 deleted the fix_esm2_finetune_loss branch June 30, 2025 18:48
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.

6 participants