kmfoda commited on
Commit
ad3f254
·
1 Parent(s): b1ca382

Update to reflect correct model

Browse files
Files changed (2) hide show
  1. evaluate.py +3 -12
  2. results.json +1 -1
evaluate.py CHANGED
@@ -9,7 +9,7 @@ import json
9
  device = "cuda"
10
  test_indices_length = 10
11
 
12
- models = ["distributed/optimized-gpt2-250m", "distributed/gpt2-250m"]
13
 
14
  with open('results.json', 'r') as file:
15
  results = json.load(file)
@@ -79,14 +79,5 @@ for model_name in models:
79
  results[model_name][str(epoch)] = [average_loss]
80
  print(f"Epoch: {epoch} Average Loss: {average_loss:.2f}")
81
 
82
- with open("results.json", "w") as outfile:
83
- json.dump(results, outfile, indent = 4)
84
-
85
- # for model_name in models:
86
-
87
- # plt.plot(results[model_name].keys(), results[model_name].values())
88
- # plt.title(f"{model_name} Convergence Over Time")
89
- # plt.xlabel("Steps")
90
- # plt.ylabel("Loss")
91
- # plt.xticks(fontsize=3.5)
92
- # plt.savefig(f"{model_name.split('/')[1]}_results.png")
 
9
  device = "cuda"
10
  test_indices_length = 10
11
 
12
+ models = ["distributed/optimized-gpt2-250m", "distributed/gpt2-94m"]
13
 
14
  with open('results.json', 'r') as file:
15
  results = json.load(file)
 
79
  results[model_name][str(epoch)] = [average_loss]
80
  print(f"Epoch: {epoch} Average Loss: {average_loss:.2f}")
81
 
82
+ with open("results.json", "w") as outfile:
83
+ json.dump(results, outfile, indent = 4)
 
 
 
 
 
 
 
 
 
results.json CHANGED
@@ -931,7 +931,7 @@
931
  6.409368515014648
932
  ]
933
  },
934
- "distributed/gpt2-250m": {
935
  "0": [
936
  10.942681312561035
937
  ],
 
931
  6.409368515014648
932
  ]
933
  },
934
+ "distributed/gpt2-94m": {
935
  "0": [
936
  10.942681312561035
937
  ],