import sys import numpy as np sys.path.append("..") import pandas as pd directory = f"perplexity_results" MODEL_NAME_SAVE = "Qwen2.5-0.5B" random_seed = 0 test_perturbation_type = "hop_tokens4" checkpoint_path = 'checkpoint-3000' file_name = f"{directory}/{MODEL_NAME_SAVE}_seed{random_seed}_test_{test_perturbation_type}_{checkpoint_path}.csv" print(file_name) # load CSV file df = pd.read_csv(file_name) print(np.sqrt(df['Perplexities'].mean()))