File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change 1212
1313BIN_SAMPLE_SIZE = 40
1414OUTPUT_DIR = 'output'
15- LOG_DIR = 'logs'
1615LATEST_LAST_PATH = ''
1716LATEST_BEST_PATH = ''
1817LATEST_EPOCH_PATH = ''
@@ -68,18 +67,6 @@ def prepare_output_directory():
6867 return path
6968
7069
71- def prepare_log_directory ():
72- path = LOG_DIR
73- if not os .path .exists (path ):
74- os .mkdir (path )
75- val = 1
76- while os .path .exists (path + '/' + str (val )):
77- val += 1
78- path = path + '/' + str (val )
79- os .mkdir (path )
80- return path
81-
82-
8370def calculate_validation_loss (nnue , val_data_loader , lambda_ ):
8471 nnue .eval ()
8572 with torch .no_grad ():
@@ -135,10 +122,8 @@ def main(args):
135122 else :
136123 main_device = 'cpu'
137124
138- # Create directories to store data and logs in
125+ # Create directories to store data in
139126 output_path = prepare_output_directory ()
140- if args .log :
141- log_path = prepare_log_directory ()
142127
143128 # Print configuration info
144129 print (f'Device: { main_device } ' )
@@ -149,13 +134,13 @@ def main(args):
149134 print (f'Lambda: { args .lambda_ } ' )
150135 print (f'Validation check interval: { args .val_check_interval } ' )
151136 if args .log :
152- print (f'Logs written to: { log_path } ' )
137+ print (f'Logs written to: { output_path } ' )
153138 print (f'Data written to: { output_path } ' )
154139 print ('' )
155140
156141 # Create log writer
157142 if args .log :
158- writer = SummaryWriter (log_path )
143+ writer = SummaryWriter (output_path )
159144
160145 # Create data loaders
161146 train_size = int (os .path .getsize (args .train )/ BIN_SAMPLE_SIZE )
You can’t perform that action at this time.
0 commit comments