Hi, I have some quesetion.
the config is
config = {
"env":"nuplan",
"env_config":None,
"num_workers":30,
# "record_env":False,
"create_env_on_driver": False,
"num_envs_per_worker":1,
"remote_worker_envs": False,
"num_gpus": 8,
"num_cpus_per_worker":1,
"num_gpus_per_worker":0,
"framework":"torch",
"model":{
"fcnet_hiddens": [512, 512,512,5123],
},
"timesteps_per_iteration":200,
# "sample_async": True,
"horizon": 600,
'rollout_fragment_length':4,#4*30=120
'train_batch_size':24,
'replay_buffer_config':
{
"_enable_replay_buffer_api": True,
"type": "MultiAgentReplayBuffer",
"learning_starts": 10,
"capacity": 50000,
"replay_sequence_length": 1,
},
# "training_intensity"=10 train/collect
"batch_mode": "truncate_episodes", # 也可以设置 "complete_episodes" truncate_episodes
}
pbt = PopulationBasedTraining(
time_attr="time_total_s",
perturbation_interval=7200,
resample_probability=0.25,
hyperparam_mutations={
"lr": lambda: random.uniform(1e-3, 5e-5),
"gamma": lambda: random.uniform(0.90, 0.99),
},)
and use it by :
if __name__ == "__main__":
ray.init(num_gpus=8)
tune.run(
"DQN",
config = cfg,
scheduler = pbt,
num_samples = 1,
metric = "episode_reward_mean",
mode = "max",
local_dir = "./results",)
but when i see the GPU util,is only 1% in a GPU and sometimes is always 0, Please help me! Thank you!
the version is 2.0.0 torch==1.9.0