Skip to content

Commit 01b7b57

Browse files
authored
Merge branch 'master' into patch-4
2 parents e3c69a5 + e6e6109 commit 01b7b57

File tree

136 files changed

+4729
-1200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+4729
-1200
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ tfjs-layers/integration_tests/tfjs2keras/test-data/
2828
tfjs-layers/integration/typescript/yarn.lock
2929
e2e/integration_tests/create_save_predict_data
3030
e2e/integration_tests/convert_predict_data
31+
e2e/integration_tests/metadata
3132
e2e/scripts/storage
3233
e2e/scripts/htpasswd
3334
e2e/benchmarks/browserstack-benchmark/browsers.json
@@ -58,3 +59,4 @@ tfjs-backend-wasm/wasm-out/*.js
5859
tfjs-backend-wasm/wasm-out/*.wasm
5960
yalc.lock
6061
yarn-error.log
62+
cloudbuild_generated.yml

cloudbuild.yml

Lines changed: 9 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -5,138 +5,25 @@ steps:
55
id: 'yarn'
66
args: ['install']
77

8-
# Run find-affected-packages to find affected files in each folder.
8+
# Generate cloudbuild_generated.yml,
9+
# which builds and tests all affected packages.
910
- name: 'node:10'
1011
entrypoint: 'yarn'
11-
id: 'find-affected-packages'
12-
args: ['find-affected-packages']
12+
id: 'generate-cloudbuild-for-packages'
13+
args: ['generate-cloudbuild-for-packages']
1314
waitFor: ['yarn']
1415
env:
1516
- 'COMMIT_SHA=$COMMIT_SHA'
1617
- 'BRANCH_NAME=$BRANCH_NAME'
1718
- 'BASE_BRANCH=$_BASE_BRANCH'
19+
- 'NIGHTLY=$_NIGHTLY'
1820

19-
# Core.
21+
# Run the generated cloudbuild file
2022
- name: 'gcr.io/cloud-builders/gcloud'
2123
entrypoint: 'bash'
22-
id: 'tfjs-core'
23-
args: ['./scripts/run-build.sh', 'tfjs-core']
24-
waitFor: ['find-affected-packages']
25-
env: ['NIGHTLY=$_NIGHTLY']
26-
27-
# CPU backend.
28-
- name: 'gcr.io/cloud-builders/gcloud'
29-
entrypoint: 'bash'
30-
id: 'tfjs-backend-cpu'
31-
args: ['./scripts/run-build.sh', 'tfjs-backend-cpu']
32-
waitFor: ['find-affected-packages']
33-
env: ['NIGHTLY=$_NIGHTLY']
34-
35-
# Webgl backend.
36-
- name: 'gcr.io/cloud-builders/gcloud'
37-
entrypoint: 'bash'
38-
id: 'tfjs-backend-webgl'
39-
args: ['./scripts/run-build.sh', 'tfjs-backend-webgl']
40-
waitFor: ['find-affected-packages']
41-
env: ['NIGHTLY=$_NIGHTLY']
42-
43-
# Converter.
44-
- name: 'gcr.io/cloud-builders/gcloud'
45-
entrypoint: 'bash'
46-
id: 'tfjs-converter'
47-
args: ['./scripts/run-build.sh', 'tfjs-converter']
48-
waitFor: ['find-affected-packages']
49-
env: ['NIGHTLY=$_NIGHTLY']
50-
51-
# Data.
52-
- name: 'gcr.io/cloud-builders/gcloud'
53-
entrypoint: 'bash'
54-
id: 'tfjs-data'
55-
args: ['./scripts/run-build.sh', 'tfjs-data']
56-
waitFor: ['find-affected-packages']
57-
env: ['NIGHTLY=$_NIGHTLY']
58-
59-
# Layers.
60-
- name: 'gcr.io/cloud-builders/gcloud'
61-
entrypoint: 'bash'
62-
id: 'tfjs-layers'
63-
args: ['./scripts/run-build.sh', 'tfjs-layers']
64-
waitFor: ['find-affected-packages']
65-
env: ['NIGHTLY=$_NIGHTLY']
66-
67-
# Union.
68-
- name: 'gcr.io/cloud-builders/gcloud'
69-
entrypoint: 'bash'
70-
id: 'tfjs'
71-
args: ['./scripts/run-build.sh', 'tfjs']
72-
waitFor: ['find-affected-packages']
73-
74-
# Vis.
75-
- name: 'gcr.io/cloud-builders/gcloud'
76-
entrypoint: 'bash'
77-
id: 'tfjs-vis'
78-
args: ['./scripts/run-build.sh', 'tfjs-vis']
79-
waitFor: ['find-affected-packages']
80-
81-
# WebGPU.
82-
- name: 'gcr.io/cloud-builders/gcloud'
83-
entrypoint: 'bash'
84-
id: 'tfjs-backend-webgpu'
85-
args: ['./scripts/run-build.sh', 'tfjs-backend-webgpu']
86-
waitFor: ['find-affected-packages']
87-
88-
# WASM.
89-
- name: 'gcr.io/cloud-builders/gcloud'
90-
entrypoint: 'bash'
91-
id: 'tfjs-backend-wasm'
92-
args: ['./scripts/run-build.sh', 'tfjs-backend-wasm']
93-
waitFor: ['find-affected-packages']
94-
env: ['NIGHTLY=$_NIGHTLY']
95-
96-
# React Native.
97-
- name: 'gcr.io/cloud-builders/gcloud'
98-
entrypoint: 'bash'
99-
id: 'tfjs-react-native'
100-
args: ['./scripts/run-build.sh', 'tfjs-react-native']
101-
waitFor: ['find-affected-packages']
102-
103-
# Node CPU.
104-
- name: 'gcr.io/cloud-builders/gcloud'
105-
entrypoint: 'bash'
106-
id: 'tfjs-node'
107-
args: ['./scripts/run-build.sh', 'tfjs-node']
108-
waitFor: ['find-affected-packages']
109-
env: ['NIGHTLY=$_NIGHTLY']
110-
111-
# Node GPU.
112-
- name: 'gcr.io/cloud-builders/gcloud'
113-
entrypoint: 'bash'
114-
id: 'tfjs-node-gpu'
115-
args: ['./scripts/run-build.sh', 'tfjs-node-gpu']
116-
waitFor: ['find-affected-packages']
117-
env: ['NIGHTLY=$_NIGHTLY']
118-
119-
# Release notes test
120-
- name: 'node:10'
121-
id: 'test-monorepo'
122-
entrypoint: 'yarn'
123-
args: ['test-release-notes']
124-
waitFor: ['yarn']
125-
126-
# E2E test
127-
- name: 'gcr.io/cloud-builders/gcloud'
128-
entrypoint: 'bash'
129-
id: 'e2e'
130-
args: ['./scripts/run-build.sh', 'e2e']
131-
waitFor: ['find-affected-packages']
132-
env: ['NIGHTLY=$_NIGHTLY']
133-
134-
# Inference API
135-
- name: 'gcr.io/cloud-builders/gcloud'
136-
entrypoint: 'bash'
137-
id: 'tfjs-inference'
138-
args: ['scripts/run-build.sh', 'tfjs-inference']
139-
waitFor: ['find-affected-packages']
24+
id: 'run-cloudbuild'
25+
args: ['./scripts/run-build.sh']
26+
waitFor: ['generate-cloudbuild-for-packages']
14027
env: ['NIGHTLY=$_NIGHTLY']
14128

14229
# General settings.

e2e/cloudbuild.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,28 @@ steps:
1414
id: 'build-deps'
1515
args: ['build-deps-ci']
1616

17+
# Build tfjs-node.
18+
# This is a workaround for CI runs, which don't run
19+
# build-deps. For some reason, there's an N-API mismatch
20+
# between the tfjs-node node bindings and this image's
21+
# node version. Rebuilding the bindings with e2e's node
22+
# version fixes the problem and adds ~8 seconds to build time.
23+
# TODO(mattsoulanille): Fix the N-API issue and remove this step.
24+
- name: 'gcr.io/learnjs-174218/release'
25+
dir: 'e2e'
26+
entrypoint: 'yarn'
27+
id: 'build-node'
28+
args: ['build-node-ci']
29+
1730
# Test.
1831
- name: 'gcr.io/learnjs-174218/release'
1932
dir: 'e2e'
2033
entrypoint: 'yarn'
2134
id: 'test'
2235
args: ['test-ci']
2336
env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'NIGHTLY=$_NIGHTLY']
24-
2537
secretEnv: ['BROWSERSTACK_KEY']
38+
waitFor: ['yarn', 'build-deps']
2639

2740
secrets:
2841
- kmsKeyName: projects/learnjs-174218/locations/global/keyRings/tfjs/cryptoKeys/enc

e2e/custom_bundle/blazeface/app_tfjs_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"Cast",
44
"Reshape",
55
"ResizeBilinear",
6-
"Div",
6+
"RealDiv",
77
"Sub",
88
"Multiply",
99
"FusedConv2D",

e2e/custom_bundle/blazeface/custom_tfjs_blazeface/custom_tfjs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* =============================================================================
1616
*/
1717

