Skip to content
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

TypeError: argument of type 'ABCMeta' is not iterable #6

Open
Colin-KelinLi opened this issue May 25, 2022 · 11 comments
Open

TypeError: argument of type 'ABCMeta' is not iterable #6

Colin-KelinLi opened this issue May 25, 2022 · 11 comments

Comments

@Colin-KelinLi
Copy link

Hi,

I encountered this error when I was trying to run this command: 'python -m behavior.benchmark.behavior_benchmark --agent-class PPO --ckpt-path /tmp/my_checkpoint --split cleaning_toilet'.

It seems that because of loading the checkpoints. Do you know how to fix it?

Many thanks!

@Colin-KelinLi
Copy link
Author

Screenshot 2022-05-26 09:48:35

Hi,

The error is posted. I am using stable_baselin 3 = 1.5.0, torch = 1.11.0

@roberto-martinmartin
Copy link
Contributor

Hi!
Yes, we are seeing some issues with stable_baselines ourself, even importing PPO crashes.
Do you need stable baselines for your work? Otherwise, I would recommend commenting out the imports until they fix the issues.

@roberto-martinmartin
Copy link
Contributor

@HUSTColinLee , could you share an example of your checkpoint to help me reproduce your issue? our other issues with SB3 are gone

@Colin-KelinLi
Copy link
Author

Hi!
I tried the checkpoint you provided in the repository. Its path is '/behavior/behavior/benchmark/agents/checkpoints'. Here are two checkpoints: ' onboard_sensing_ppo_random.zip' and 'full_observability_ppo_random.zip'. Both of them are not working in my case.

And I encountered another problem when I was trying to implement the imitation learning baseline today. According to the documentation, the BC agent uses task observations (456) and proprioception feedback (20) as state space. But in fact, the training dataset you provided has 456 observations and 22 proprioceptions.

The above problem is not difficult to fix but I encountered another one when I run 'test_bc_agent.py'. The config file I used is 'behavior_full_observability.yaml'. It has 90 proprioceptions and 456 task observations. This code cannot run successfully, as in the training phase there are only 22 proprioceptions. The content of config file and the error are attached. Can you help me with this issue?
333
444

Many thanks!

@Roadsong
Copy link

Roadsong commented Jun 7, 2022

@HUSTColinLee Hi Colin I basically had the same issues. It seems that the two checkpoint files do not work for current version of code. I tried simple_bc_agent.py and found the inconsistencies of dimensions of proprioception. You only need to change line 21 and 49, proprioception_dim=22 and it should work.

I think more important questions include 1) the baseline of training agents using action primitives 2) how to reproduce and replay the demo using action primitives... @roberto-martinmartin Do you have any suggestions?

@Colin-KelinLi
Copy link
Author

@Roadsong Thanks for commenting. The first issue has been solved by replacing with proprioception_dim=22 in simple_bc_agent.py. The problem is when I run test_bc_agent.py, I used the model trained by simple_bc_agent.py. However, the dimension of proprioceptions is 90 from test_bac_agent.py while it is 22 for the model. This is the main reason I cannot run this code. Do you know how to fix it?

@roberto-martinmartin
Copy link
Contributor

@HUSTColinLee , sorry for the delay. I was exploring this. The issue is a newer version of python. Are you using python 3.7? I think the breaking change is with python newer versions, e.g., 3.10. Those versions are incompatible with stable baselines

@Colin-KelinLi
Copy link
Author

@roberto-martinmartin, Thanks for the reply. I am using python 3.8.3, which follows the documentation.

@ChengshuLi
Copy link
Member

It might be due to opencv, stable-baselines or cloudpickle version mismatch.

Can you try these?

pip uninstall cloudpickle
pip uninstall opencv-python
pip uninstall opencv-contrib-python
pip uninstall stable-baselines3

pip install stable-baselines3==1.5.0
pip install cloudpickle==2.1.0
pip install opencv-contrib-python==4.5.5.64

@Arpitrf
Copy link

Arpitrf commented Sep 30, 2022

Hello @ChengshuLi @roberto-martinmartin I am facing the same issue as @HUSTColinLee : "the dimension of proprioceptions is 90 from test_bac_agent.py while it is 22 for the model". Running all the pip installs (as you've mentioned previously) did not solve this issue. How to go about this?
My python version is Python 3.8.13

@oliviaylee
Copy link

oliviaylee commented May 1, 2023

Hi, I'm getting the same error as in the second comment. I am running the following:
python -m behavior.benchmark.behavior_benchmark --agent-class="PPO" --ckpt-path=".../behavior/benchmark/agents/checkpoints/onboard_sensing_ppo_random.zip". How was it resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants