Skip to content

Commit

Permalink
style fix for cfg
Browse files Browse the repository at this point in the history
Signed-off-by: Zhilin Wang <zhilinw@nvidia.com>
  • Loading branch information
Zhilin123 committed Apr 26, 2022
1 parent 4926bd1 commit a761b7b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ def __init__(self, cfg: DictConfig, trainer: Trainer = None):
self.max_seq_length = cfg.dataset.max_seq_length
self.cfg = cfg
# Check the presence of data_dir.
if not cfg.data_dir or not os.path.exists(cfg.data_dir):
if not cfg.dataset.data_dir or not os.path.exists(cfg.dataset.data_dir):
# Set default values of data_desc.
self._set_defaults_data_desc(cfg)
else:
self.data_dir = cfg.data_dir
self.data_dir = cfg.dataset.data_dir
# Update configuration of data_desc.
self._set_data_desc_to_cfg(cfg, cfg.data_dir, cfg.train_ds, cfg.validation_ds)
self._set_data_desc_to_cfg(cfg, cfg.dataset.data_dir, cfg.train_ds, cfg.validation_ds)
# init superclass
super().__init__(cfg=cfg, trainer=trainer)

Expand Down

0 comments on commit a761b7b

Please sign in to comment.