Skip to content

Latest commit

 

History

History
20 lines (10 loc) · 1.56 KB

README.md

File metadata and controls

20 lines (10 loc) · 1.56 KB

Demo: https://josephrocca.github.io/onnxscript-editor/demo

A prototype to code up an ONNX model with ONNX Script while visualising your edits live with Netron. It runs completely in the browser - no server involved. This is thanks to Pyodide - a Python runtime compiled to wasm.

The onnxscript package is pure Python so it was easy to get working (just clone repo, install pyodide-build with pip, and then run pyodide build). Building onnx was a bit harder since it has C++ code. The build process for onnx is detailed here.

quick_demo.mp4

Changes made to Netron

A few things hackily changed to get this prototype working:

  • Replace these lines with resolve() to remove telemetry stuff.
  • Add this if(!window.___iframeExports) window.___iframeExports = {}; window.___iframeExports.open = this._open.bind(this); here.
  • Remove this line and this line - otherwise netron steals focus every time a model is visualised.
  • Remove this line.