Skip to content

Commit

Permalink
Link to custom bundle binary directly in e2e tests (#4024)
Browse files Browse the repository at this point in the history
INTERNAL
  • Loading branch information
tafsiri authored Oct 6, 2020
1 parent 7bec2d5 commit bbe97ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e/custom_bundle/blazeface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"make-custom-tfjs-modules": "npx --no-install tfjs-custom-bundle --config app_tfjs_config.json",
"make-custom-tfjs-modules": "node ./node_modules/@tensorflow/tfjs/dist/tools/custom_bundle/cli.js --config app_tfjs_config.json",
"rollup:full": "rollup -c",
"rollup:custom": "rollup -c --useCustomTfjs",
"webpack:full": "webpack",
Expand Down
7 changes: 5 additions & 2 deletions e2e/script_tag_tests/symbols_and_basic_api_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ describe('tfjs union sub-packages', () => {
});
});

describe('ops', async () => {
await tf.setBackend('cpu');
describe('ops', () => {

beforeAll(async() => {
await tf.setBackend('cpu');
});

it('should support basic math', () => {
tf.tidy(() => {
const a = tf.scalar(3);
Expand Down
3 changes: 3 additions & 0 deletions e2e/scripts/run-custom-builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ e2e_root_path=$PWD

cd custom_bundle/blazeface
yarn
# Ensure that we test agaisnt freshly generated custom modules.
rm -f ./custom_tfjs_blazeface/*.js
echo "npm version $(npm --version)"
yarn make-custom-tfjs-modules
# TODO(yassogba) once blazeface kernels are modularized in cpu
# switch the config to cpu and also run and test rollup bundle.
Expand Down

0 comments on commit bbe97ef

Please sign in to comment.