acme icon indicating copy to clipboard operation
acme copied to clipboard

DQN Agent's Snapshot Directory

Open ThomasBuffagni opened this issue 5 years ago • 1 comments

Hi, I am using your Tensorflow implementation of a DQN agent in a docker development environment. I have found that the Snapshotter object which creates the snapshot of the network after training is initialized with the directory argument set to its default value: ~/acme: https://github.com/deepmind/acme/blob/41ea85244bc67b0ca618482cacb70a4757f2714d/acme/agents/tf/dqn/learning.py#L103

Since I am working in a Docker Container, the only way that I have found to recover the snapshot is to use a volume to bind ~/acme to a local folder. It would be nice to be able to define the snapshot's folder just like we can define the checkpoints' folder: https://github.com/deepmind/acme/blob/41ea85244bc67b0ca618482cacb70a4757f2714d/acme/agents/tf/dqn/agent.py#L63

Thank you for this great RL library!

ThomasBuffagni avatar Sep 23 '20 13:09 ThomasBuffagni

Hello,

I think we could add a checkpoint_subpath argument to DQNLearner and pass it when we create the Snapshotter, as it already has an argument to choose where to store snapshots https://github.com/deepmind/acme/blob/41ea85244bc67b0ca618482cacb70a4757f2714d/acme/tf/savers.py#L267

Does it seem like a reasonable fix ? If yes I can submit a PR.

mathschy avatar Nov 13 '20 10:11 mathschy