rogermt commited on
Commit
0ddbf8d
·
verified ·
1 Parent(s): 3644a98

Fix submission.py: adapt to new profiler API returning (memory, params) instead of (macs, memory, params)"

Browse files
own-solver/neurogolf_solver/submission.py CHANGED
@@ -37,10 +37,13 @@ def run_tasks(task_nums, tasks, output_dir, providers, conv_budget, excluded_tas
37
  )
38
 
39
  if ok:
40
- macs, memory, params = score_network(model_path)
41
- if macs is None:
42
- macs, memory, params = 0, 0, 0
43
- cost = macs + memory + params
 
 
 
44
  score = max(1.0, 25.0 - math.log(max(1, cost)))
45
  total_score += score
46
 
 
37
  )
38
 
39
  if ok:
40
+ profile_result = score_network(model_path)
41
+ if profile_result is None or profile_result[0] is None:
42
+ memory, params = 0, 0
43
+ else:
44
+ memory, params = profile_result[0], profile_result[1]
45
+
46
+ cost = memory + params
47
  score = max(1.0, 25.0 - math.log(max(1, cost)))
48
  total_score += score
49