18-
// This file is autogenerated.
18+
// This file is autogenerated.
1919

2020

2121
import {registerKernel} from '@tensorflow/tfjs-core/dist/base';
@@ -31,8 +31,8 @@ import {reshapeConfig as Reshape_wasm} from '@tensorflow/tfjs-backend-wasm/dist/
3131
registerKernel(Reshape_wasm);
3232
import {resizeBilinearConfig as ResizeBilinear_wasm} from '@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeBilinear';
3333
registerKernel(ResizeBilinear_wasm);
34-
import {divConfig as Div_wasm} from '@tensorflow/tfjs-backend-wasm/dist/kernels/Div';
35-
registerKernel(Div_wasm);
34+
import {realDivConfig as RealDiv_wasm} from '@tensorflow/tfjs-backend-wasm/dist/kernels/RealDiv';
35+
registerKernel(RealDiv_wasm);
3636
import {subConfig as Sub_wasm} from '@tensorflow/tfjs-backend-wasm/dist/kernels/Sub';
3737
registerKernel(Sub_wasm);
3838
import {multiplyConfig as Multiply_wasm} from '@tensorflow/tfjs-backend-wasm/dist/kernels/Multiply';

e2e/custom_bundle/blazeface/custom_tfjs_blazeface/custom_tfjs_core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* =============================================================================
1616
*/
1717

