Commit be06b7c4 by wyt2000

add dra_fig.

parent 1d67f68a
...@@ -3,3 +3,4 @@ __pycache__/ ...@@ -3,3 +3,4 @@ __pycache__/
logs/ logs/
ret_one/ ret_one/
output_rank_* output_rank_*
*.png
import matplotlib.pyplot as plt
import json
import numpy as np
from collections import Counter
import re
def extract_time(text):
pattern = r"Generation:\s*([\d.]+)\s*secs\s*Verfication:\s*([\d.]+)\s*secs"
matches = re.search(pattern, text)
if matches:
gen = matches.group(1)
ver = matches.group(2)
return gen, ver
return None
def read_dataset(path):
gens, vers = [], []
with open(path) as f:
for line in f.readlines():
if x := extract_time(line):
gens.append(float(x[0]))
vers.append(float(x[1]))
return gens, vers
gens, vers = read_dataset('ret_one/test-proof_542524.out')
def draw(dataset, color, label):
num_samples = len(dataset)
hist, bins = np.histogram(dataset, 10)
avg_score = np.mean(dataset)
max_score = np.max(dataset)
min_score = np.min(dataset)
xs = bins[:-1]
ys = [h / num_samples for h in hist]
plt.plot(xs, ys, color=color, label=f'{label}; Avg: {avg_score:.3f}s; Max: {max_score:.3f}s; Min: {min_score:.3f}s', zorder=3)
plt.fill_between(xs, ys, color=color, alpha=0.3, zorder=2)
plt.axvline(x=avg_score, color=color, linestyle='dotted')
draw(gens, 'green', 'Generation')
draw(vers, 'blue', 'Verification')
plt.xlabel("Time (s) of DeepSeek-Prover-V1.5-Base", fontsize=15)
plt.ylabel("Percentage", fontsize=15)
plt.legend(prop={'size': 10})
plt.savefig('DeepSeek-Prover-V1.5-Base.png', format='png') # 保存为 PNG 格式
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#SBATCH --cpus-per-task=64 # Request Q core per task; means that P*Q cores per node #SBATCH --cpus-per-task=64 # Request Q core per task; means that P*Q cores per node
#SBATCH --qos=normal # Request QOS Type #SBATCH --qos=normal # Request QOS Type
### #SBATCH --constraint="IB&A100" ### #SBATCH --constraint="IB&A100"
#SBATCH --nodelist=r8a100-b00 #SBATCH --nodelist=r8a100-a02
### ###
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
### Without specifying the constraint, any available nodes that meet the requirement will be allocated ### Without specifying the constraint, any available nodes that meet the requirement will be allocated
### You can specify the characteristics of the compute nodes, and even the names of the compute nodes ### You can specify the characteristics of the compute nodes, and even the names of the compute nodes
### ###
### #SBATCH --nodelist=r8a100-b00 ### #SBATCH --nodelist=r8a100-a02
### #SBATCH --constraint="Volta|RTX8000" # Request GPU Type: Volta(V100 or V100S) or RTX8000 ### #SBATCH --constraint="Volta|RTX8000" # Request GPU Type: Volta(V100 or V100S) or RTX8000
### ###
...@@ -79,7 +79,7 @@ export http_proxy=10.200.22.22:18421 ...@@ -79,7 +79,7 @@ export http_proxy=10.200.22.22:18421
export https_proxy=10.200.22.22:18421 export https_proxy=10.200.22.22:18421
export config_name=sampling_few_shot_pass_at_1 export config_name=sampling_few_shot_pass_at_1
export model_name=DeepSeek-Prover-V1.5-RL export model_name=deepseekproof-minicpm-quant-fixed-0906
export model_path=/lustre/S/huangdi/open_for_out/models/aimo-progress-prize-trained-models/$model_name export model_path=/lustre/S/huangdi/open_for_out/models/aimo-progress-prize-trained-models/$model_name
export log_dir=logs/${model_name}_${config_name} export log_dir=logs/${model_name}_${config_name}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment