Skip to content

Commit

Permalink
Add ListConfig as a possible instance type
Browse files Browse the repository at this point in the history
  • Loading branch information
RafayAK committed Oct 14, 2023
1 parent bddbc24 commit f37ebdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/rich_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import rich.tree
from hydra.core.hydra_config import HydraConfig
from lightning_utilities.core.rank_zero import rank_zero_only
from omegaconf import DictConfig, OmegaConf, open_dict
from omegaconf import ListConfig, DictConfig, OmegaConf, open_dict
from rich.prompt import Prompt

from src.utils import pylogger
Expand Down Expand Up @@ -58,7 +58,7 @@ def print_config_tree(
branch = tree.add(field, style=style, guide_style=style)

config_group = cfg[field]
if isinstance(config_group, DictConfig):
if isinstance(config_group, DictConfig | ListConfig):
branch_content = OmegaConf.to_yaml(config_group, resolve=resolve)
else:
branch_content = str(config_group)
Expand Down

0 comments on commit f37ebdf

Please sign in to comment.