Skip to content

Commit 7c2ee51

Browse files
authored
[tfjs] integrate_tests: Update npm and Python dependencies (#2145)
* [tfjs] integrate_tests: Update npm and Python dependencies - Update all tfjs-* npm dependencies to 1.2.10 - Update tf-nightly version to the latest available * Upgrade to 1.2.11 * Update tfjs-node-gpu benchmark script
1 parent f06434a commit 7c2ee51

File tree

6 files changed

+60
-52
lines changed

6 files changed

+60
-52
lines changed

tfjs/integration_tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ tfjs-core/
33
tfjs-data/
44
tfjs-layers/
55
tfjs-node/
6+
tfjs-node-gpu/
67
data/
78
coverage/

tfjs/integration_tests/benchmark_layers.sh

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,35 +51,39 @@ yarn upgrade \
5151
@tensorflow/tfjs
5252

5353
if [[ "${IS_TFJS_NODE}" == "1" ]]; then
54-
rm -rf tfjs-node/
55-
cp -r ../../tfjs-node .
54+
rm -rf tfjs-node/ tfjs-node-gpu
55+
cp -r ../../tfjs-node ../../tfjs-node-gpu .
56+
57+
if [[ "${IS_TFJS_NODE_GPU}" == "1" ]]; then
58+
pushd tfjs-node-gpu
59+
else
60+
# The Python library for comparison may contain both the CPU and GPU
61+
# kernels. The line below prevent the GPU from being used during CPU
62+
# benchmarks.
63+
export CUDA_VISIBLE_DEVICES=""
64+
pushd tfjs-node
65+
fi
5666

57-
pushd tfjs-node
5867
HASH_NODE="$(git rev-parse HEAD)"
5968
rm -rf dist/
6069
yarn
6170
rm -f tensorflow-tfjs-*.tgz
6271

63-
if [[ "${IS_TFJS_NODE_GPU}" == "1" ]]; then
64-
yarn build-npm-gpu
65-
TAR_BALL="$(find ./ -name "tensorflow-tfjs-node-gpu-*.tgz")"
66-
else
67-
yarn build-npm
68-
TAR_BALL="$(find ./ -name "tensorflow-tfjs-node-*.tgz")"
69-
fi
72+
yarn build-npm
7073

71-
TAR_BALL_COUNT="$(ls tensorflow-tfjs-*.tgz | wc -w)"
74+
TAR_BALL_COUNT="$(ls tensorflow-tfjs-node-*.tgz | wc -w)"
7275
if [[ "${TAR_BALL_COUNT}" != "1" ]]; then
7376
echo "ERROR: Expected to find exactly one tensorflow-tfjs-node-* tar ball"
7477
echo " But found ${TAR_BALL_COUNT}."
7578
exit 1
7679
fi
7780

81+
TAR_BALL="$(find ./ -name "tensorflow-tfjs-node-*.tgz")"
7882
if [[ -z "${TAR_BALL}" ]]; then
7983
echo "Unable to find the tar ball built by `yarn build-npm`."
8084
exit 1
8185
fi
82-
echo "Find built tar ball at: ${TAR_BALL}"
86+
echo "Found built tar ball at: ${TAR_BALL}"
8387

8488
rm -rf ../node_modules/@tensorflow/tfjs-node/*
8589
tar xvzf "${TAR_BALL}" --directory ../node_modules/@tensorflow/tfjs-node
@@ -95,6 +99,9 @@ if [[ "${IS_TFJS_NODE}" == "1" ]]; then
9599
popd
96100
popd
97101
else
102+
# NOTE: Browser benchmarks are compared with Python CPU.
103+
export CUDA_VISIBLE_DEVICES=""
104+
98105
# Copy the tfjs repositories, build them, and link them.
99106
rm -rf tfjs-core/
100107
cp -r ../../tfjs-core .

tfjs/integration_tests/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"url": "https://github.com/tensorflow/tfjs"
99
},
1010
"devDependencies": {
11-
"@tensorflow/tfjs": "1.2.9",
12-
"@tensorflow/tfjs-converter": "1.2.9",
13-
"@tensorflow/tfjs-core": "1.2.9",
14-
"@tensorflow/tfjs-data": "1.2.9",
15-
"@tensorflow/tfjs-layers": "1.2.9",
16-
"@tensorflow/tfjs-node": "1.2.9",
11+
"@tensorflow/tfjs": "1.2.11",
12+
"@tensorflow/tfjs-converter": "1.2.11",
13+
"@tensorflow/tfjs-core": "1.2.11",
14+
"@tensorflow/tfjs-data": "1.2.11",
15+
"@tensorflow/tfjs-layers": "1.2.11",
16+
"@tensorflow/tfjs-node": "1.2.11",
1717
"@types/detect-browser": "^4.0.0",
1818
"@types/jasmine": "~2.5.53",
1919
"@types/mathjs": "^5.0.1",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
tensorflowjs>=1.2.9
2-
tf-nightly>=2.0.0.dev20190614
2+
tf-nightly>=2.1.0.dev20191008
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
tensorflowjs>=1.2.9
2-
tf-nightly-gpu-2.0-preview>=2.0.0.dev20190614
2+
tf-nightly>=2.1.0.dev20191008

tfjs/integration_tests/yarn.lock

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,15 @@
334334
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
335335
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=
336336

337-
"@tensorflow/[email protected].9":
338-
version "1.2.9"
339-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-converter/-/tfjs-converter-1.2.9.tgz#4774dd9447ac81c0c6776f9fd186374b9fa3bf1a"
340-
integrity sha512-OKmiuZicIgadT3Bv9BvM+oom7wRz9eC5rTglQnuv7VN9H0syFVuhf5oD1Ff70tGDhJjJgL+cPz01fZRxTXjRWA==
337+
"@tensorflow/[email protected].11":
338+
version "1.2.11"
339+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-converter/-/tfjs-converter-1.2.11.tgz#c81a8bde669179e20e676dba790eeca61fa6ce0a"
340+
integrity sha512-3Qg3k6x9ZbAFSCJTSC2anaM40Fs04+PGFw/uRvupWHmns6D5ni9RzTH2thef9hzBT2V/UHnlnHs7RYJqQNTThA==
341341

342-
"@tensorflow/[email protected].9":
343-
version "1.2.9"
344-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-core/-/tfjs-core-1.2.9.tgz#125830270a0bdd0e856914778a300c4ad6f51e21"
345-
integrity sha512-s0hHZSx6rGTlkkB8u8gs5n7sIPv1GXDNHmISRy+kqGzmlpkfI2kr6WXqOWQy6wFgjzopRD8cJQjBZ9USPZnYTQ==
342+
"@tensorflow/[email protected].11":
343+
version "1.2.11"
344+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-core/-/tfjs-core-1.2.11.tgz#6bd870338cece217610613600ed4c20fdd13e201"
345+
integrity sha512-guqqD5bb5BTaTvUVWhG1xCXB0NuA5rv0indSEEOpMfqqBvtSwKp02heDGDcPOSUnmdB8V/HJbcyX2wRBXztQpA==
346346
dependencies:
347347
"@types/offscreencanvas" "~2019.3.0"
348348
"@types/seedrandom" "2.4.27"
@@ -351,41 +351,41 @@
351351
node-fetch "~2.1.2"
352352
seedrandom "2.4.3"
353353

354-
"@tensorflow/[email protected].9":
355-
version "1.2.9"
356-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-data/-/tfjs-data-1.2.9.tgz#54030a7990eb58d20288cab099d966d496710760"
357-
integrity sha512-Ti9Cj3pte9butuEsK5OPq0Lcqdi4wVUdtQXm0o7iYOZ0umseRzfbIb6zbdqucc2MQzOMTnRoxN+FL7LZmncsHg==
354+
"@tensorflow/[email protected].11":
355+
version "1.2.11"
356+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-data/-/tfjs-data-1.2.11.tgz#408fcb1f00cf4fc6f6bf8ea9504e3b9528251490"
357+
integrity sha512-xrRekVbwWgW1Cyaqh+1x0Tq3CQkePm/G94eGLcH6IbcoBp0syKKUCD0vHkaGn7GkUGFJkej5yHXsh0ujrbxd+A==
358358
dependencies:
359359
"@types/node-fetch" "^2.1.2"
360360
node-fetch "~2.1.2"
361361

362-
"@tensorflow/[email protected].9":
363-
version "1.2.9"
364-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-layers/-/tfjs-layers-1.2.9.tgz#d30d1bdfed228a07a3d4e9dcb9a6884031ae56e7"
365-
integrity sha512-OlXYaIb1rCk5dYmpaNsPEkO7R+T0oxfS3vQGIztNJB+YxrN8mwCu3hqgpbdKhAITiP+jxO0o+7bny8MsOCkOSQ==
362+
"@tensorflow/[email protected].11":
363+
version "1.2.11"
364+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-layers/-/tfjs-layers-1.2.11.tgz#55d44374a05af2aad1d6d6621e92c7ec52fddf80"
365+
integrity sha512-Ye/b0pwB9KVW5IbRP9UNSXPUvizP8VdaKVFzT2C6JJpUE97LznItbYDJjO60ND/Cl0uj7ttvxPwlYb7HYo+e6g==
366366

367-
"@tensorflow/[email protected].9":
368-
version "1.2.9"
369-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-node/-/tfjs-node-1.2.9.tgz#490e50ddc4c786e949de3d4fead3efccab750c97"
370-
integrity sha512-IGD4plBGy+2rQpYiI2LI/RC0nzyLKunJ2cPIx4etJ+V6n40mvEDOVXvUZCz/a72gKUKNPfx5uSsvImfRikWNjw==
367+
"@tensorflow/[email protected].11":
368+
version "1.2.11"
369+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-node/-/tfjs-node-1.2.11.tgz#f7dde1c005f7ee61fa3fbb75a0aaa0e121cd6b38"
370+
integrity sha512-aqwYP1XK3dGOkcozh3sg9uusw6cHBlEKFJjejOBDPk68tr3Jtij0XcXN0F/9NRU9Qg7hxZPJj4OIrUdC8CBn5Q==
371371
dependencies:
372-
"@tensorflow/tfjs" "1.2.9"
372+
"@tensorflow/tfjs" "1.2.11"
373373
adm-zip "^0.4.11"
374374
https-proxy-agent "^2.2.1"
375375
node-pre-gyp "0.13.0"
376376
progress "^2.0.0"
377377
rimraf "^2.6.2"
378378
tar "^4.4.6"
379379

380-
"@tensorflow/[email protected].9":
381-
version "1.2.9"
382-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs/-/tfjs-1.2.9.tgz#120f55a2826f71a5816e02b5bc0311fd583beedb"
383-
integrity sha512-9UAQnSp638FyM5eedYEM+j2R7VcNajiFmkeT5EXtf7YIurmMFNEm1sbajKJx7/ckz31YcYrVoUPc/iLhhDQl2A==
380+
"@tensorflow/[email protected].11":
381+
version "1.2.11"
382+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs/-/tfjs-1.2.11.tgz#3d5a6e535069fc6139e778d28e02a84331eb753c"
383+
integrity sha512-q1SIEMiR+Vqq8Fnmt/YGBC5tNq97LXDvUEl8SwWedhLtK1GJCpLMJXQA54JrkFXGLv5hK4dEb+1dx28TJUET2g==
384384
dependencies:
385-
"@tensorflow/tfjs-converter" "1.2.9"
386-
"@tensorflow/tfjs-core" "1.2.9"
387-
"@tensorflow/tfjs-data" "1.2.9"
388-
"@tensorflow/tfjs-layers" "1.2.9"
385+
"@tensorflow/tfjs-converter" "1.2.11"
386+
"@tensorflow/tfjs-core" "1.2.11"
387+
"@tensorflow/tfjs-data" "1.2.11"
388+
"@tensorflow/tfjs-layers" "1.2.11"
389389

390390
"@types/caseless@*":
391391
version "0.12.2"
@@ -424,9 +424,9 @@
424424
"@types/node" "*"
425425

426426
"@types/node@*":
427-
version "12.7.8"
428-
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.8.tgz#cb1bf6800238898bc2ff6ffa5702c3cadd350708"
429-
integrity sha512-FMdVn84tJJdV+xe+53sYiZS4R5yn1mAIxfj+DVoNiQjTYz1+OYmjwEZr1ev9nU0axXwda0QDbYl06QHanRVH3A==
427+
version "12.7.11"
428+
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.11.tgz#be879b52031cfb5d295b047f5462d8ef1a716446"
429+
integrity sha512-Otxmr2rrZLKRYIybtdG/sgeO+tHY20GxeDjcGmUnmmlCWyEnv2a2x1ZXBo3BTec4OiTXMQCiazB8NMBf0iRlFw==
430430

431431
"@types/node@^10.1.0":
432432
version "10.14.13"

0 commit comments

Comments
 (0)