-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To bulid my own policy, but have errors TypeError: '>' not supported between instances of 'int' and 'dict' #555
Comments
I added the print statement to check and found that the chunk size had been reassigned, but I did not find the problem: def post_init(self): chunk_size type: <class 'int'>
|
I found a problem. I had an error setting in the factory.py file. The problem is now fixed. anyway, anyone out there trying to create their own policies in the lerobot framework is welcome to discuss! |
I improved the act policy in lerobot framework and created a new policy named myact. I mainly did the following:
Create the my_act folder in the lerobot/common/policies/ path
Create 'configuration_my_act.py' and 'modeling_my_act.py' in the + my_act folder
Create lerobot/configs/policy/myact yaml, which is modified to
name: myact
But when I'm done, run the following command and get an error:
xvfb-run python lerobot/scripts/train.py
hydra.run.dir=mypolicy/train/AlohaInsertion-v0
policy=myact
dataset_repo_id=lerobot/aloha_sim_insertion_human
env=aloha
env.task=AlohaInsertion-v0
INFO 2024-12-07 17:01:50 n/logger.py:106 Logs will be saved locally.
INFO 2024-12-07 17:01:50 ts/train.py:337 make_dataset
Fetching 56 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 56/56 [00:00<00:00, 9842.48it/s]
INFO 2024-12-07 17:01:56 ts/train.py:350 make_env
INFO 2024-12-07 17:01:56 /init.py:88 MUJOCO_GL is not set, so an OpenGL backend will be chosen automatically.
INFO 2024-12-07 17:01:57 /init.py:96 Successfully imported OpenGL backend: %s
INFO 2024-12-07 17:01:57 /init.py:31 MuJoCo library version is: %s
INFO 2024-12-07 17:02:03 ts/train.py:353 make_policy
Error executing job with overrides: ['policy=act', 'dataset_repo_id=lerobot/aloha_sim_insertion_human', 'env=aloha', 'env.task=AlohaInsertion-v0']
Traceback (most recent call last):
File "/root/autodl-tmp/lerobot/lerobot/scripts/train.py", line 677, in train_cli
train(
File "/root/autodl-tmp/lerobot/lerobot/scripts/train.py", line 354, in train
policy = make_policy(
File "/root/autodl-tmp/lerobot/lerobot/common/policies/factory.py", line 105, in make_policy
policy = policy_cls(policy_cfg, dataset_stats)
File "", line 26, in init
File "/root/autodl-tmp/lerobot/lerobot/common/policies/act/configuration_act.py", line 158, in post_init
if self.n_action_steps > self.chunk_size:
TypeError: '>' not supported between instances of 'int' and 'dict'
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
At this time, I also reported this error when I ran lerobot's act strategy. Do you know how to solve, thank you!
The text was updated successfully, but these errors were encountered: