Skip to content

simple_trainer: only pass fused=True to torch.optim.Adam (fixes --visible_adam / --sparse_grad) - #1086

Open
kleinicke wants to merge 1 commit into
nerfstudio-project:mainfrom
fastforks:pr/visible-adam-fused
Open

kleinicke wants to merge 1 commit into
nerfstudio-project:mainfrom
fastforks:pr/visible-adam-fused

Conversation

@kleinicke

Copy link
Copy Markdown
Contributor

Since b60e917 ("set default adam to fused"), create_splats_with_optimizers passes fused=True to every optimizer class. Only torch.optim.Adam accepts it, so --visible_adam and --sparse_grad crash before the first step:

TypeError: SelectiveAdam.__init__() got an unexpected keyword argument 'fused'
TypeError: SparseAdam.__init__() got an unexpected keyword argument 'fused'

This PR passes fused=True only when the class is torch.optim.Adam, so the default path is unchanged.

Since b60e917 (set default adam to fused) --visible_adam and --sparse_grad
crash when the optimizers are built: SelectiveAdam.__init__() and
SparseAdam.__init__() got an unexpected keyword argument 'fused'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant