Skip to content

Commit

Permalink
update: disable coverage from certain line
Browse files Browse the repository at this point in the history
  • Loading branch information
kozistr committed Oct 7, 2023
1 parent 98186fc commit 9c260b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_optimizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def load_optimizer(optimizer: str) -> OPTIMIZER:

if optimizer.startswith('bnb'):
if HAS_BNB and torch.cuda.is_available():
return load_bnb_optimizer(optimizer)
return load_bnb_optimizer(optimizer) # pragma: no cover
raise ImportError(f'[-] bitsandbytes and CUDA required for bnb optimizers : {optimizer}')
if optimizer not in OPTIMIZERS:
raise NotImplementedError(f'[-] not implemented optimizer : {optimizer}')
Expand Down

0 comments on commit 9c260b1

Please sign in to comment.