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 5
5
"description" : " This example is a demonstration of basic usage of InferenceSession." ,
6
6
"main" : " index.js" ,
7
7
"dependencies" : {
8
- "onnxruntime-node" : " ^1.15.1 "
8
+ "onnxruntime-node" : " ^1.23.0 "
9
9
}
10
10
}
Original file line number Diff line number Diff line change 4
4
"version" : " 1.0.0" ,
5
5
"description" : " This example is a demonstration of basic usage of Tensor." ,
6
6
"dependencies" : {
7
- "onnxruntime-node" : " ^1.15.1 "
7
+ "onnxruntime-node" : " ^1.23.0 "
8
8
}
9
9
}
Original file line number Diff line number Diff line change 8
8
"dev" : " webpack --config ./webpack.config.js --mode development"
9
9
},
10
10
"dependencies" : {
11
- "onnxruntime-node" : " ^1.15.1 "
11
+ "onnxruntime-node" : " ^1.23.0 "
12
12
},
13
13
"devDependencies" : {
14
14
"copy-webpack-plugin" : " ^8.1.1" ,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ async function main() {
29
29
const dataC = results . c . data ;
30
30
console . log ( `data of result tensor 'c': ${ dataC } ` ) ;
31
31
32
+ await session . release ( )
32
33
} catch ( e ) {
33
34
console . error ( `failed to inference ONNX model: ${ e } .` ) ;
34
35
}
Original file line number Diff line number Diff line change 5
5
"description" : " This example is a demonstration of basic usage of ONNX Runtime Node.js binding." ,
6
6
"main" : " index.js" ,
7
7
"dependencies" : {
8
- "onnxruntime-node" : " ^1.15.1 "
8
+ "onnxruntime-node" : " ^1.23.0 "
9
9
}
10
10
}
You can’t perform that action at this time.
0 commit comments