Skip to main content

OpenNetwork Dev Suite: JSON->Keras model builder + Playground webview

Project description

OpenNetwork (opennetwork)

A tiny developer suite for MLOps-oriented model authoring and loading. It lets you:

  • opennetwork.setmodel() — open the Playground (web view) to design your model.
  • opennetwork.getmodel("model.json") — load a JSON graph into a Keras Functional model.
  • opennetwork.init() — quickstart banner.

Default Playground: https://opensparrow.netlify.app/playground

Install

pip install opennetwork
# or, to enable building Keras models:
pip install "opennetwork[keras]"
# optional native window instead of browser:
pip install "opennetwork[webview]"

Python API

import opennetwork as onn

onn.init()
onn.setmodel()  # opens the Playground in a window/browser

# Build from JSON (returns tf.keras.Model if TensorFlow is installed)
model = onn.getmodel("model.json")

# If TensorFlow is not installed, you can still validate the graph:
model, extras = onn.getmodel("model.json", return_extras=True)
print(extras["inserted"])  # e.g., auto-added Flatten when Dense follows Conv2D

CLI

opennetwork init
opennetwork setmodel
opennetwork getmodel path/to/model.json

JSON schema (minimal)

{
  "id": "string",
  "name": "string",
  "layers": [
    {
      "id": "unique-id",
      "type": "input|conv2d|dense|flatten|dropout|maxpool2d|batchnorm|activation|softmax_output",
      "name": "optional",
      "params": { "..." : "layer-params" },
      "connections": ["next-layer-id", "..."],
      "weights": [...],  // optional
      "biases":  [...]   // optional
    }
  ]
}
  • The graph is built topologically.
  • If a Dense follows a convolutional/tensor output, a Flatten is auto-inserted (configurable).
  • softmax_output is interpreted as a final Activation("softmax").
  • Unknown or missing shapes will be handled best-effort; for guaranteed results, include an explicit Input layer with params.input_shape.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opennetwork-0.1.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opennetwork-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file opennetwork-0.1.0.tar.gz.

File metadata

  • Download URL: opennetwork-0.1.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for opennetwork-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f5607599ed325bd95cad06dfab13f0b17faf879aa0e75c042e6162a9cd918ba
MD5 f2774ae12087b3878b27b4705c72f7e6
BLAKE2b-256 919cb1c7d4e3b96fe366d905498c242a88f7a6b4898d19d94b49443c1961814b

See more details on using hashes here.

File details

Details for the file opennetwork-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: opennetwork-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for opennetwork-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 182910ab2b35f5aec840e4723a29e795eb1c8250e940717846a656c15666c3ca
MD5 ba013d5ce5bb645e65dfef4467ab704e
BLAKE2b-256 7c7475fc5220b31194bf95db65afd854a45856168c657ae835c0957d35fb4ad5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page