Giter VIP home page Giter VIP logo

Comments (3)

Theohhhu avatar Theohhhu commented on May 19, 2024

Hi,

I recommend you reproduce this kind of error in your python console.

  1. switch to your python virtual environment
  2. type pip show metadrive to check the installation
  3. if you pass step 2, enter into the python console.
  4. in console, type import metadrive or import metadrive.envs to see the full error trace.

Any further question is welcome.

from marllib.

Theohhhu avatar Theohhhu commented on May 19, 2024

You can reopen this issue if you have further questions.

from marllib.

OscarBastardo avatar OscarBastardo commented on May 19, 2024

I am having the same issue.

The full error trace as requested:

(marllib) oscar@dl:~/msc/MARLlib$ python marl/main.py --algo_config=mappo --env_config=metadrive with env_args.map_name=Roundabout
/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/scipy/__init__.py:143: UserWarning: A NumPy version >=1.19.5 and <1.27.0 is required for this version of SciPy (detected version 1.19.3)
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
It seems you don't install our cython utilities yet! Please reinstall MetaDrive via: <pip install -e .> or <pip install metadrive>! But don't worry! We are now falling back to native python implementation!
WARNING:root:It seems you don't install our cython utilities yet! Please reinstall MetaDrive via: <pip install -e .> or <pip install metadrive>! But don't worry! We are now falling back to native python implementation!
It seems you don't install our cython utilities yet! Please reinstall MetaDrive via: <pip install -e .> or <pip install metadrive>! But don't worry! We are now falling back to native python implementation!
WARNING:root:It seems you don't install our cython utilities yet! Please reinstall MetaDrive via: <pip install -e .> or <pip install metadrive>! But don't worry! We are now falling back to native python implementation!
Successfully registered the following environments: ['MetaDrive-test-v0', 'MetaDrive-validation-v0', 'MetaDrive-v0', 'MetaDrive-10envs-v0', 'MetaDrive-1000envs-v0', 'MetaDrive-training0-v0', 'MetaDrive-training1-v0', 'MetaDrive-training2-v0'].
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| Env_Name   | Check_Status   | Error_Log                           | Config_File_Location                | Env_File_Location          |
+============+================+=====================================+=====================================+============================+
| mpe        | Error          | No module named 'numpy.typing'      | envs/base_env/config/mpe.yaml       | envs/base_env/mpe.py       |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| mamujoco   | Error          | No module named 'multiagent_mujoco' | envs/base_env/config/mamujoco.yaml  | envs/base_env/mamujoco.py  |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| smac       | Error          | No module named 'smac'              | envs/base_env/config/smac.yaml      | envs/base_env/smac.py      |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| football   | Error          | No module named 'gfootball'         | envs/base_env/config/football.yaml  | envs/base_env/football.py  |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| magent     | Error          | No module named 'numpy.typing'      | envs/base_env/config/magent.yaml    | envs/base_env/magent.py    |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| rware      | Error          | No module named 'rware'             | envs/base_env/config/rware.yaml     | envs/base_env/rware.py     |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| lbf        | Error          | No module named 'lbforaging'        | envs/base_env/config/lbf.yaml       | envs/base_env/lbf.py       |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| pommerman  | Error          | No module named 'pommerman'         | envs/base_env/config/pommerman.yaml | envs/base_env/pommerman.py |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| hanabi     | Error          | No module named 'cffi'              | envs/base_env/config/hanabi.yaml    | envs/base_env/hanabi.py    |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
| metadrive  | Ready          | Null                                | envs/base_env/config/metadrive.yaml | envs/base_env/metadrive.py |
+------------+----------------+-------------------------------------+-------------------------------------+----------------------------+
use fc encoder
(pid=12551) /home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/scipy/__init__.py:143: UserWarning: A NumPy version >=1.19.5 and <1.27.0 is required for this version of SciPy (detected version 1.19.3)
(pid=12551)   warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
== Status ==
Current time: 2023-02-01 07:55:05 (running for 00:00:01.17)
Memory usage on this node: 2.6/31.3 GiB
Using FIFO scheduling algorithm.
Resources requested: 1.0/8 CPUs, 1.0/2 GPUs, 0.0/17.85 GiB heap, 0.0/8.92 GiB objects (0.0/1.0 accelerator_type:G)
Result logdir: /home/oscar/ray_results/mappo_gru_Roundabout
Number of trials: 1/1 (1 RUNNING)
+-----------------------------------------------+----------+-------+
| Trial name                                    | status   | loc   |
|-----------------------------------------------+----------+-------|
| MAPPOTrainer_metadrive_Roundabout_bcdde_00000 | RUNNING  |       |
+-----------------------------------------------+----------+-------+


