We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9d5075 commit 9393a04Copy full SHA for 9393a04
src/templates/template-common/config.yaml
@@ -4,8 +4,6 @@ train_batch_size: 32
4
eval_batch_size: 32
5
num_workers: 4
6
max_epochs: 20
7
-train_epoch_length: 1000
8
-eval_epoch_length: 1000
9
use_amp: false
10
debug: false
11
src/templates/template-common/utils.py
@@ -64,6 +64,10 @@ def setup_config(parser=None):
64
with open(config_path, "r") as f:
65
config = yaml.safe_load(f.read())
66
67
+ optional_attributes = ["train_epoch_length", "eval_epoch_length"]
68
+ for attr in optional_attributes:
69
+ config[attr] = config.get(attr, None)
70
+
71
for k, v in config.items():
72
setattr(args, k, v)
73
0 commit comments