Running the rllib rollout command gives the following error:
Could not find params.pkl in either the checkpoint dir or its parent directory AND no `--config` given on command line!
Command:
rllib rollout tmp/ppo/cart/checkpoint_000010/checkpoint-10 --run PPO --config "{\"env\": \"CartPole-v1\", \"model\": {\"fcnet_hiddens\": [100, 50]}}" --no-render --steps 2000
Can anyone give me more information about this?
Hi @aviskarkc10 ,
Did you forget a “/” in front of tmp? Or more generally, did you use a relative path from the wrong working directory?
No, I can confirm that the directory I am running the command in has the tmp directory and the path to the checkpoint file is correct.
As for /
, I am running the command in a single line, so it’s not needed. I run into the same issue even when I use the /
and move the parameters to different lines
mannyv
July 6, 2021, 12:45pm
4
@aviskarkc10
I guess the next thing to check is if you run:
ls tmp/ppo/cart/checkpoint_000010/
and
ls tmp/ppo/cart/
Do you see the params.pkl file in either directory?
If you do maybe thr next place to look is in rollout.py. This is the section that is trying to load the saved configuration.
config_path = ""
if args.checkpoint:
config_dir = os.path.dirname(args.checkpoint)
config_path = os.path.join(config_dir, "params.pkl")
# Try parent directory.
if not os.path.exists(config_path):
config_path = os.path.join(config_dir, "../params.pkl")
# Load the config from pickled.
if os.path.exists(config_path):
with open(config_path, "rb") as f:
config = cloudpickle.load(f)
# If no pkl file found, require command line `--config`.
else:
# If no config in given checkpoint -> Error.
if args.checkpoint:
raise ValueError(
"Could not find params.pkl in either the checkpoint dir or "
"its parent directory AND no `--config` given on command "
"line!")