NVlabs / CALM

Other
535 stars 58 forks source link

Error in pre-training #3

Closed mxsage closed 1 year ago

mxsage commented 1 year ago

When running:

python calm/run.py --task HumanoidAMPGetup --cfg_env calm/data/cfg/humanoid_calm_sword_shield_getup.yaml --cfg_train calm/data/cfg/train/rlg/calm_humanoid.yaml --motion_file calm/data/motions/reallusion_sword_shield/dataset_reallusion_sword_shield.yaml --headless

I successfully load motion files, but get an error:

RunningMeanStd:  (253,)
RunningMeanStd:  (140,)
Traceback (most recent call last):
  File "calm/run.py", line 274, in <module>
    main()
  File "calm/run.py", line 268, in main
    runner.run(vargs)
  File "/home/ubuibm/miniconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/torch_runner.py", line 139, in run
    self.run_train()
  File "/home/ubuibm/miniconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/torch_runner.py", line 125, in run_train
    agent.train()
  File "/home/ubuibm/dev/CALM/calm/learning/common_agent.py", line 108, in train
    self.obs = self.env_reset()
  File "/home/ubuibm/dev/CALM/calm/learning/calm_agent.py", line 541, in env_reset
    self._reset_latents(env_ids)
  File "/home/ubuibm/dev/CALM/calm/learning/calm_agent.py", line 585, in _reset_latents
    z, enc_amp_obs_demo = self._sample_latents(n)
  File "/home/ubuibm/dev/CALM/calm/learning/calm_agent.py", line 598, in _sample_latents
    latents = self.model.a2c_network.eval_enc(proc_enc_amp_obs_demo)
  File "/home/ubuibm/dev/CALM/calm/learning/calm_network_builder.py", line 257, in eval_enc
    if self._enc_arch_type == 'mlp':
  File "/home/ubuibm/miniconda3/envs/rlgpu/lib/python3.7/site-packages/torch/nn/modules/module.py", line 948, in __getattr__
    type(self).__name__, name))
AttributeError: 'Network' object has no attribute '_enc_arch_type'

please advise if possible! Thanks.

Full log: log.txt

tesslerc commented 1 year ago

That if statement should have been removed during repo cleanup pre upload. There is only mlp support. Sorry. I updated the relevant file, please pull and try again.