-
Notifications
You must be signed in to change notification settings - Fork 8
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
Cannot run launch_experiments.py #22
Comments
Hi! Hope it helps. Tell me if you have other issues. |
If you want to reproduce the shapley values results, use the launch_experiment script: python launch_experiments.py |
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:
If you depend on functionality not listed there, please file an issue.
Then I noticed an error in the fourth line of the def save_goal_agents(N, folder_name, agent_speeds): function:
exp_name = f"{folder_name}/{run}{behaviour}{str(speeds)}{n}"
The error message indicated unresolved references to behaviour, speeds, and n.
After modifying the code to:
python
def save_goal_agents(N, folder_name, agent_speeds):
runs = ["run_10", "run_11", "run_12", "run_13", "run_14"]
missing_agents_behaviours = ["idle", "random_player", "random"] # Ensure this list includes all required behaviors
for n in range(N):
for run in runs:
for behaviour in missing_agents_behaviours:
for speeds in agent_speeds:
# Convert each element in the speeds list to a string and separate them with commas
speeds_str = ','.join(map(str, speeds))
exp_name = f"{folder_name}/{run}{behaviour}{speeds_str}{n}"
fname = f"{exp_name}.csv"
if not os.path.exists(fname):
command = f'python run.py --load-dir "saves/{run}/episode_200000/model" --exp-name {exp_name} --save-dir {folder_name} --rollout --num-episodes {N} --agent-speeds'
for speed in speeds:
command += f" {speed}"
subprocess.run(command, shell=True)
There are no more error messages, but I still receive the warning:
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
If you depend on functionality not listed there, please file an issue.
The text was updated successfully, but these errors were encountered: