Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fs-eire/opt-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
fs-eire committed Nov 18, 2023
2 parents 9f1efea + 9364c05 commit 1e2ccca
Show file tree
Hide file tree
Showing 69 changed files with 10,435 additions and 16,637 deletions.
13 changes: 0 additions & 13 deletions cmake/onnxruntime_python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ configure_file(${ONNXRUNTIME_ROOT}/python/_pybind_state.py.in
${CMAKE_BINARY_DIR}/onnxruntime/capi/_pybind_state.py)

if (onnxruntime_ENABLE_TRAINING)
file(GLOB onnxruntime_python_capi_training_srcs CONFIGURE_DEPENDS
"${ORTTRAINING_SOURCE_DIR}/python/deprecated/*.py"
)
file(GLOB onnxruntime_python_root_srcs CONFIGURE_DEPENDS
"${ORTTRAINING_SOURCE_DIR}/python/training/*.py"
)
Expand Down Expand Up @@ -419,10 +416,6 @@ if (onnxruntime_ENABLE_TRAINING)
"${ORTTRAINING_SOURCE_DIR}/python/training/onnxblock/optim/*"
)
endif()
else()
file(GLOB onnxruntime_python_capi_training_srcs CONFIGURE_DEPENDS
"${ONNXRUNTIME_ROOT}/python/training/*.py"
)
endif()

if (onnxruntime_BUILD_UNIT_TESTS)
Expand Down Expand Up @@ -577,9 +570,6 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_BINARY_DIR}/onnxruntime/capi/_pybind_state.py
$<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/capi/
COMMAND ${CMAKE_COMMAND} -E copy
${onnxruntime_python_capi_training_srcs}
$<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/capi/training/
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:onnxruntime_pybind11_state>
$<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/capi/
Expand Down Expand Up @@ -750,9 +740,6 @@ if (onnxruntime_ENABLE_TRAINING)
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/training/utils
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/training/utils/data/
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/training/utils/hooks/
COMMAND ${CMAKE_COMMAND} -E copy
${onnxruntime_python_capi_training_srcs}
$<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/capi/training/
COMMAND ${CMAKE_COMMAND} -E copy
${onnxruntime_python_root_srcs}
$<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/training/
Expand Down
79 changes: 23 additions & 56 deletions js/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion js/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"scripts": {
"buildr": "tsc && node ./script/build --config=RelWithDebInfo",
"preprepare": "node -e \"require('node:fs').copyFileSync('./node_modules/long/index.d.ts', './node_modules/long/umd/index.d.ts')\"",
"prepare": "tsc --build script test .",
"rebuild": "tsc && node ./script/build --rebuild",
"rebuildd": "tsc && node ./script/build --rebuild --config=Debug",
Expand All @@ -39,7 +40,7 @@
"jsonc": "^2.0.0",
"minimist": "^1.2.8",
"node-addon-api": "^6.0.0",
"onnx-proto": "^8.0.1"
"protobufjs": "^7.2.4"
},
"main": "dist/index.js",
"os": [
Expand Down
2 changes: 2 additions & 0 deletions js/node/test/ort-schema/protobuf/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!onnx.js
!onnx.d.ts
21 changes: 21 additions & 0 deletions js/node/test/ort-schema/protobuf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ONNX protobuf

This directory contains generated protobuf definition for onnx:

- onnx.js
- onnx.d.ts

These files are generated from [a fork of onnx-proto](https://github.com/fs-eire/onnx-proto/tree/update-v9).

The ONNX protobuf uses [email protected], which depends on [email protected], the version contains 2 bugs:

- type export does not work with commonjs. described in https://github.com/dcodeIO/long.js/pull/124. added a "postinstall" script to fix.
- in the generated typescript declaration file 'onnx.d.ts', the following line:
```ts
import Long = require("long");
```
need to be replaced to fix type import error:
```ts
import Long from "long";
```
this replacement is done and code format is also applied to file 'onnx.d.ts'.
Loading

0 comments on commit 1e2ccca

Please sign in to comment.