Skip to content

Add ONNX playground for graph inspection, optimization, and benchmarking#33

Merged
dchou1618 merged 2 commits into
masterfrom
feature/onnx-examples
Jun 15, 2026
Merged

Add ONNX playground for graph inspection, optimization, and benchmarking#33
dchou1618 merged 2 commits into
masterfrom
feature/onnx-examples

Conversation

@dchou1618

@dchou1618 dchou1618 commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a new onnx/ playground directory for exploring ONNX internals, graph transformations, and inference benchmarking.

This PR introduces a standalone experimental environment for:

  • exporting ONNX graphs
  • inspecting graph structure
  • benchmarking ONNX Runtime inference
  • experimenting with graph optimizations
  • understanding ONNX as an intermediate representation (IR)

The goal is to build familiarity with low-level ONNX mechanics rather than treating ONNX as a black-box export format.


Intended Structure

onnx/
├── README.md
├── requirements.txt
│
├── models/
├── scripts/

@qodo-code-review

qodo-code-review Bot commented Jun 13, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@dchou1618 dchou1618 self-assigned this Jun 13, 2026
@dchou1618 dchou1618 added the enhancement New feature or request label Jun 13, 2026
@dchou1618 dchou1618 linked an issue Jun 13, 2026 that may be closed by this pull request
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add ONNX playground scaffolding with baseline MLP model artifact
✨ Enhancement 📝 Documentation 🕐 10-20 Minutes

Grey Divider

Walkthroughs

Description
• Add a dedicated ONNX playground directory to support graph/IR exploration work.
• Document intended workflows (export, inspect, optimize, benchmark) and folder layout.
• Include a baseline ONNX MLP model artifact for initial experiments.
Diagram
graph TD
  A["Modeling/onnx"] --> B["README.md"] --> C[("mlp_baseline.onnx")]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Generate ONNX artifacts via script (don’t commit binaries)
  • ➕ Avoids repository bloat and binary diff noise
  • ➕ Ensures models are reproducible from source
  • ➕ Easier to update/export across opsets and configs
  • ➖ Adds setup friction (tooling + runtime deps) for first-time users
  • ➖ Requires maintaining export scripts and pinned versions
2. Store ONNX binaries using Git LFS
  • ➕ Keeps repo history slim while still versioning artifacts
  • ➕ Maintains convenient local checkout workflow
  • ➖ Requires Git LFS support in contributor environments and CI
  • ➖ May complicate forks/mirrors depending on hosting
3. Publish artifacts as release assets (or separate data bucket)
  • ➕ Keeps source repo clean and fast to clone
  • ➕ Can host multiple benchmark artifacts with metadata
  • ➖ More moving parts (download step, version coordination)
  • ➖ Offline workflows are less convenient

Recommendation: The directory/README scaffolding is a good fit for an experimental playground, but committing ONNX binaries can become painful as the set grows. Prefer either (a) generating models from a small export script with pinned deps, or (b) using Git LFS if you want artifacts versioned in-repo. If this PR is intentionally minimal, consider adding a follow-up plan (LFS vs generation) before adding more model files.

Grey Divider

File Changes

Enhancement (1)
mlp_baseline.onnx Add baseline ONNX MLP model artifact +0/-0

Add baseline ONNX MLP model artifact

• Introduces an ONNX model file intended as an initial baseline artifact for inspection and experimentation within the playground.

Modeling/onnx/models/mlp_baseline.onnx


Documentation (1)
README.md Document ONNX playground goals and intended directory layout +58/-0

Document ONNX playground goals and intended directory layout

• Adds a README describing the purpose of the ONNX playground, including learning objectives around graph structure, runtime behavior, and optimization effects. Documents an intended folder structure for models, benchmarks, scripts, and outputs.

Modeling/onnx/README.md


Grey Divider

Qodo Logo

@dchou1618 dchou1618 merged commit 10c4b24 into master Jun 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add examples for optimizing onnx graph for inference latency

1 participant