Skip to content

Commit

Permalink
late import prettytable (NVIDIA#10912)
Browse files Browse the repository at this point in the history
Signed-off-by: Maanu Grover <[email protected]>
  • Loading branch information
maanug-nv authored and artbataev committed Oct 22, 2024
1 parent d9d1f90 commit 23eee74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nemo/lightning/pytorch/callbacks/debugging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pytorch_lightning as pl
import torch
from prettytable import PrettyTable
from pytorch_lightning.callbacks import Callback

from nemo.lightning.pytorch.optim.megatron import MegatronOptimizerModule
Expand Down Expand Up @@ -141,6 +140,8 @@ def find_grad_tensor(param: torch.Tensor) -> Optional[torch.Tensor]:

# create table only if there is something to print
if any(param_keys) or any(grad_keys):
from prettytable import PrettyTable

debug_table = PrettyTable()
debug_table.add_column("Parameter", names_col)

Expand Down

0 comments on commit 23eee74

Please sign in to comment.