Thanks for you answer @avnishn. Hope you’ll be able to publish it soon.
To anyone else who needs a solution - since I only wish to test my agent, for now I’m saving only the weights and loading them in the new version.
# In the old version
weight = agent.get_policy().get_weights()
with open('my_weights.pickle', 'wb') as handle:
pickle.dump(weight, handle, protocol=pickle.HIGHEST_PROTOCOL)
# In the new version
with open('my_weights.pickle', 'rb') as handle:
weights = pickle.load(handle)
agent.get_policy().set_weights(weights)