Skip to content
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

NesterovAcceleratedGradientOptimizer param_groups[0]['obj_k_1'] is empty list #25

Closed
zhouyusd opened this issue Mar 24, 2023 · 3 comments

Comments

@zhouyusd
Copy link

I ran the command

python DeepPlace/main.py --task "fullplace" --algo ppo --use-gae --lr 2.5e-4 --clip-param 0.1 --value-loss-coef 0.5 --num-processes 1 --num-steps 2840 --num-mini-batch 4 --log-interval 1 --use-linear-lr-decay --entropy-coef 0.01

I got the error:

[{'params': [Parameter containing:
tensor([11612.3311, 11638.4473, 11630.4658,  ..., 17524.0566,  2358.3323,
         7378.4912], device='cuda:0', requires_grad=True)], 'lr': tensor(3072.4233, device='cuda:0'), 'u_k': [], 'v_k': [], 'g_k': [], 'obj_k': [], 'a_k': [], 'alpha_k': [], 'v_k_1': [], 'g_k_1': [], 'obj_k_1': [], 'v_kp1': [None], 'obj_eval_count': 0}]
Traceback (most recent call last):
  File "main.py", line 210, in <module>
    main()
  File "main.py", line 133, in main
    obs, done, reward = envs.step(action)
  File "/root/DeepPlace/fullplace_env.py", line 268, in step
    reward = new_cal_re(self.results, self.params)
  File "/root/DeepPlace/fullplace_env.py", line 173, in new_cal_re
    r = place(params)
  File "/root/DeepPlace/fullplace_env.py", line 55, in place
    metrics = placer(params, placedb)
  File "/root/DeepPlace/NonLinearPlace.py", line 273, in __call__
    one_descent_step(Lgamma_step, Llambda_density_weight_step, Lsub_step, iteration, Lsub_metrics)
  File "/root/DeepPlace/NonLinearPlace.py", line 243, in one_descent_step
    cur_metric.objective = optimizer.param_groups[0]['obj_k_1'][0].data.clone()
IndexError: list index out of range

How should I fix it?

@Rogerity
Copy link
Member

Sorry that I have never met this problem, but it seems there is something wrong with the DREAMPlace part. Maybe you can refer to https://github.com/limbo018/DREAMPlace/issues for similar issues.

@SP-FA
Copy link

SP-FA commented Dec 27, 2023

Hope you fix this problem now. I have an idea about how to fix it: limbo018/DREAMPlace#164, and I want to know if this method is correct for this issue?

@zhouyusd
Copy link
Author

I have already solved this problem, thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants