aw_nas icon indicating copy to clipboard operation
aw_nas copied to clipboard

The program is stuck in an endless loop, when run awnas search examples/nasbench/nasbench-101_gates_sa.yaml

Open czyczyyzc opened this issue 3 years ago • 1 comments

When I run "awnas search examples/nasbench/nasbench-101_gates_sa.yaml --gpu 0 --save-every 10 --train-dir /public/data1/users/ziyechen/awnas/logs/nasbench-101_gates_sa", the program is stuck in an endless loop.

I find the program is stuck in the 633 line of https://github.com/walkerning/aw_nas/blob/master/aw_nas/btcs/nasbench_101.py try: ss.nasbench._check_spec(new_rollout.genotype) except api.OutOfDomainError: continue I print the mutated genotype, and find many 'none' operations.

I guess the mutation of operation in the 'else' clause may be wrong, since it may change the old operation with the 'none' opearion. And I think we should change 'new_ops = np.random.randint(0, ss.num_op_choices, size=1)[0]' to 'new_ops = np.random.randint(0, ss.num_op_choices-1, size=1)[0]', since the last operation is the 'none' operation.

image

czyczyyzc avatar Apr 26 '21 12:04 czyczyyzc

Hello, thanks for your contribution. I did not reproduce this bug, perhaps due to random. May I know that if you solve this problem after changing ss.num_op_choices to ss.num_op_choices - 1 and no other problems occur? Thank you.

TangChangcheng avatar Jun 08 '21 08:06 TangChangcheng