Socket
Socket
Sign inDemoInstall

@iai-skunks/ml-registry-solana

Package Overview
Dependencies
54
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.3.0

2

dist/states.d.ts

@@ -20,2 +20,3 @@ /// <reference types="node" />

seeds: string;
counter: number;
data: Buffer | undefined;

@@ -27,2 +28,3 @@ constructor(props: {

seeds: string;
counter: number;
});

@@ -29,0 +31,0 @@ get coeffs(): number[];

@@ -49,2 +49,3 @@ "use strict";

this.seeds = props.seeds;
this.counter = props.counter;
}

@@ -81,2 +82,3 @@ get coeffs() {

["seedsStr", "String"],
["counter", "u64"],
],

@@ -83,0 +85,0 @@ },

2

package.json
{
"name": "@iai-skunks/ml-registry-solana",
"version": "0.2.0",
"version": "0.3.0",
"description": "SPL ML Model Registry/Inference JavaScript API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# Machine Learning Model Registry Service JavaScript bindings
![npm](https://img.shields.io/npm/l/@iai-skunks/ml-registry-solana)
![npm (scoped)](https://img.shields.io/npm/v/@iai-skunks/ml-registry-solana)
![NPM](https://img.shields.io/npm/l/@iai-skunks/ml-registry-solana)

@@ -4,0 +4,0 @@

@@ -17,2 +17,6 @@ ## v0.1.4

- initial release of library
- basic bindings to create models and use them for prediction
- basic bindings to create models and use them for prediction
## v0.2.0
- added finding for model parameters
- updated the type for coeffs, intercept to string type for storage

@@ -53,2 +53,3 @@ import { Connection, PublicKey } from "@solana/web3.js";

seeds: string;
counter: number;
data: Buffer | undefined;

@@ -61,2 +62,3 @@

seeds: string;
counter: number;
}) {

@@ -67,2 +69,3 @@ this.coeffsStr = props.coeffsStr;

this.seeds = props.seeds;
this.counter = props.counter;
}

@@ -88,2 +91,3 @@

["seedsStr", "String"],
["counter", "u64"],
],

@@ -90,0 +94,0 @@ },

@@ -21,2 +21,3 @@ import path from "path";

let scoreAccountName: string;
let modelKeyCopy: PublicKey;

@@ -92,2 +93,3 @@ const PROGRAM_PATH = path.resolve(__dirname, "../../program/dist/program");

);
modelKeyCopy = modelAccountPubkey;
console.log(`PDA for model account id: ${modelAccountPubkey.toBase58()}`);

@@ -105,2 +107,3 @@

console.log(`Model intercept: ${modelState.intercept}`);
console.log(`Model counter: ${modelState.counter}`);
}

@@ -137,2 +140,6 @@

console.log(`Final prediction: ${scoreState.predStr}`);
// query model counter
const modelState = await ModelState.retrieve(connection, modelKeyCopy);
console.log(`Model counter: ${modelState.counter}`);
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc