-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Required prerequisites
- I have read the documentation https://omnisafe.readthedocs.io.
- I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
- Consider asking first in a Discussion.
Questions
As I know Omnisafe provides an interface for MetaDrive. After having Omnisafe installed, I proceeded to install the latest MetaDrive environment following the regular installation steps. However, whenever I attempt to run the example code, I'm constantly faced with import errors.
When executing the following installation instructions for Metadrive, an import error still appears. It seems that the issue is caused by the installed versions of the dependency packages.
pip install metadrive
or
git clone https://github.com/metadriverse/metadrive.git
cd metadrive
pip install -e .
The error messages are as follows:
python train_policy.py --algo PPOLag --env SafeMetaDrive
Loading PPOLag.yaml from /home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/utils/../configs/on-policy/PPOLag.yaml
Traceback (most recent call last):
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/examples/train_policy.py", line 84, in <module>
agent = omnisafe.Agent(
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/algorithms/algo_wrapper.py", line 73, in __init__
self._init_algo()
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/algorithms/algo_wrapper.py", line 167, in _init_algo
self.agent: BaseAlgo = registry.get(self.algo)(
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/algorithms/base_algo.py", line 48, in __init__
self._init_env()
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/algorithms/on_policy/base/policy_gradient.py", line 64, in _init_env
self._env: OnPolicyAdapter = OnPolicyAdapter(
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/adapter/onpolicy_adapter.py", line 55, in __init__
super().__init__(env_id, num_envs, seed, cfgs)
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/adapter/online_adapter.py", line 71, in __init__
self._env: CMDP = make(env_id, num_envs=num_envs, device=self._device, **env_cfgs)
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/envs/core.py", line 421, in make
return env_class(env_id, **kwargs)
File "/home/DeepAI/opt/thesis/multi-constraint/omnisafe_metadrive/omnisafe/envs/meta_drive_env.py", line 86, in __init__
raise ImportError(
ImportError: Please install MetaDrive to use SafeMetaDrive!
Install from source: https://github.com/metadriverse/metadrive.
Install from PyPI: `pip install metadrive`.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested