How do I use my trained model in the online tournament?

48 views
Skip to first unread message

John Palevich

unread,
May 2, 2020, 7:16:52 PM5/2/20
to Google Research Football
I am using a Macintosh to try to train a simple 11v11 bot. I used the commands from repro_checkpoint_easy.sh. 

I have a weak processor so I tried to cut down on the amount of steps by changing the code to this:

#!/bin/bash

python3 -u -m gfootball.examples.run_ppo2 \
  --level 11_vs_11_easy_stochastic \
  --reward_experiment scoring,checkpoints \
  --policy gfootball_impala_cnn \
  --cliprange 0.08 \
  --gamma 0.993 \
  --ent_coef 0.003 \
  --num_timesteps 2100 \
  --max_grad_norm 0.64 \
  --lr 0.000343 \
  --num_envs 8 \
  --noptepochs 2 \
  --nminibatches 4 \
  --nsteps 128 \
  "$@"

It generated a bunch of checkpoint like this: openai-2020-05-01-18-40-13-053942/checkpoints/00001.

The script finished running without error but there was no output besides the checkpoint.

I am trying to use these to run the game when connecting to the tournament server but it doesn't seem to work. Are these the right files?

./exampleclient.py  --username ***  --token *** --model_name !random --track 11vs11 --inference_model /Users/***/Desktop/trainedBot11v11/checkpoints/00001 

When I try this, I get this error:

OSError: SavedModel file does not exist at: /Users/***/Desktop/trainedBot11v11/checkpoints/00001/{saved_model.pbtxt|saved_model.pb}


On my machine, checkpoint 00001 is a file not a directory. I was unable to find a saved_model.pbtxt or saved_model.pb. 


Am I doing this right?

Piotr Stanczyk

unread,
May 4, 2020, 2:58:43 AM5/4/20
to John Palevich, Google Research Football
Saved model is not the same as the checkpoint. The script asks you about the saved model. Have a look here

--
You received this message because you are subscribed to the Google Groups "Google Research Football" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-research-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-research-football/4e41a605-20d4-4ecb-a1b4-30433169f483%40googlegroups.com.

John Palevich

unread,
May 4, 2020, 9:33:48 PM5/4/20
to Google Research Football
Does the script produce a saved model? If so, do you know which directory it is being saved to?

Piotr Stanczyk

unread,
May 5, 2020, 1:50:51 AM5/5/20
to John Palevich, Google Research Football
I don't think it does, it wrapps OpenAI Baseline's PPO implementation which uses checkpoints to save/restore model state. But you can extend the code to save the model at the end of the training. We are also happy to accept code contributions to the repository. 

On Tue, May 5, 2020 at 3:33 AM John Palevich <john.p...@gmail.com> wrote:
Does the script produce a saved model? If so, do you know which directory it is being saved to?

--
You received this message because you are subscribed to the Google Groups "Google Research Football" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-research-fo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages