@iai-skunks/ml-registry-solana
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -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 @@ }, |
{ | ||
"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}`); | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
52968
1254
0