zkonduit / ezkl

ezkl is an engine for doing inference for deep learning models and other computational graphs in a zk-snark (ZKML). Use it from Python, Javascript, or the command line.

Home Page:https://docs.ezkl.xyz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with Gen Settings in Python

zd819 opened this issue · comments

Describe the bug

Running Gen_Settings function on some of my ML models produces the following errors:

CIN Model (Attached)
Failed to generate settings: Failed analyse for node #8 "/Mul" Mul

IIN Model (Attached)
Failed to generate settings: Failed analyse for node #48 "/target_attention.0/Unsqueeze" Unsqueeze13

LIN Model (Attached)
Failed to generate settings: Failed analyse for node #16 "/Squeeze" Squeeze13

Expected behaviors

Gen_Settings to run correctly and produce a settings file

Steps to reproduce the bug

  1. Load Models and Corresponding Input file
  2. Generate and calibrate settings using the attached onnx and input.json files

Device and Operating System

OS: Windows 10 Home
Version: 10.0.19045 Build 19045
Processor: Intel(R) Core(TM) i5-1035G1 CPU
Memory: 20 GB

Additional Information

Python 3.10.4
Ezkl 1.7.19
torch 1.13.1
onnx 1.14.0

Files:
models.zip
inputs.zip

commented

@zd819 thank you for the issue. I think this is an issue with tract, a library we use. Will open an issue there.

commented

@zd819 before I file an issue -- can you see if this issue persists when exporting the model with Onnx versions 10 through 12 ?

commented

@zd819 before I file an issue -- can you see if this issue persists when exporting the model with Onnx versions 10 through 12 ?

we have verified that this issue persists with onnx version 10.

commented

#417 solves issues for the CIN model

commented

Opened a separate issue for IIN Model.
sonos/tract#1156

commented

The LIN model isn't really properly specified from what I can tell. It mixes variable batch_size with a specified batch_size of 20. It failing seems like something we would want tbh

Thanks for all the focus and quick fixes Alex and the ezkl team. I am testing the new changes on the CIN Model, and for the LIN model we have changed it since. Will run tests and reply with results, but as you've tested should mostly be fixed for CIN.
Will await the IIN fix

commented

Seems like IIN also has inconsistent shapes, see here: sonos/tract#1156 (comment) . Will need to resolve those to produce a coherent / consistent graph.

Will close this as we resolved issues with CIN and LIN