Fused_adam index out of range error

Open
#1,622 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python, pytorch

Research direction

Start by reading apex/optimizers/fused_adam.py at line 121 and reproduce the failure with an empty params list. Confirm the empty-list case no longer raises an index error while normal optimizer behavior remains unchanged, using the repository's existing test entry point if available.

Written by the indexing model from the issue text.

Description

bug

This line throws index out of range error when params is empty.
https://github.com/NVIDIA/apex/blob/d8643eff7f493d28e0fb26254829dbce211a2e25/apex/optimizers/fused_adam.py#L121

An easy fix would be to check if the list is empty or if it's self.capturable

Dominant language
Python
Stars
9k
Forks
1.5k
Avg merge
2d 4h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/apex

All issues in NVIDIA/apex

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.