npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@alwaysai/model-configuration-schemas

v0.11.2

Published

alwaysAI schemas for model configurations

Downloads

707

Readme

Overview

The interfaces for each model configuration can be found in src/model_params/. The schemas are located in src/schemas/ and are written in json-schema format using draft 2019-09. The schemas are imported into model.ts where the overall JSONSchemaType as well as the validation methods & sub-types are created. Validation methods are used to type-guard each of the model configurations, while the interfaces are used to type-guard at development time. This repository is configured as an npm package -- while under local development you can use npm install --save along with the path to this repo to use it with the device agent. Additionally, the schemas are also used in model.py to create validation function for use in python.

To Create New Schemas and Validation Methods

  1. Add a new model config's subschema to src/schemas/modelParameters.json or create a new .json subschema file.
  2. Add a new model config's interface to src/model_params/modelParameters.ts or create a new .ts interface file. ** Note: If you create new files instead of appending modelParameters.*, make sure to reference the new files in both modelParameters.* **
  3. Import and add the new subschemas to jschon in model.py, and subschemas and interfaces to ajv in model.ts.
  4. Add new tests to tests/model.test.ts that reflect changes you've made.
  5. Generate python package to be included in edgeIQ by running npm run build:python. Copy these files to <edgeiq_root>/edgeiq/model_config and <edgeiq_root/tools/build-trt-model/model_config.
  6. After release, update the CLI with the latest model schema version.

More notes on the development of this repo can be found here: https://alwaysai.atlassian.net/l/c/RdjVyG1d

To Run Tests

Run npm run test:unit to run the types.test.ts file. You can add valid and invalid data structures to new instances of the test cases. They're divided in correct and incorrect structures and validated against the schemas.

Release Process

NOTE: Ensure unit tests are passing and new functionality is verified prior to release!

Release procedure

To release the package to npmjs.org follow the steps:

  • publish new version: npm run publish:<major|minor|patch>
  • watch the bitbucket pipeline running, if successful a new version will be created and published to npmjs.org
  • to get the auto-generated commit and tags, simply pull: git pull

Pipeline is linting, unit testing and building package on:

  • [x] Node.js: 16.x, 18.x, 20.x