wangqinsi1 / MathNAS

This is Official PyTorch implementation for 2023-NeurIPS-MathNAS: If Blocks Have a Role in Mathematical Architecture Design.
33 stars 2 forks source link

gurobipy license #2

Closed iksooman closed 6 months ago

iksooman commented 6 months ago

Thanks for sharing your code! I'm trying to test your code. But I met an error like:

(mathnas3.9) mac@MacBookAir MathNAS % python main.py --mode nas --search_space mobilenetv3 --device raspberrypi --latency_constraint 500
==> save path is [results/mobilenetv3/raspberrypi] ...
=====> search space is [mobilenetv3] ...
start heavy search
Traceback (most recent call last):
  File "/Users/mac/git_repo/MathNAS/main.py", line 119, in <module>
    main()
  File "/Users/mac/git_repo/MathNAS/main.py", line 97, in main
    arch,arch_acc,arch_lat=mobilenetv3_search(block_acc, block_lat, args.latency_constraint, args.device)
  File "/Users/mac/git_repo/MathNAS/search.py", line 248, in mobilenetv3_search
    model = gp.Model("mip1")
  File "src/gurobipy/model.pxi", line 68, in gurobipy.Model.__init__
  File "src/gurobipy/gurobi.pxi", line 32, in gurobipy.gurobi._getdefaultenv
  File "src/gurobipy/env.pxi", line 62, in gurobipy.Env.__init__
gurobipy.GurobiError: License expired 2023-10-25

Do I need to sign in gurobi and get a license?

wangqinsi1 commented 6 months ago

Yes, in order to use Gurobi on edge devices, you need to get a license. Specifically, I applied as a student at http://www.gurobi.cn/NewsView1.Asp?id=4. After filling out the application form, the approval process is available within a few days. (I got it the next day)

iksooman commented 6 months ago

@wangqinsi1 OK! I'll try it. Thanks for your kind answer.