# from joblib import load
#
# model = load('AgentPPO/reward_data.pkl')
#
# data = model['mean_episode_reward']
# print(data)


# import torch
#
# model_path = 'AgentDDPG/actor.pth'
#
# checkpoint = torch.load(model_path, map_location=torch.device('cuda'))
#
# # 如果.pth文件保存的是整个模型（包含模型结构和参数）
# model = checkpoint  # 这里假设checkpoint直接就是模型实例，有时候可能需要model.load_state_dict(checkpoint['state_dict'])

# 如果.pth文件仅保存了state_dict（模型参数）
# model = YourModelClass()  # 实例化你的模型
# model.load_state_dict(checkpoint)

# print(model)

import pickle

a = 'DDPG'
b = 'PPO'
c = 'SAC'
d = 'TD3'

a1 = '/reward_data.pkl'
a2 = '/loss_data.pkl'
a3 = '/test_data.pkl'

filename = './Agent' + a + a3

# 使用 'rb' 模式打开文件，读取二进制数据
with open(filename, 'rb') as f:
    data = pickle.load(f)

print(data)
