PKU-RL / Plan4MC

Reinforcement learning and planning for Minecraft.
MIT License
150 stars 19 forks source link

build_pretrain_model failed #1

Closed chenllliang closed 1 year ago

chenllliang commented 1 year ago

hello, thanks for your great work ! I met some troubles when reproducing the results. when I ran the `python test.py --task get_furnace_nearby_with_logs' command, I got following error

[INFO:minedojo.tasks] Loaded 1581 Programmatic tasks, 1560 Creative tasks, and 1 special task: "Playthrough". Totally 3142 tasks loaded.
Running on device:  cuda
Traceback (most recent call last):
  File "/home/chenliang/Plan4MC/test.py", line 198, in <module>
    main(args)
  File "/home/chenliang/Plan4MC/test.py", line 38, in main
    model_clip = build_pretrain_model(
  File "/home/chenliang/Plan4MC/mineclip_official/build.py", line 78, in build_pretrain_model
    model.load_state_dict(state_dict_back)
  File "/home/chenliang/miniconda3/envs/Minedojo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for videoCLIP:
        Unexpected key(s) in state_dict: "state_dict". 

When I further look into the state_dict of the VideoCLIP checkpoint you provide "https://drive.google.com/file/d/1uaZM1ZLBz2dZWcn85rZmjP7LV6Sg5PZW/view?usp=sharing" and the VideoCLIP class in the build.py file, I find a lot of parameter names do not match. Can you help me with the problem? Or can you share the VideoCLIP checkpoint you use for the experiment?

Thanks!

YHQpkueecs commented 1 year ago

Hi! We have just updated the link to download MineCLIP.