evalsuite 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/evalsuite.d.ts CHANGED
@@ -3,7 +3,9 @@
3
3
 
4
4
  /**
5
5
  * Computes a metric on a plain JS object of arguments and returns the result object
6
- * (`{ metric, value }` or `{ metric, values }`); throws an `Error` with EvalSuite's message.
6
+ * (`{ metric, value }` or `{ metric, values }`); throws an `Error` with EvalSuite's message. Undefined or
7
+ * infinite results come back as `NaN` / `Infinity` (in `evaluateJson`'s text, as the strings "NaN",
8
+ * "Infinity" and "-Infinity", since JSON has no such numbers).
7
9
  */
8
10
  export function evaluate(metric: string, args: any): any;
9
11
 
package/evalsuite.js CHANGED
@@ -1,8 +1,11 @@
1
1
  /* @ts-self-types="./evalsuite.d.ts" */
2
+ const { parseResult } = require(String.raw`./snippets/evalsuite-wasm-0435a94792d1244d/inline0.js`);
2
3
 
3
4
  /**
4
5
  * Computes a metric on a plain JS object of arguments and returns the result object
5
- * (`{ metric, value }` or `{ metric, values }`); throws an `Error` with EvalSuite's message.
6
+ * (`{ metric, value }` or `{ metric, values }`); throws an `Error` with EvalSuite's message. Undefined or
7
+ * infinite results come back as `NaN` / `Infinity` (in `evaluateJson`'s text, as the strings "NaN",
8
+ * "Infinity" and "-Infinity", since JSON has no such numbers).
6
9
  * @param {string} metric
7
10
  * @param {any} args
8
11
  * @returns {any}
@@ -128,8 +131,8 @@ function __wbg_get_imports() {
128
131
  __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
129
132
  throw new Error(getStringFromWasm0(arg0, arg1));
130
133
  },
131
- __wbg_parse_c3f72b5a24f83c01: function() { return handleError(function (arg0, arg1) {
132
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
134
+ __wbg_parseResult_cadb6f2b549ee4e6: function() { return handleError(function (arg0, arg1) {
135
+ const ret = parseResult(getStringFromWasm0(arg0, arg1));
133
136
  return ret;
134
137
  }, arguments); },
135
138
  __wbg_stringify_0a0fbf2ef722380a: function() { return handleError(function (arg0) {
package/evalsuite_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evalsuite",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Evaluation metrics (classification, regression, text, drift) from the EvalSuite Rust engine, for Node and the browser via WebAssembly.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": "Manoj Kumar C S <cs.manojkumar18@gmail.com>",
@@ -3,7 +3,9 @@
3
3
 
4
4
  /**
5
5
  * Computes a metric on a plain JS object of arguments and returns the result object
6
- * (`{ metric, value }` or `{ metric, values }`); throws an `Error` with EvalSuite's message.
6
+ * (`{ metric, value }` or `{ metric, values }`); throws an `Error` with EvalSuite's message. Undefined or
7
+ * infinite results come back as `NaN` / `Infinity` (in `evaluateJson`'s text, as the strings "NaN",
8
+ * "Infinity" and "-Infinity", since JSON has no such numbers).
7
9
  */
8
10
  export function evaluate(metric: string, args: any): any;
9
11
 
package/web/evalsuite.js CHANGED
@@ -1,8 +1,12 @@
1
1
  /* @ts-self-types="./evalsuite.d.ts" */
2
+ import { parseResult } from './snippets/evalsuite-wasm-0435a94792d1244d/inline0.js';
3
+
2
4
 
3
5
  /**
4
6
  * Computes a metric on a plain JS object of arguments and returns the result object
5
- * (`{ metric, value }` or `{ metric, values }`); throws an `Error` with EvalSuite's message.
7
+ * (`{ metric, value }` or `{ metric, values }`); throws an `Error` with EvalSuite's message. Undefined or
8
+ * infinite results come back as `NaN` / `Infinity` (in `evaluateJson`'s text, as the strings "NaN",
9
+ * "Infinity" and "-Infinity", since JSON has no such numbers).
6
10
  * @param {string} metric
7
11
  * @param {any} args
8
12
  * @returns {any}
@@ -124,8 +128,8 @@ function __wbg_get_imports() {
124
128
  __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
125
129
  throw new Error(getStringFromWasm0(arg0, arg1));
126
130
  },
127
- __wbg_parse_c3f72b5a24f83c01: function() { return handleError(function (arg0, arg1) {
128
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
131
+ __wbg_parseResult_cadb6f2b549ee4e6: function() { return handleError(function (arg0, arg1) {
132
+ const ret = parseResult(getStringFromWasm0(arg0, arg1));
129
133
  return ret;
130
134
  }, arguments); },
131
135
  __wbg_stringify_0a0fbf2ef722380a: function() { return handleError(function (arg0) {
Binary file