I use Stable_baseline3.PPO to train an agent on highway-fast-v0 (continues action type), and find that when calling ppo.learn() method, it is aborted with "Process finished with exit code 139" and no other error message. And this error is not occur at the same time_step when training, how can I solve it?
import gym
from stable_baselines3 import PPO
import warnings
warnings.filterwarnings('ignore')
# ==================================
# Main script
# ==================================
def make_configure_env(**kwargs):
env = gym.make(kwargs["id"])
env.configure(kwargs["config"])
env.reset()
return env
env_kwargs = {
'id': 'highway-fast-v0',
'config': {
"action": {
"type": "ContinuousAction"
}
}
}
n_cpu = 6
batch_size = 64
env = make_configure_env(**env_kwargs)
env.reset()
model = PPO("MlpPolicy",
env,
policy_kwargs=dict(net_arch=[dict(pi=[256, 256], vf=[256, 256])]),
n_steps=batch_size * 12 // n_cpu,
batch_size=batch_size,
n_epochs=10,
learning_rate=5e-4,
gamma=0.8,
verbose=2,
tensorboard_log="highway_ppo/")
# Train the agent
model.learn(total_timesteps=2e4)
# Save the agent
model.save("highway_ppo_continues/model")