@@ -4,106 +4,121 @@ eval_model_path: null
44baseline : false
55data_dir : data/processed/training
66continue_training : true
7- model_cpt : compatible_huggingface_model .pt
8- environment : # Overrides default environment configs (see pygpudrive /env/config.py)
7+ model_cpt : /home/wbk/gpudrive/runs/PPO__C__S_64__01_19_09_41_46_795_提高达成率/model_PPO__C__S_64__01_19_09_41_46_795_025817 .pt
8+ environment : # 覆盖环境配置(见 gpudrive /env/config.py)
99 name : " gpudrive"
10- num_worlds : 25 # 并行环境数量
11- k_unique_scenes : 25 # 采样场景数量
12- max_controlled_agents : 64 # 最大控制代理数量,确保与src/consts.hpp中的变量kMaxAgentCount一致
10+ num_worlds : 18 # 并行环境数量(进一步降低以减少重采样时显存峰值)
11+ k_unique_scenes : 72 # 采样场景数量(减少单次负载)
12+ max_controlled_agents : 64 # 最大控制代理数量(需与环境掩码维度一致)
1313 ego_state : true
1414 road_map_obs : true
1515 partner_obs : true
1616 norm_obs : true
17- remove_non_vehicles : true # 如果为false ,则包括所有代理(车辆、行人、自行车)
18- lidar_obs : false # NOTE: Setting this to true currently turns of the other observation types
17+ remove_non_vehicles : true # 如果为 false ,则包括所有代理(车辆、行人、自行车)
18+ lidar_obs : false # 注意:设为 true 会关闭其他观测类型
1919 reward_type : " weighted_combination"
20- collision_weight : -0.75
21- off_road_weight : -0.75
22- goal_achieved_weight : 1.0
20+ collision_weight : -3.0 # 提高碰撞惩罚:减少转弯时的碰撞
21+ off_road_weight : -1.5 # 降低:允许适度冒险
22+ goal_achieved_weight : 1.0 # 大幅提高:让"到达"比"安全躲避"更有吸引力
23+ # 避免"动几下就停"的塑形项(仅 weighted_combination 生效)
24+ time_penalty : 0.005 # 提高:增强推进压力
25+ idle_speed_threshold : 0.5
26+ idle_penalty : 0.02 # 降低:避免惩罚过重
27+ # 进度奖励:距离目标越近奖励越高(密集正向信号)
28+ progress_reward_weight : 0.1 # 降低:避免改变奖励scale太多
29+ progress_reward_scale : 20.0
30+ # 转弯速度惩罚:转弯时速度过快会给予惩罚,减少碰撞
31+ turn_speed_penalty_weight : 0.05 # 转弯速度惩罚权重
32+ turn_speed_threshold : 8.0 # 速度阈值(超过此速度时开始惩罚)
2333 dynamics_model : " classic"
24- collision_behavior : " ignore " # Options: "remove", "stop", "ignore"
34+ collision_behavior : " remove " # 选项: "remove"、 "stop"、 "ignore"
2535 dist_to_goal_threshold : 2.0
26- polyline_reduction_threshold : 0.1 # 采样点率(0表示使用所有最近点,1表示最大稀疏度),需要与kMaxAgentMapObservationsCount平衡
27- sampling_seed : 42 # If given, the set of scenes to sample from will be deterministic, if None, the set of scenes will be random
28- obs_radius : 50.0 # Visibility radius of the agents
36+ polyline_reduction_threshold : 0.1 # 采样点率(0 表示使用所有最近点,1 表示最大稀疏度),需与 kMaxAgentMapObservationsCount 平衡
37+ sampling_seed : 42 # 若设置则场景采样可复现;为 None 则随机
38+ obs_radius : 50.0 # 智能体可见半径
2939 action_space_steer_disc : 13
3040 action_space_accel_disc : 7
31- # Versatile Behavior Diffusion (VBD): This will slow down training
41+ # Versatile Behavior Diffusion (VBD):开启会降低训练速度
3242 use_vbd : false
3343 vbd_model_path : " gpudrive/integrations/vbd/weights/epoch=18.ckpt"
3444 init_steps : 11
35- vbd_trajectory_weight : 0.1 # Importance of distance to the vbd trajectories in the reward function
45+ vbd_trajectory_weight : 0.1 # 奖励中 VBD 轨迹距离项的权重
3646 vbd_in_obs : false
3747
3848wandb :
3949 entity : " "
4050 project : " gpudrive"
4151 group : " test"
42- mode : " online" # Options: online, offline, disabled
52+ mode : " online" # 选项: online、 offline、 disabled
4353 tags : ["ppo", "ff"]
4454
4555train :
46- exp_id : PPO # Set dynamically in the script if needed
56+ exp_id : PPO # 如需可在脚本中动态设置
4757 seed : 42
4858 cpu_offload : false
49- device : " cuda" # Dynamically set to cuda if available, else cpu
59+ device : " cuda" # 若可用则使用 cuda,否则使用 cpu
5060 bptt_horizon : 1
5161 compile : false
5262 compile_mode : " reduce-overhead"
5363
54- # # # Data sampling # # #
55- resample_scenes : false
56- resample_dataset_size : 10_000 # Number of unique scenes to sample from
57- resample_interval : 2_000_000
64+ # # # 数据采样 # # #
65+ resample_scenes : false # 开启重采样,提升泛化能力
66+ resample_dataset_size : 10_000
67+ resample_interval : 10_000_000 # 50M步训练约5次重采样,平衡稳定性和泛化
5868 sample_with_replacement : true
5969 shuffle_dataset : false
6070
6171 # # # PPO # # #
6272 torch_deterministic : false
63- total_timesteps : 100_000_000
64- batch_size : 32_768
65- minibatch_size : 2048
66- learning_rate : 3e-4
67- anneal_lr : false
73+ total_timesteps : 450_000_000
74+ batch_size : 18432
75+ minibatch_size : 3072
76+ # 降低学习率:策略已学会,现在需要精细调优
77+ learning_rate : 1e-4 # 降低,让更新更平滑
78+ anneal_lr : false # 关闭衰减!
6879 gamma : 0.99
6980 gae_lambda : 0.95
70- update_epochs : 4
81+ # 收紧更新:避免策略变化太大
82+ update_epochs : 3 # 减少更新次数
7183 norm_adv : true
72- clip_coef : 0.2
73- clip_vloss : false
84+ clip_coef : 0.15 # 收紧clip,限制策略变化幅度
85+ # value 更稳
86+ clip_vloss : true
7487 vf_clip_coef : 0.2
75- ent_coef : 0.0001
88+ # 降低探索:策略已学会走,现在需要更稳定(减少晃动)
89+ ent_coef : 0.0003 # 从 0.001 降低到 0.0003
7690 vf_coef : 0.3
7791 max_grad_norm : 0.5
78- target_kl : null
92+ # KL 早停,避免重采样后一次更新过猛导致震荡
93+ target_kl : 0.02
7994 log_window : 1000
8095
81- # # # Network # # #
96+ # # # 网络 # # #
8297 network :
83- input_dim : 64 # Embedding of the input features
84- hidden_dim : 128 # Latent dimension
98+ input_dim : 64 # 输入特征嵌入维度
99+ hidden_dim : 128 # 潜在维度
85100 dropout : 0.01
86101 class_name : " NeuralNet"
87- num_parameters : 0 # Total trainable parameters, to be filled at runtime
102+ num_parameters : 0 # 可训练参数数量(运行时填充)
88103 # 新增:观察融合网络配置
89104 fusion_type : " attention" # 选项: "simple", "attention", "adaptive"
90105 num_attention_heads : 4 # 注意力头数(仅在fusion_type="attention"时有效)
91106
92- # # # Checkpointing # # #
93- checkpoint_interval : 100 # Save policy every k iterations
107+ # # # 检查点保存 # # #
108+ checkpoint_interval : 200 # 每隔 k 次迭代保存一次
94109 checkpoint_path : " ./runs"
95110
96- # # # Rendering # # #
97- render : false # Determines whether to render the environment (note: will slow down training)
98- render_3d : true # Render simulator state in 3d or 2d
99- render_interval : 1 # Render every k iterations
100- render_k_scenarios : 10 # Number of scenarios to render
101- render_format : " mp4" # Options: gif, mp4
102- render_fps : 15 # Frames per second
111+ # # # 渲染 # # #
112+ render : false # 是否渲染环境(开启会减慢训练)
113+ render_3d : true # 渲染 3D 或 2D
114+ render_interval : 1 # 每隔 k 次迭代渲染
115+ render_k_scenarios : 0 # 训练期建议为 0,避免额外 IO/不确定性
116+ render_format : " mp4" # 选项: gif、 mp4
117+ render_fps : 15 # 每秒帧数
103118 zoom_radius : 50
104119
105120vec :
106- backend : " native" # Only native is currently supported
121+ backend : " native" # 目前仅支持 native
107122 num_workers : 1
108123 env_batch_size : 1
109124 zero_copy : false
0 commit comments