HaileyStorm
commited on
Update chess-gpt-eval/main.py
Browse files- 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 |
-
|
671 |
-
|
672 |
-
|
|
|
|
|
|
|
673 |
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
|
|
|
|
|
|
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")
|