ir413 / mvp

Masked Visual Pre-training for Robotics
218 stars 26 forks source link

training from pixels #3

Closed haoyu-x closed 2 years ago

haoyu-x commented 2 years ago

Hi, thanks for the great project!

I installed the repo, and I ran the training example from states, it works well.

but when I ran the training example from pixels,

python tools/train.py task=FrankaPickPixels

the error:

Traceback (most recent call last):
  File "tools/train.py", line 39, in train
    ppo = process_ppo(env, cfg, cfg_dict, cfg.logdir, cfg.cptdir)
  File "/home/haoyux/mvp/mvp/utils/hydra_utils.py", line 211, in process_ppo
    num_gpus=cfg.num_gpus
  File "/home/haoyux/mvp/mvp/ppo/ppo.py", line 80, in __init__
    policy_cfg
  File "/home/haoyux/mvp/mvp/ppo/actor_critic.py", line 197, in __init__
    emb_dim=emb_dim
  File "/home/haoyux/mvp/mvp/ppo/actor_critic.py", line 149, in __init__
    assert pretrain_type == "none" or os.path.exists(pretrain_path)
AssertionError

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
ir413 commented 2 years ago

Hi @haoyu-x, the default configs assume that the pre-trained models are placed in /tmp/pretrained (e.g., see here). Alternatively, you can set the pre-trained models path from the command line, e.g., something like:

python tools/train.py task=FrankaPickPixels train.encoder.pretrain_dir=/path/to/pretrained/models

Please see the readme for the pre-trained models download links.