File tree Expand file tree Collapse file tree 6 files changed +41
-4
lines changed
api-usage_inference-session
quick-start_onnxruntime-node-bundler
quick-start_onnxruntime-node Expand file tree Collapse file tree 6 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Node.js CI
2+ permissions :
3+ contents : read
4+
5+ on :
6+ push :
7+ branches : [ main ]
8+ pull_request :
9+ branches : [ main ]
10+
11+ jobs :
12+ build :
13+ runs-on : ${{ matrix.os }}
14+ strategy :
15+ matrix :
16+ os : [ubuntu-latest, windows-latest, macos-latest]
17+ # Test against multiple Node.js versions
18+ node-version : [20.x, 22.x, 24.x]
19+ arch : [x64]
20+ include :
21+ - os : ubuntu-latest
22+ arch : arm64
23+ steps :
24+ - uses : actions/checkout@v5
25+ - name : Use Node.js ${{ matrix.node-version }} on ${{ matrix.arch }}
26+ uses : actions/setup-node@v5
27+ with :
28+ node-version : ${{ matrix.node-version }}
29+ architecture : ${{ matrix.arch }}
30+ - name : Install dependencies
31+ run : npm install
32+ working-directory : js/quick-start_onnxruntime-node
33+
34+ - name : Run the example
35+ run : node .
36+ working-directory : js/quick-start_onnxruntime-node
Original file line number Diff line number Diff line change 55 "description" : " This example is a demonstration of basic usage of InferenceSession." ,
66 "main" : " index.js" ,
77 "dependencies" : {
8- "onnxruntime-node" : " ^1.15.1 "
8+ "onnxruntime-node" : " ^1.23.0 "
99 }
1010}
Original file line number Diff line number Diff line change 44 "version" : " 1.0.0" ,
55 "description" : " This example is a demonstration of basic usage of Tensor." ,
66 "dependencies" : {
7- "onnxruntime-node" : " ^1.15.1 "
7+ "onnxruntime-node" : " ^1.23.0 "
88 }
99}
Original file line number Diff line number Diff line change 88 "dev" : " webpack --config ./webpack.config.js --mode development"
99 },
1010 "dependencies" : {
11- "onnxruntime-node" : " ^1.15.1 "
11+ "onnxruntime-node" : " ^1.23.0 "
1212 },
1313 "devDependencies" : {
1414 "copy-webpack-plugin" : " ^8.1.1" ,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ async function main() {
2929 const dataC = results . c . data ;
3030 console . log ( `data of result tensor 'c': ${ dataC } ` ) ;
3131
32+ await session . release ( )
3233 } catch ( e ) {
3334 console . error ( `failed to inference ONNX model: ${ e } .` ) ;
3435 }
Original file line number Diff line number Diff line change 55 "description" : " This example is a demonstration of basic usage of ONNX Runtime Node.js binding." ,
66 "main" : " index.js" ,
77 "dependencies" : {
8- "onnxruntime-node" : " ^1.15.1 "
8+ "onnxruntime-node" : " ^1.23.0 "
99 }
1010}
You can’t perform that action at this time.
0 commit comments