zkonduit/ezkl

`ezkl.calibrate_settings` not working with a longish `scales` list

finlytics-hub opened this issue · 0 comments

Describe the bug

Unable to run ezkl.calibrate_settings() for a model when a longish list of integers was provided to the scales argument. A smaller list worked fine though.

Same length list worked with a another basic logistic regression PT model.

Error as below:

An error occurred: rust future panicked

Expected behaviors

Settings to be successfully calibrated.

This worked fine:

res = ezkl.gen_settings('model_0.onnx', 'settings.json')
res = await ezkl.calibrate_settings('input.json', 'model_0.onnx', 'settings.json', 'resources', scales=[1,5,10,12,15,20,25,30,35,50])

This also worked:

res = ezkl.gen_settings('model_1.onnx', 'settings.json')
res = await ezkl.calibrate_settings('input.json', 'model_0.onnx', 'settings.json', 'resources', scales=[1,5,10,12,15])

Steps to reproduce the bug

This didn't work:

res = ezkl.gen_settings('model_1.onnx', 'settings.json')
res = await ezkl.calibrate_settings('input.json', 'model_1.onnx', 'settings.json', 'resources', scales=[1,5,10,12,15,20,25,30,35,50]) # same error with 'accuracy' argument

Device and Operating System

OS: Ubuntu
Version: 22.04
Processor: Intel Haswell 96 vCPUs
Memory: 624 GB

Additional Information

  • python 3.10.12
  • ezkl v 1.16.0
  • pytorch v 2.1.0.dev20230727+cu121
    files.zip