ZhengyiLuo / PULSE

Official Implementation of the ICLR 2024 spotlight paper: Universal Humanoid Motion Representations for Physics-Based Control
https://www.zhengyiluo.com/PULSE
149 stars 6 forks source link

Question: Training with VQ-latent space #6

Open frredy99 opened 3 months ago

frredy99 commented 3 months ago

@ZhengyiLuo Hello!

I have found the comparison with VQ-latent space in your project page, and there are some codes related to VQ-latent space such as vq_quantizer.py.

Can you guide me how to train PULSE myself using VQ-latent space?

Thanks!

ZhengyiLuo commented 3 months ago

Thank you for your interest!

It could be as easy as changing z_type to "vq" but I will have to take a second look.

frredy99 commented 3 months ago

Thanks for the answer!

So I simply ran the following command

python phc/run_hydra.py env.task=HumanoidImDistillGetup env=env_im_vae env.z_type=vq_vae exp_name=pulse_vae robot.real_weight_porpotion_boxes=False learning=im_z_fit env.models=['output/HumanoidIm/phc_3/Humanoid_00258000.pth','output/HumanoidIm/phc_comp_3/Humanoid_00023501.pth'] env.motion_file=sample_data//amass_isaac_standing_upright_slim.pkl

just added env.z_type=vq_vae to the original training PULSE command.

And I got this NotImplementedError

Traceback (most recent call last): File "phc/run_hydra.py", line 355, in main runner.run(cfg) File "/home/ham/anaconda3/envs/pulse/lib/python3.8/site-packages/rl_games/torch_runner.py", line 139, in run self.run_train() File "/home/ham/anaconda3/envs/pulse/lib/python3.8/site-packages/rl_games/torch_runner.py", line 125, in run_train agent.train() File "/home/ham/git_repo/PULSE/phc/learning/common_agent.py", line 121, in train train_info = self.train_epoch() File "/home/ham/git_repo/PULSE/phc/learning/amp_agent.py", line 504, in train_epoch curr_train_info = self.train_actor_critic(self.dataset[i]) File "/home/ham/anaconda3/envs/pulse/lib/python3.8/site-packages/rl_games/algos_torch/a2c_continuous.py", line 169, in train_actor_critic self.calc_gradients(input_dict) File "/home/ham/git_repo/PULSE/phc/learning/amp_agent.py", line 653, in calc_gradients kin_loss_info = self._optimize_kin(batch_dict) File "/home/ham/git_repo/PULSE/phc/learning/amp_agent.py", line 840, in _optimize_kin raise NotImplementedError() NotImplementedError

Seems like some vq_vae related codes are missing. Could you please have a look on this?

Thanks!