2023-02-01 07:55:05,771 ERROR trial_runner.py:924 -- Trial MAPPOTrainer_metadrive_Roundabout_bcdde_00000: Error processing event.
Traceback (most recent call last):
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/tune/trial_runner.py", line 890, in _process_trial
    results = self.trial_executor.fetch_result(trial)
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/tune/ray_trial_executor.py", line 788, in fetch_result
    result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper
    return func(*args, **kwargs)
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/worker.py", line 1627, in get
    raise value
ray.exceptions.RayActorError: The actor died because of an error raised in its creation task, ray::MAPPOTrainer.__init__() (pid=12551, ip=192.168.0.98)
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/rllib/agents/trainer_template.py", line 137, in __init__
    Trainer.__init__(self, config, env, logger_creator)
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/rllib/agents/trainer.py", line 623, in __init__
    super().__init__(config, logger_creator)
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/tune/trainable.py", line 107, in __init__
    self.setup(copy.deepcopy(self.config))
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/rllib/agents/trainer_template.py", line 147, in setup
    super().setup(config)
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/rllib/agents/trainer.py", line 716, in setup
    self.env_creator = _global_registry.get(ENV_CREATOR, env)
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/tune/registry.py", line 168, in get
    return pickle.loads(value)
  File "/home/oscar/msc/MARLlib/envs/base_env/metadrive.py", line 3, in <module>
    from metadrive.envs.marl_envs import MultiAgentBottleneckEnv, MultiAgentParkingLotEnv, MultiAgentRoundaboutEnv, \
ModuleNotFoundError: No module named 'metadrive.envs'
== Status ==
Current time: 2023-02-01 07:55:05 (running for 00:00:01.17)
Memory usage on this node: 2.6/31.3 GiB
Using FIFO scheduling algorithm.
Resources requested: 0/8 CPUs, 0/2 GPUs, 0.0/17.85 GiB heap, 0.0/8.92 GiB objects (0.0/1.0 accelerator_type:G)
Result logdir: /home/oscar/ray_results/mappo_gru_Roundabout
Number of trials: 1/1 (1 ERROR)
+-----------------------------------------------+----------+-------+
| Trial name                                    | status   | loc   |
|-----------------------------------------------+----------+-------|
| MAPPOTrainer_metadrive_Roundabout_bcdde_00000 | ERROR    |       |
+-----------------------------------------------+----------+-------+
Number of errored trials: 1
+-----------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------+
| Trial name                                    |   # failures | error file                                                                                                                 |
|-----------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------|
| MAPPOTrainer_metadrive_Roundabout_bcdde_00000 |            1 | /home/oscar/ray_results/mappo_gru_Roundabout/MAPPOTrainer_metadrive_Roundabout_bcdde_00000_0_2023-02-01_07-55-04/error.txt |
+-----------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------------------------+

(pid=12551) 2023-02-01 07:55:05,767     ERROR worker.py:425 -- Exception raised in creation task: The actor died because of an error raised in its creation task, ray::MAPPOTrainer.__init__() (pid=12551, ip=192.168.0.98)
(pid=12551)   File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/rllib/agents/trainer_template.py", line 137, in __init__
(pid=12551)     Trainer.__init__(self, config, env, logger_creator)
(pid=12551)   File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/rllib/agents/trainer.py", line 623, in __init__
(pid=12551)     super().__init__(config, logger_creator)
(pid=12551)   File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/tune/trainable.py", line 107, in __init__
(pid=12551)     self.setup(copy.deepcopy(self.config))
(pid=12551)   File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/rllib/agents/trainer_template.py", line 147, in setup
(pid=12551)     super().setup(config)
(pid=12551)   File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/rllib/agents/trainer.py", line 716, in setup
(pid=12551)     self.env_creator = _global_registry.get(ENV_CREATOR, env)
(pid=12551)   File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/tune/registry.py", line 168, in get
(pid=12551)     return pickle.loads(value)
(pid=12551)   File "/home/oscar/msc/MARLlib/envs/base_env/metadrive.py", line 3, in <module>
(pid=12551)     from metadrive.envs.marl_envs import MultiAgentBottleneckEnv, MultiAgentParkingLotEnv, MultiAgentRoundaboutEnv, \
(pid=12551) ModuleNotFoundError: No module named 'metadrive.envs'
Traceback (most recent call last):
  File "marl/main.py", line 55, in <module>
    run_cc(config_dict)
  File "/home/oscar/msc/MARLlib/marl/algos/run_cc.py", line 182, in run_cc
    results = POlICY_REGISTRY[config_dict["algorithm"]](config_dict, common_config, env_info_dict, stop)
  File "/home/oscar/msc/MARLlib/marl/algos/scripts/mappo.py", line 64, in run_mappo
    results = tune.run(MAPPOTrainer,
  File "/home/oscar/anaconda3/envs/marllib/lib/python3.8/site-packages/ray/tune/tune.py", line 624, in run
    raise TuneError("Trials did not complete", incomplete_trials)
ray.tune.error.TuneError: ('Trials did not complete', [MAPPOTrainer_metadrive_Roundabout_bcdde_00000])

from marllib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.