18-
// This file is autogenerated.
18+
// This file is autogenerated.
1919

2020

2121
import {registerKernel} from '@tensorflow/tfjs-core/dist/base';

e2e/custom_bundle/blazeface/model.json

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,48 @@
22
"format": "graph-model",
33
"generatedBy": "1.15.0",
44
"convertedBy": "TensorFlow.js Converter v1.3.2",
5-
"userDefinedMetadata": {
6-
"signature": {
7-
"inputs": {
8-
"input:0": {
9-
"name": "input:0",
10-
"dtype": "DT_FLOAT",
11-
"tensorShape": {
12-
"dim": [
13-
{
14-
"size": "-1"
15-
},
16-
{
17-
"size": "128"
18-
},
19-
{
20-
"size": "128"
21-
},
22-
{
23-
"size": "3"
24-
}
25-
]
26-
}
27-
}
28-
},
29-
"outputs": {
30-
"Identity:0": {
31-
"name": "Identity:0",
32-
"dtype": "DT_FLOAT",
33-
"tensorShape": {
34-
"dim": [
35-
{
36-
"size": "-1"
37-
},
38-
{
39-
"size": "-1"
40-
},
41-
{
42-
"size": "17"
43-
}
44-
]
45-
}
46-
}
47-
}
48-
}
5+
"signature": {
6+
"inputs": {
7+
"input:0": {
8+
"name": "input:0",
9+
"dtype": "DT_FLOAT",
10+
"tensorShape": {
11+
"dim": [
12+
{
13+
"size": "-1"
14+
},
15+
{
16+
"size": "128"
17+
},
18+
{
19+
"size": "128"
20+
},
21+
{
22+
"size": "3"
23+
}
24+
]
25+
}
26+
}
27+
},
28+
"outputs": {
29+
"Identity:0": {
30+
"name": "Identity:0",
31+
"dtype": "DT_FLOAT",
32+
"tensorShape": {
33+
"dim": [
34+
{
35+
"size": "-1"
36+
},
37+
{
38+
"size": "-1"
39+
},
40+
{
41+
"size": "17"
42+
}
43+
]
44+
}
45+
}
46+
}
4947
},
5048
"modelTopology": {
5149
"node": [
@@ -5473,4 +5471,4 @@
54735471
]
54745472
}
54755473
]
5476-
}
5474+
}

e2e/custom_bundle/dense_model/custom_tfjs/custom_tfjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* =============================================================================
1616
*/
1717

18-
// This file is autogenerated.
18+
// This file is autogenerated.
1919

2020

2121
import {registerKernel} from '@tensorflow/tfjs-core/dist/base';

e2e/custom_bundle/dense_model/custom_tfjs/custom_tfjs_core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* =============================================================================
1616
*/
1717

18-
// This file is autogenerated.
18+
// This file is autogenerated.
1919

2020

2121
import {registerKernel} from '@tensorflow/tfjs-core/dist/base';

0 commit comments

Comments
 (0)