onnxruntime-node 1.14.0-dev.20221124-4ca62b9ee8 → 1.14.0
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/bin/napi-v3/darwin/arm64/libonnxruntime.1.14.0.dylib +0 -0
- package/bin/napi-v3/darwin/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/darwin/x64/libonnxruntime.1.14.0.dylib +0 -0
- package/bin/napi-v3/darwin/x64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/linux/arm64/libonnxruntime.so.1.14.0 +0 -0
- package/bin/napi-v3/linux/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/linux/x64/libonnxruntime.so.1.14.0 +0 -0
- package/bin/napi-v3/linux/x64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/win32/arm64/onnxruntime.dll +0 -0
- package/bin/napi-v3/win32/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/win32/arm64/onnxruntime_providers_shared.dll +0 -0
- package/bin/napi-v3/win32/x64/onnxruntime.dll +0 -0
- package/bin/napi-v3/win32/x64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/win32/x64/onnxruntime_providers_shared.dll +0 -0
- package/dist/backend.js +18 -20
- package/dist/backend.js.map +1 -1
- package/dist/binding.d.ts +5 -5
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/__commit.txt +0 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/backend.js
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver,
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return value;
|
|
4
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
5
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
6
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
7
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
10
9
|
};
|
|
11
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver,
|
|
12
|
-
if (!
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return privateMap.get(receiver);
|
|
10
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
12
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16
14
|
};
|
|
17
|
-
var
|
|
15
|
+
var _OnnxruntimeSessionHandler_inferenceSession;
|
|
18
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
17
|
exports.onnxruntimeBackend = void 0;
|
|
20
18
|
const binding_1 = require("./binding");
|
|
21
19
|
class OnnxruntimeSessionHandler {
|
|
22
20
|
constructor(pathOrBuffer, options) {
|
|
23
|
-
|
|
24
|
-
__classPrivateFieldSet(this,
|
|
21
|
+
_OnnxruntimeSessionHandler_inferenceSession.set(this, void 0);
|
|
22
|
+
__classPrivateFieldSet(this, _OnnxruntimeSessionHandler_inferenceSession, new binding_1.binding.InferenceSession(), "f");
|
|
25
23
|
if (typeof pathOrBuffer === 'string') {
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
24
|
+
__classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer, options);
|
|
27
25
|
}
|
|
28
26
|
else {
|
|
29
|
-
__classPrivateFieldGet(this,
|
|
27
|
+
__classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer.buffer, pathOrBuffer.byteOffset, pathOrBuffer.byteLength, options);
|
|
30
28
|
}
|
|
31
|
-
this.inputNames = __classPrivateFieldGet(this,
|
|
32
|
-
this.outputNames = __classPrivateFieldGet(this,
|
|
29
|
+
this.inputNames = __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").inputNames;
|
|
30
|
+
this.outputNames = __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").outputNames;
|
|
33
31
|
}
|
|
34
32
|
async dispose() {
|
|
35
33
|
return Promise.resolve();
|
|
@@ -44,7 +42,7 @@ class OnnxruntimeSessionHandler {
|
|
|
44
42
|
return new Promise((resolve, reject) => {
|
|
45
43
|
process.nextTick(() => {
|
|
46
44
|
try {
|
|
47
|
-
resolve(__classPrivateFieldGet(this,
|
|
45
|
+
resolve(__classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").run(feeds, fetches, options));
|
|
48
46
|
}
|
|
49
47
|
catch (e) {
|
|
50
48
|
// reject if any error is thrown
|
|
@@ -54,7 +52,7 @@ class OnnxruntimeSessionHandler {
|
|
|
54
52
|
});
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
|
-
|
|
55
|
+
_OnnxruntimeSessionHandler_inferenceSession = new WeakMap();
|
|
58
56
|
class OnnxruntimeBackend {
|
|
59
57
|
async init() {
|
|
60
58
|
return Promise.resolve();
|
package/dist/backend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../lib/backend.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V,gCAAgC;oBAChC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACX;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;;AAED,MAAM,kBAAkB;IACtB,KAAK,CAAC,IAAI;QACR,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,YAA+B,EAAE,OAAyC;QAEnG,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;gBACpB,IAAI;oBACF,OAAO,CAAC,IAAI,yBAAyB,CAAC,YAAY,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;iBACrE;gBAAC,OAAO,CAAC,EAAE;oBACV,gCAAgC;oBAChC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACX;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAEY,QAAA,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
|
package/dist/binding.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { InferenceSession, OnnxValue } from 'onnxruntime-common';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type SessionOptions = InferenceSession.SessionOptions;
|
|
3
|
+
type FeedsType = {
|
|
4
4
|
[name: string]: OnnxValue;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type FetchesType = {
|
|
7
7
|
[name: string]: OnnxValue | null;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type ReturnType = {
|
|
10
10
|
[name: string]: OnnxValue;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type RunOptions = InferenceSession.RunOptions;
|
|
13
13
|
/**
|
|
14
14
|
* Binding exports a simple synchronized inference session object wrap.
|
|
15
15
|
*/
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
5
|
if (k2 === undefined) k2 = k;
|
|
6
|
-
Object.
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
7
11
|
}) : (function(o, m, k, k2) {
|
|
8
12
|
if (k2 === undefined) k2 = k;
|
|
9
13
|
o[k2] = m[k];
|
|
@@ -15,5 +19,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
19
|
__exportStar(require("onnxruntime-common"), exports);
|
|
16
20
|
const onnxruntime_common_1 = require("onnxruntime-common");
|
|
17
21
|
const backend_1 = require("./backend");
|
|
18
|
-
onnxruntime_common_1.registerBackend('cpu', backend_1.onnxruntimeBackend, 100);
|
|
22
|
+
(0, onnxruntime_common_1.registerBackend)('cpu', backend_1.onnxruntimeBackend, 100);
|
|
19
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;;;;;;;;;;;;;;AAElC,qDAAmC;AACnC,2DAAmD;AACnD,uCAA6C;AAE7C,IAAA,oCAAe,EAAC,KAAK,EAAE,4BAAkB,EAAE,GAAG,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
3
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
"version": "1.14.0
|
|
16
|
+
"version": "1.14.0",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"onnxruntime-common": "~1.
|
|
18
|
+
"onnxruntime-common": "~1.14.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"buildr": "tsc && node ./script/build --config=RelWithDebInfo",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"cmake-js": "^6.2.1",
|
|
42
42
|
"fs-extra": "^9.1.0",
|
|
43
43
|
"jsonc": "^2.0.0",
|
|
44
|
-
"minimist": "^1.2.
|
|
45
|
-
"mocha": "^
|
|
44
|
+
"minimist": "^1.2.7",
|
|
45
|
+
"mocha": "^10.2.0",
|
|
46
46
|
"node-addon-api": "^3.1.0",
|
|
47
47
|
"onnx-proto": "^4.0.4",
|
|
48
|
-
"typescript": "^4.
|
|
48
|
+
"typescript": "^4.9.4"
|
|
49
49
|
},
|
|
50
50
|
"main": "dist/index.js",
|
|
51
51
|
"os": [
|
package/__commit.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4ca62b9ee827d243d1b1356126a033cf8710b25a
|