Skip to content

Conversation

@Mr-Neutr0n
Copy link

Bug

FusedSGD contains error messages that reference 'FusedAdam' instead of 'FusedSGD', a copy-paste artifact from duplicating the FusedAdam implementation.

Fix

Updated error message strings to reference the correct class name 'FusedSGD'.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This PR fixes two error messages in FusedSGD that incorrectly referenced FusedAdam instead of FusedSGD, a copy-paste artifact from when the code was duplicated from the FusedAdam implementation.

  • Fixed deprecation warning message on line 126 from "set_grad_none kwarg in FusedAdam constructor" to "set_grad_none kwarg in FusedSGD constructor"
  • Fixed ValueError message on line 150 from "but FusedAdam was initialized" to "but FusedSGD was initialized"

The changes are purely cosmetic string corrections that improve error message accuracy. The logic and behavior remain unchanged.

Confidence Score: 5/5

  • This PR is completely safe to merge with zero risk
  • The changes are limited to correcting two string literals in error messages. No logic, functionality, or API changes. The fix is trivial, correct, and improves code quality by removing confusing copy-paste artifacts.
  • No files require special attention

Important Files Changed

Filename Overview
transformer_engine/pytorch/optimizers/fused_sgd.py Fixed two error messages that incorrectly referenced FusedAdam instead of FusedSGD in deprecation warning and ValueError

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

@ptrendx
Copy link
Member

ptrendx commented Feb 11, 2026

Signed-off-by: Mr-Neutr0n <64578610+Mr-Neutr0n@users.noreply.github.com>
@Mr-Neutr0n Mr-Neutr0n force-pushed the fix/fusedsgd-copy-paste-error-messages branch from c1ab60a to 18b0930 Compare February 12, 2026 01:35
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

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