HaileyStorm commited on
Commit
398b502
·
verified ·
1 Parent(s): 4662ed7

Update chess-gpt-eval/main.py

Browse files
Files changed (1) hide show
  1. chess-gpt-eval/main.py +14 -8
chess-gpt-eval/main.py CHANGED
@@ -667,13 +667,19 @@ if __name__ == "__main__":
667
  print("\n\n\n********\nFinal Statistics:\n********\n")
668
  for nanogpt_player in player_ones:
669
  player_one_recording_name = "xformer_" + nanogpt_player
670
- csv_file_path = f"logs/{player_one_recording_name}_vs_{player_two_recording_name}"
671
- csv_file_path = csv_file_path.replace(".", "_") # Because I'm using ckpt filenames for nanogpt models
672
- csv_file_path += ".csv"
 
 
 
673
 
674
- stats = calculate_stats(csv_file_path)
675
- if stats:
676
- print(f"\nStatistics for {nanogpt_player}:")
677
- for key, value in stats.items():
678
- print(f"{key}: {value}")
 
 
 
679
  print("\n\n\n********\nDONE!\n********\n\n\n")
 
667
  print("\n\n\n********\nFinal Statistics:\n********\n")
668
  for nanogpt_player in player_ones:
669
  player_one_recording_name = "xformer_" + nanogpt_player
670
+ if RUN_FOR_ANALYSIS:
671
+ csv_file_path = f"logs/{player_one_recording_name}_vs_{player_two_recording_name}"
672
+ csv_file_path = csv_file_path.replace(".", "_") # Because I'm using ckpt filenames for nanogpt models
673
+ csv_file_path += ".csv"
674
+ else:
675
+ csv_file_path = recording_file
676
 
677
+ try:
678
+ stats = calculate_stats(csv_file_path)
679
+ if stats:
680
+ print(f"\nStatistics for {nanogpt_player}:")
681
+ for key, value in stats.items():
682
+ print(f"{key}: {value}")
683
+ except:
684
+ print(f"Couldn't get stats for {csv_file_path}")
685
  print("\n\n\n********\nDONE!\n********\n\n\n")