-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial node changes * chat * chat demo, docs and workflow * fix build * fix test * update test * fix test * test * fix test * update test * fix windows * fix * update * revert * fix test * fix doc * fix doc * Rev * rev * FIx * update demo * fix * build first * node release
- Loading branch information
Showing
33 changed files
with
7,205 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Node.js Demos | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'demo/nodejs/**' | ||
- '!demo/nodejs/README.md' | ||
- 'lib/node/**' | ||
- '.github/workflows/nodejs-demos.yml' | ||
|
||
pull_request: | ||
branches: [ main, 'v[0-9]+.[0-9]+' ] | ||
paths: | ||
- 'demo/nodejs/**' | ||
- '!demo/nodejs/README.md' | ||
- 'lib/node/**' | ||
- '.github/workflows/nodejs-demos.yml' | ||
|
||
defaults: | ||
run: | ||
working-directory: demo/nodejs | ||
|
||
jobs: | ||
build-self-hosted: | ||
runs-on: ${{ matrix.machine }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
xpu: [ cpu ] | ||
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows ] | ||
include: | ||
- xpu: gpu | ||
machine: pv-linux | ||
- xpu: gpu | ||
machine: pv-windows | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
#### Remove after release #### | ||
|
||
- name: Build Node.js binding | ||
run: yarn install && yarn build | ||
working-directory: binding/nodejs | ||
|
||
#### | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Download resource files | ||
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/latest/phi2-290.pllm -o phi2-290.pllm | ||
|
||
- name: Test | ||
run: yarn completion --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --model_path phi2-290.pllm --completion_token_limit 10 --prompt "Hello my name is" --device ${{matrix.xpu}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Node.js | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/nodejs.yml' | ||
- 'binding/nodejs/**' | ||
- '!binding/nodejs/README.md' | ||
- 'lib/node/**' | ||
- 'resources/.test/**' | ||
|
||
pull_request: | ||
branches: [ main, 'v[0-9]+.[0-9]+' ] | ||
paths: | ||
- '.github/workflows/nodejs.yml' | ||
- 'binding/nodejs/**' | ||
- '!binding/nodejs/README.md' | ||
- 'lib/node/**' | ||
- 'resources/.test/**' | ||
|
||
defaults: | ||
run: | ||
working-directory: binding/nodejs | ||
|
||
jobs: | ||
build-self-hosted: | ||
runs-on: ${{ matrix.machine }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
xpu: [ cpu ] | ||
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows ] | ||
include: | ||
- xpu: gpu | ||
machine: pv-linux | ||
- xpu: gpu | ||
machine: pv-windows | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Download resource files | ||
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.pllm/latest/phi2-290.pllm -o test/phi2-290.pllm | ||
|
||
- name: Test | ||
run: yarn test test/index.test.ts --access_key=${{secrets.PV_VALID_ACCESS_KEY}} --device=${{matrix.xpu}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
dist | ||
lib | ||
resources | ||
.eslintrc.js |
Oops, something went wrong.