Skip to content

Commit

Permalink
Refactor PPO model instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
ll7 committed Feb 29, 2024
1 parent e37b2ff commit 99c4948
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/training_ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ def make_env():
env = make_vec_env(make_env, n_envs=n_envs, vec_env_cls=SubprocVecEnv)

policy_kwargs = dict(features_extractor_class=DynamicsExtractor)
model = PPO("MultiInputPolicy", env, tensorboard_log="./logs/ppo_logs/", policy_kwargs=policy_kwargs)
model = PPO(
"MultiInputPolicy",
env,
tensorboard_log="./logs/ppo_logs/",
policy_kwargs=policy_kwargs
)
save_model_callback = CheckpointCallback(500_000 // n_envs, "./model/backup", "ppo_model")
collect_metrics_callback = DrivingMetricsCallback(n_envs)
combined_callback = CallbackList([save_model_callback, collect_metrics_callback])
Expand Down

0 comments on commit 99c4948

Please sign in to comment.