Skip to content

Commit

Permalink
fix: 🐛 erros when "VAL" and "Test" are not in cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
zezhishao committed Dec 11, 2023
1 parent e1e8c54 commit a23494e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions basicts/runners/base_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def __init__(self, cfg: dict):
super().__init__(cfg)

# validate every `val_interval` epoch
self.val_interval = cfg["VAL"].get("INTERVAL", 1)
self.val_interval = cfg["VAL"].get("INTERVAL", 1) if hasattr(cfg, "VAL") else None
# test every `test_interval` epoch
self.test_interval = cfg["TEST"].get("INTERVAL", 1)
self.test_interval = cfg["TEST"].get("INTERVAL", 1) if hasattr(cfg, "TEST") else None

# declare data loader
self.train_data_loader = None
Expand Down

0 comments on commit a23494e

Please sign in to comment.