hill-a / stable-baselines

A fork of OpenAI Baselines, implementations of reinforcement learning algorithms
http://stable-baselines.readthedocs.io/
MIT License
4.16k stars 725 forks source link

How can i save best model ? #1087

Closed mmterkc closed 3 years ago

mmterkc commented 3 years ago

Hi, how can i save best model ? I want to save best reward not mean reward.

Miffyli commented 3 years ago

See EvalCallback, which allows storing best model seen with evaluation episodes. Alternatively you can use callbacks to check a Monitor file to see if the latest episode had highest reward and store that reward.

mmterkc commented 3 years ago

Thanx for your answer but how can i find highest reward in monitor ?

Miffyli commented 3 years ago

See this example for exactly what you want. You may close this issue if that answers your question.

mmterkc commented 3 years ago

ok ts2xy give me total rewards but i want to learn last step reward

Miffyli commented 3 years ago

You could use a custom callback to achieve this.

Closing as "no tech support", as the answers you seek are either in docs or you have to modify stable-baselines to do this. These issues are for proposals and bug-reports.