MarkFzp / act-plus-plus

Imitation learning algorithms with Co-training for Mobile ALOHA: ACT, Diffusion Policy, VINN
https://mobile-aloha.github.io/
MIT License
2.93k stars 543 forks source link

Missing packages to run? #2

Open ramkumarkoppu opened 8 months ago

ramkumarkoppu commented 8 months ago

Followed the installation procedure to install listed pip packages in the condo environment but still get missing packages errors when I run python3 imitate_episodes.py

(aloha) Rams-MBP:act-plus-plus ramkumarkoppu$ python3 imitate_episodes.py
ROBOMIMIC WARNING(
    No private macro file found!
    It is recommended to use a private macro file
    To setup, run: python /Users/ramkumarkoppu/miniforge3/envs/aloha/lib/python3.8/site-packages/robomimic/scripts/setup_macros.py
)
Traceback (most recent call last):
  File "imitate_episodes.py", line 20, in <module>
    from policy import ACTPolicy, CNNMLPPolicy, DiffusionPolicy
  File "/Users/ramkumarkoppu/GIT/GitHub/Robotic_projs/act-plus-plus/policy.py", line 12, in <module>
    from robomimic.algo.diffusion_policy import replace_bn_with_gn, ConditionalUnet1D
ModuleNotFoundError: No module named 'robomimic.algo.diffusion_policy'
(aloha) Rams-MBP:act-plus-plus ramkumarkoppu$ 
SherwinDengxiong commented 8 months ago

seems like there is no diffusion policy in the robomimic.algo

ramkumarkoppu commented 8 months ago

How to fix this error?

SherwinDengxiong commented 8 months ago

Currently, I skip the Diffusion part and waiting for the author response.

apirrone commented 8 months ago

It seems that the diffusion policy in robomimic is available in a specific branch of the repo.

I was able to go further in running this with the following actions:

I also had to edit the DATA_DIR path in act-plus-plus/constants.py

Then, it seems that the argument --num_epochs was replaced by --num-steps, so I changed it so that the command I run is :

$ python3 imitate_episodes.py --task_name sim_transfer_cube_scripted --ckpt_dir trainings --policy_class ACT --kl_weight 10 --chunk_size 100 --hidden_dim 512 --batch_size 8 --dim_feedforward 3200  --lr 1e-5 --seed 0 --num_steps 2000 --onscreen_render

Now I get a new error, that I will reference in a new issue https://github.com/MarkFzp/act-plus-plus/issues/4#issue-2065393653

Ke-Wang1017 commented 8 months ago

How to fix this error?

Hi I tried to comment out line 12 and it is fine. Also you can install diffuser library as mentioned by @apirrone to avoid errors in following lines. But I still get other errors

Ke-Wang1017 commented 8 months ago

Also to load the demo dataset, you have to change DATA_DIR in constants.py and wandb settings at https://github.com/MarkFzp/act-plus-plus/blob/main/imitate_episodes.py#L148C41-L148C41

ramkumarkoppu commented 8 months ago

It seems that the diffusion policy in robomimic is available in a specific branch of the repo.

I was able to go further in running this with the following actions:

  • pip uninstall robomimic
  • cd somewhere && git clone git@github.com:ARISE-Initiative/robomimic.git
  • cd somewhere/robomimic && git checkout diffusion-policy-mg
  • pip install -e .
  • pip install diffusers

I also had to edit the DATA_DIR path in act-plus-plus/constants.py

Then, it seems that the argument --num_epochs was replaced by --num-steps, so I changed it so that the command I run is :

$ python3 imitate_episodes.py --task_name sim_transfer_cube_scripted --ckpt_dir trainings --policy_class ACT --kl_weight 10 --chunk_size 100 --hidden_dim 512 --batch_size 8 --dim_feedforward 3200  --lr 1e-5 --seed 0 --num_steps 2000 --onscreen_render

Now I get a new error, that I will reference in a new issue #4 (comment)

How did you get checkpoints? --ckpt_dir trainings

apirrone commented 8 months ago

Hi @ramkumarkoppu, for now I train from scratch, so the trainings dir is empty at start and checkpoints are saved here

mustang66ytz commented 8 months ago

image I encounter the wandb issue, how to solve this?

ramkumarkoppu commented 7 months ago

got the same error

ramkumarkoppu commented 7 months ago

Hi @ramkumarkoppu, for now I train from scratch, so the trainings dir is empty at start and checkpoints are saved here

getting this 'wandb' error: wandb: ERROR Error while calling W&B API: project not found (<Response [404]>) Problem at: imitate_episodes.py 148 main wandb: ERROR It appears that you do not have permission to access the requested resource. Please reach out to the project owner to grant you access. If you have the correct permissions, verify that there are no issues with your networking setup.(Error 404: Not Found) Traceback (most recent call last): File "imitate_episodes.py", line 666, in main(vars(parser.parse_args())) File "imitate_episodes.py", line 148, in main wandb.init(project="mobile-aloha2", reinit=True, entity="mobile-aloha2", name=expr_name)

how did you get this working?

ramkumarkoppu commented 7 months ago

Also to load the demo dataset, you have to change DATA_DIR in constants.py and wandb settings at https://github.com/MarkFzp/act-plus-plus/blob/main/imitate_episodes.py#L148C41-L148C41

What's the example value to be set for DATA_DIR ?

tanxr00 commented 7 months ago

Followed the installation procedure to install listed pip packages in the condo environment but still get missing packages errors when I run python3 imitate_episodes.py

(aloha) Rams-MBP:act-plus-plus ramkumarkoppu$ python3 imitate_episodes.py
ROBOMIMIC WARNING(
    No private macro file found!
    It is recommended to use a private macro file
    To setup, run: python /Users/ramkumarkoppu/miniforge3/envs/aloha/lib/python3.8/site-packages/robomimic/scripts/setup_macros.py
)
Traceback (most recent call last):
  File "imitate_episodes.py", line 20, in <module>
    from policy import ACTPolicy, CNNMLPPolicy, DiffusionPolicy
  File "/Users/ramkumarkoppu/GIT/GitHub/Robotic_projs/act-plus-plus/policy.py", line 12, in <module>
    from robomimic.algo.diffusion_policy import replace_bn_with_gn, ConditionalUnet1D
ModuleNotFoundError: No module named 'robomimic.algo.diffusion_policy'
(aloha) Rams-MBP:act-plus-plus ramkumarkoppu$ 

已经解决,请使用这个分支https://github.com/ARISE-Initiative/robomimic/tree/diffusion-policy-mg

sainavaneet commented 5 months ago

image I encounter the wandb issue, how to solve this?

use your own entity and project name

destroy314 commented 4 months ago

I encounter the wandb issue, how to solve this?

Looks like the wandb API has changed. Just replace that line with:

wandb.init(project="mobile-aloha2", reinit=True, name=expr_name)

or set wandb to offline\:

export WANDB_MODE=offline