Giter Site home page Giter Site logo

Comments (6)

JSeam2 avatar JSeam2 commented on June 15, 2024 1

Python script to replicate this

import subprocess

p = subprocess.run([
        "ezkl",
        "--bits=16",
        "-K=17",
        "prove",
        "-D", "./examples/onnx/1l_relu/input.json",
        "-M", "./examples/onnx/1l_relu/network.onnx",
        "--proof-path", "1l_relu.pf",
        "--vk-path", "1l_relu.vk",
        "--params-path=" + "kzg.params",
        "--transcript=evm"
    ],
    capture_output=True,
    text=True
)

print("STDOUT")
print(p.stdout)

print("STDERR")
print(p.stderr)

Output goes into STDERR

Sample output

STDOUT

STDERR
[*] 
 |          ███████╗███████╗██╗  ██╗██╗
 |          ██╔════╝╚══███╔╝██║ ██╔╝██║
 |          █████╗    ███╔╝ █████╔╝ ██║
 |          ██╔══╝   ███╔╝  ██╔═██╗ ██║
 |          ███████╗███████╗██║  ██╗███████╗
 |          ╚══════╝╚══════╝╚═╝  ╚═╝╚══════╝
 |  
 |          -----------------------------------------------------------
 |          Easy Zero Knowledge for the Laconic.
 |          -----------------------------------------------------------
 |          
[*] {"command":{"Prove":{"data":"./examples/onnx/1l_relu/input.json","model":"./examples/onnx/1l_relu/network.onnx","vk_path":"1l_relu.vk","proof_path":"1l_relu.pf","params_path":"kzg.params","transcript":"EVM","strategy":"Single"}},"args":{"tolerance":0,"scale":7,"bits":16,"logrows":17,"public_inputs":false,"public_outputs":true,"public_params":false,"max_rotations":512}}
[*] loading data from ./examples/onnx/1l_relu/input.json
[*] visibility: (inputs: private, params: private, outputs: public)
[*] assigning configuration buckets to operations
[*] public inputs lengths: [3]
[*] loading params from "kzg.params"
[*] visibility: (inputs: private, params: private, outputs: public)
[*] assigning configuration buckets to operations
[*] number of advices used: 2
[*] number of fixed used: 0
[*] number of instances used: 1
[*] configuring model
[*] output_shapes [[3]]
[*] model layout
[*] model outputs are nodes: [1]
[*] computing...
[*] VK took 1
[*] visibility: (inputs: private, params: private, outputs: public)
[*] assigning configuration buckets to operations
[*] number of advices used: 2
[*] number of fixed used: 0
[*] number of instances used: 1
[*] configuring model
[*] output_shapes [[3]]
[*] model layout
[*] model outputs are nodes: [1]
[*] computing...
[*] PK took 1
[*] visibility: (inputs: private, params: private, outputs: public)
[*] assigning configuration buckets to operations
[*] number of advices used: 2
[*] number of fixed used: 0
[*] number of instances used: 1
[*] configuring model
[*] output_shapes [[3]]
[*] model layout
[*] model outputs are nodes: [1]
[*] computing...
[*] visibility: (inputs: private, params: private, outputs: public)
[*] assigning configuration buckets to operations
[*] number of advices used: 2
[*] number of fixed used: 0
[*] number of instances used: 1
[*] configuring model
[*] output_shapes [[3]]
[*] model layout
[*] model outputs are nodes: [1]
[*] computing...
[*] Proof took 8
[*] verify took 0
[*] proof took 9
[*] saving verification key 💾
[*] succeeded

from ezkl.

alexander-camuto avatar alexander-camuto commented on June 15, 2024

Thanks for catching this. Are you using pyezkl or your own package ?

from ezkl.

JSeam2 avatar JSeam2 commented on June 15, 2024

It's my own package the repo is located here!
https://github.com/JSeam2/zkml-server

from ezkl.

alexander-camuto avatar alexander-camuto commented on June 15, 2024

can you send a command so I can quickly replicate this :) ?

from ezkl.

JSeam2 avatar JSeam2 commented on June 15, 2024

The weird part is that the messages come from the log library and the messages are run via log::info and not log::error, it might be a weird behavior with the Rust log crate.

It's not really a big issue, but a quirk that python or other language users may want to take note when they call ezkl.

from ezkl.

alexander-camuto avatar alexander-camuto commented on June 15, 2024

Thanks so much for the detailed script for replication. Remedied this in #153. Let me know if that helps. env_logger by default directs to STDERR rather than STDOUT -- had to override the defaults for logging.

from ezkl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.