openai / baselines

OpenAI Baselines: high-quality implementations of reinforcement learning algorithms
MIT License
15.62k stars 4.86k forks source link

Trouble saving model for in run_atari deepq #441

Open damienlancry opened 6 years ago

damienlancry commented 6 years ago

Hi, First of all, great work, and great initiative!

Second of all, I m trying to train a dqn to play breakout with the file deepq/experiments/run_atari.py and to test it afterward but i cant manage to save the model, it s not as straightforward as running train_cartpole.py:

*When i run python deepq/experinents/run_atari.py --num-timesteps=100 --checkpoint-freq=10 --checkpoint-path=${ROOT_DIR}/breakout.pkl the code runs but i dont get any pkl file after running

*When i slightly modify the code to make it closer to the train_cartpole.py one ie add act = deepq.learn(...) and act.save("breakout_model.pkl") at the endi get the error TypeError: can't pickle _csv.writer objects the README is talking about a baselines/deepq/experiments/train_pong.py but i cant find it. I can t find baselines/deepq/experiments/atari/train.py either.

it s probably a dumb question but i ve been struggling with it for quite a while now so i hope someone will be kind enough to help a newby like me :)

DanielTakeshi commented 6 years ago

The model should be saved by the standard tensorflow saver class. It's not normally pickle files.