Skip to content

Commit

Permalink
Remove references to ONNX
Browse files Browse the repository at this point in the history
  • Loading branch information
abb128 committed Jan 27, 2025
1 parent cd6b9e0 commit 662b336
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 58 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/main.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@ jobs:
with:
packages: build-essential cmake wget tar

- if: matrix.os == 'ubuntu-20.04'
name: Download ONNXRuntime (Linux)
shell: bash
working-directory: ${{github.workspace}}
run: ./download_onnx_linux_x64.sh

- if: matrix.os == 'windows-latest'
name: Download ONNXRuntime (Windows)
shell: bash
working-directory: ${{github.workspace}}
run: ./download_onnx_windows_x64.sh

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

Expand Down Expand Up @@ -90,13 +78,6 @@ jobs:
name: libaprilasr.dll
path: ${{github.workspace}}/build/Release/libaprilasr.dll

- if: matrix.os == 'windows-latest'
name: Upload onnxruntime.dll
uses: actions/[email protected]
with:
name: onnxruntime.dll
path: ${{github.workspace}}/lib/lib/onnxruntime.dll

- if: matrix.os == 'windows-latest'
name: Upload Python wheel (Windows)
uses: actions/[email protected]
Expand All @@ -111,13 +92,6 @@ jobs:
name: libaprilasr.so
path: ${{github.workspace}}/build/libaprilasr.so

- if: matrix.os == 'ubuntu-20.04'
name: Upload libonnxruntime.so
uses: actions/[email protected]
with:
name: libonnxruntime.so
path: ${{github.workspace}}/lib/lib/libonnxruntime.so

- if: matrix.os == 'ubuntu-20.04'
name: Upload Python wheel (Linux)
uses: actions/[email protected]
Expand Down Expand Up @@ -147,24 +121,12 @@ jobs:
name: libaprilasr.so
path: ${{github.workspace}}/bindings/csharp/nuget/build/lib/linux-x64/

- name: Download Linux onnxruntime
uses: actions/download-artifact@master
with:
name: libonnxruntime.so
path: ${{github.workspace}}/bindings/csharp/nuget/build/lib/linux-x64/

- name: Download Windows aprilasr
uses: actions/download-artifact@master
with:
name: libaprilasr.dll
path: ${{github.workspace}}/bindings/csharp/nuget/build/lib/win-x64/

- name: Download Windows onnxruntime
uses: actions/download-artifact@master
with:
name: onnxruntime.dll
path: ${{github.workspace}}/bindings/csharp/nuget/build/lib/win-x64/

- name: Display structure of downloaded files
run: ls -R
working-directory: ${{github.workspace}}/bindings/csharp/nuget/build/lib
Expand Down
6 changes: 0 additions & 6 deletions april-docs/src/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,3 @@ For example, the text `"THAT'S COOL ELEPHANTS"` may be represented as tokens lik
* Simply concatenating these strings will give you the correct `" THAT'S COOL ELEPHANTS"`, but with an extra space at the beginning. You may want to strip the final string to avoid the extra space.

Tokens contain more data than just the string however. They also contain the log probability, and a boolean denoting whether or not it's a word boundary. In English, the word boundary value is equivalent to checking if the first character is a space.

## Dependencies

AprilASR depends on ONNXRuntime for ML inference. You will need both libraries for it to work:
* Linux: `libaprilasr.so` and `libonnxruntime.so`
* Windows: `libaprilasr.dll` and `onnxruntime.dll`
2 changes: 1 addition & 1 deletion bindings/csharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Open Developer PowerShell for VS 2022 and cd into the nuget directory. Run `.\bu

Make sure you've built libaprilasr.so.

If you've done a build with onnxruntime statically linked to libaprilasr.so, run `./build.sh -s`. Otherwise, run `./build.sh`
Run `./build.sh`


## Example
Expand Down
1 change: 0 additions & 1 deletion bindings/csharp/nuget/build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cp ..\..\..\build\Release\libaprilasr.dll .\build\lib\win-x64\
cp ..\..\..\lib\lib\onnxruntime.dll .\build\lib\win-x64\
csc /t:library /out:lib/netstandard2.0/AprilAsr.dll src/*.cs
nuget pack
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ private static void unpackDll(File targetDir, String lib) throws IOException {
File tmpFile = Native.extractFromResourcePath("/win32-x86-64/empty", AprilAsrNative.class.getClassLoader());
File tmpDir = tmpFile.getParentFile();
new File(tmpDir, tmpFile.getName() + ".x").createNewFile();

// Now unpack dependencies
unpackDll(tmpDir, "onnxruntime");
} catch (IOException e) {
// Nothing for now, it will fail on next step
} finally {
Expand Down
9 changes: 0 additions & 9 deletions bindings/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,13 @@
PRECOMP_LIBS = [
"libaprilasr.so",
"Release/libaprilasr.dll",
"../lib/lib/libonnxruntime.so",
"../lib/lib/onnxruntime.dll"
]

for l in PRECOMP_LIBS:
for lib in glob.glob(os.path.join(april_build, l)):
print("Adding library", lib)
shutil.copy(lib, "april_asr")

# Ensure has the correct suffix (e.g. libonnxruntime.so.1.13.1)
for lib in glob.glob("../lib/lib/libonnxruntime.so.*"):
shutil.move(
"april_asr/libonnxruntime.so",
"april_asr/libonnxruntime.so" + lib.split("libonnxruntime.so")[1]
)

# Create OS-dependent, but Python-independent wheels.
try:
from wheel.bdist_wheel import bdist_wheel
Expand Down

0 comments on commit 662b336

Please sign in to comment.