Closed 321HG closed 3 years ago
Hello 321HG! I hope everything is going well with you!
What do you mean by exporting? Save into a file? In the newest version, you can save the whole optimization object using the following:
...
opt = Opytimizer(space, optimizer, function, save_agents=False)
opt.start(n_iterations=1000)
opt.save('output_path')
This saved file is a regular pickle file, which you can load it whenever you want and access its inner properties, for example the history
attribute. Such an attribute will hold the best_agent
you desire.
On the other hand, you can use the history.get_convergence()
method in the same way as the old history.get()
method to directly retrieve the list of fitness, positions, etc.
Hope that I could help at all, if not, please let me know!
Best regards, Gustavo.
Thank you very much, I have solved it according to your prompt
I can export 'positions' in the old version, but I cannot export the 'positions' in the new version. Could you help me?