Fabien-Couthouis / XAI-in-RL

18 stars 8 forks source link

Cannot run launch_experiments.py #22

Open xlws1 opened 1 month ago

xlws1 commented 1 month ago

Hello, I'm a first-year graduate student. When running the launch_experiments.py file in the multiagent_particles/experiments folder, I encountered the following error: WARNING:tensorflow: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

Fabien-Couthouis commented 1 month ago

Hi! The tensorflow version used in this work is tensorflow==1.15.0, please refer to the conda environment.yml file available here: https://github.com/Fabien-Couthouis/XAI-in-RL/blob/master/multiagent_particles/environment.yml for packages version.

Hope it helps. Tell me if you have other issues.

xlws1 commented 1 month ago

Thank you very much for your reply, I directly used the command conda env create -n mparticles environment.yml to import the environment.yml file you provided to create the experimental environment for multi-agent particles. I believe the environment should not have any issues (Figure 1).

I used: python run.py --load-dir "saves/run_10/episode_200000/model" --missing-agents-behaviour "idle" --exp-name run_10_idle_0 --save-dir rewards2-ht/1 --shapley-M 1000 --num-episodes 1 to reproduce your code by adjusting the parameters --load-dir and --missing-agents-behaviour.

After saving the experimental results to the folder I created, /rewards2-ht/1, I wanted to plot the results using the command python plots.py rewards --plot_type your_plot_type.

When I entered python plots.py --result_dir rewards2-ht/1 --plot-type model_rewards --model-dir saves/run_10/, the resulting graph did not match the one you provided (Figure 2).

Why did the rewards\exp2 path appear? I suspect that I modified the parameters in the command line, but the code did not execute as expected.1 2

Fabien-Couthouis commented 1 month ago

If you want to reproduce the shapley values results, use the launch_experiment script:

python launch_experiments.py

xlws1 commented 4 weeks ago

I recreated the virtual environment and then ran the launch.experiment script. A new error has occurred:Traceback (most recent call last): File "E:\project\XAI-in-RL-master\multiagent_particles\experiments\launch_experiments.py", line 4, in from rollout import rollout File "E:\project\XAI-in-RL-master\multiagent_particles\experiments\rollout.py", line 8, in from maddpg.trainer.maddpg import MADDPGAgentTrainer File "E:\project\XAI-in-RL-master\multiagent_particles\experiments\maddpg\trainer\maddpg.py", line 6, in from maddpg.common.distributions import make_pdtype File "E:\project\XAI-in-RL-master\multiagent_particles\experiments\maddpg\common\distributions.py", line 5, in from multiagent.multi_discrete import MultiDiscrete ModuleNotFoundError: No module named 'multiagent'
What is the reason for this? 捕获

xlws1 commented 3 weeks ago

I added multi-agent article env master to the system environment variable and resolved an error message that when I executed python launch.exe. py, it reported a series of Warnings but still did not run the experiment. I checked the files in the XAI in RL master \ multiagent_marticles directory and found three more places where an error message appeared before running pycharm. Does this affect the experiment? I am unable to resolve these error messages. Can you please help me? 1 2 3