@coherentglobal/spark-execute-sdk 0.4.18 → 0.4.19
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/README.md +1 -0
- package/dist/browser.js +1 -0
- package/package.json +1 -1
- package/src/node.js +4 -2
- package/src/validate.js +1 -0
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ yarn add @coherentglobal/spark-execute-sdk
|
|
|
26
26
|
|
|
27
27
|
```js
|
|
28
28
|
const config = {
|
|
29
|
+
parallel: 1, // parallel (threads) to be used to run the model in parallel
|
|
29
30
|
sparkEndpoint: {
|
|
30
31
|
url: "https://excel.dev.coherent.global", // Spark Endpoint to be used to run model using Spark SaaS
|
|
31
32
|
tenant: "tenant", // Spark tenant name
|
package/dist/browser.js
CHANGED
package/package.json
CHANGED
package/src/node.js
CHANGED
|
@@ -8,9 +8,8 @@ const got = require("got");
|
|
|
8
8
|
const fs = require("fs");
|
|
9
9
|
const serializeObject = require("serialize-anything");
|
|
10
10
|
const path = require("path");
|
|
11
|
+
const os = require("os");
|
|
11
12
|
const { v4: uuidv4 } = require("uuid");
|
|
12
|
-
const { object } = require("joi");
|
|
13
|
-
const { P } = require("pino");
|
|
14
13
|
const findModel = require("./findModels.js");
|
|
15
14
|
|
|
16
15
|
class Spark {
|
|
@@ -47,6 +46,8 @@ class Spark {
|
|
|
47
46
|
this.config = this.validateConfig(config);
|
|
48
47
|
}
|
|
49
48
|
|
|
49
|
+
this.parallel = this.config?.parallel ?? 1;
|
|
50
|
+
|
|
50
51
|
/**
|
|
51
52
|
* @private
|
|
52
53
|
*/
|
|
@@ -301,6 +302,7 @@ class Spark {
|
|
|
301
302
|
await this._registry.append({
|
|
302
303
|
id: versionId,
|
|
303
304
|
url: model?.binary || model?.binaryPath || "",
|
|
305
|
+
size: this.parallel,
|
|
304
306
|
});
|
|
305
307
|
}
|
|
306
308
|
|