Skip to content

Commit 64ab22c

Browse files
author
Nikhil Thorat
committed
Merge remote-tracking branch 'origin' into exportsobj
2 parents b976a79 + 65be95b commit 64ab22c

File tree

93 files changed

+2806
-1835
lines changed

Some content is hidden

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

93 files changed

+2806
-1835
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ package-lock.json
4343
release-notes.md
4444
tensorflow-tfjs-*.tgz
4545
tfjs-backend-wasm/dist
46-
tfjs-backend-wasm/wasm-out
46+
tfjs-backend-wasm/wasm-out/*.js
47+
tfjs-backend-wasm/wasm-out/*.wasm
4748
yalc.lock
4849
yarn-error.log

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use GitHub pull requests for this purpose. Consult
2323
information on using pull requests.
2424

2525
## Continuous Integration
26-
Continuous Integration tests run for every PR that is sent against TensorFlow.js repositories. Any time you push to the branch, they will re-run. Before asking for a review, make sure that the continous integration tests are passing.
26+
Continuous Integration tests run for every PR that is sent against TensorFlow.js repositories. Any time you push to the branch, they will re-run. Before asking for a review, make sure that the continuous integration tests are passing.
2727

2828
To see the logs from the Cloud Build CI, please join either
2929
our [discussion](https://groups.google.com/a/tensorflow.org/forum/#!forum/tfjs)
@@ -67,7 +67,7 @@ add new backends.
6767
### Adding an op
6868

6969
When adding ops to the library and deciding whether to write a kernel
70-
implementation in [backend.ts](https://github.com/tensorflow/tfjs-core/blob/master/src/backends/backend.ts),
70+
implementation in [backend.ts](/tfjs-core/src/backends/backend.ts),
7171
be sure to check out the TensorFlow ops list [here](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ops/ops.pbtxt).
7272
This list shows the kernels available for the TensorFlow C API. To ensure that
7373
we can bind to this with node.js, we should ensure that our backend.ts

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ other client-side data.
2323

2424
This repository contains the logic and scripts that combine
2525
four packages:
26-
- [TensorFlow.js Core](https://github.com/tensorflow/tfjs-core),
26+
- [TensorFlow.js Core](/tfjs-core),
2727
a flexible low-level API, formerly known as *deeplearn.js*.
28-
- [TensorFlow.js Layers](https://github.com/tensorflow/tfjs-layers),
28+
- [TensorFlow.js Layers](/tfjs-layers),
2929
a high-level API which implements functionality similar to
3030
[Keras](https://keras.io/).
31-
- [TensorFlow.js Data](https://github.com/tensorflow/tfjs-data),
31+
- [TensorFlow.js Data](/tfjs-data),
3232
a simple API to load and prepare data analogous to
3333
[tf.data](https://www.tensorflow.org/guide/datasets).
34-
- [TensorFlow.js Converter](https://github.com/tensorflow/tfjs-converter),
34+
- [TensorFlow.js Converter](/tfjs-converter),
3535
tools to import a TensorFlow SavedModel to TensorFlow.js
3636

3737
If you care about bundle size, you can import those packages individually.
3838

39-
If you are looking for Node.js support, check out the [TensorFlow.js Node repository](https://github.com/tensorflow/tfjs-node).
39+
If you are looking for Node.js support, check out the [TensorFlow.js Node directory](/tfjs-node).
4040

4141
## Examples
4242

cloudbuild.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ steps:
6464
args: ['./scripts/run-build.sh', 'tfjs-backend-webgpu']
6565
waitFor: ['diff']
6666

67+
# WASM.
68+
- name: 'gcr.io/cloud-builders/gcloud'
69+
entrypoint: 'bash'
70+
id: 'tfjs-backend-wasm'
71+
args: ['./scripts/run-build.sh', 'tfjs-backend-wasm']
72+
waitFor: ['diff']
73+
6774
# React Native.
6875
- name: 'gcr.io/cloud-builders/gcloud'
6976
entrypoint: 'bash'

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"devDependencies": {
3-
"clang-format": "~1.2.4",
3+
"@types/node": "^12.7.5",
4+
"argparse": "^1.0.10",
45
"chalk": "~2.4.2",
6+
"clang-format": "~1.2.4",
57
"shelljs": "~0.8.3",
68
"ts-node": "~4.1.0",
79
"tslint": "~5.20.0",

scripts/release.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import * as readline from 'readline';
3131
import * as shell from 'shelljs';
3232
import * as fs from 'fs';
3333
import chalk from 'chalk';
34+
import * as argparse from 'argparse';
3435

3536
interface Phase {
3637
// The list of packages that will be updated with this change.
@@ -87,6 +88,13 @@ const PHASES: Phase[] = [
8788

8889
const TMP_DIR = '/tmp/tfjs-release';
8990

91+
const parser = new argparse.ArgumentParser();
92+
93+
parser.addArgument('--git-protocol', {
94+
action: 'storeTrue',
95+
help: 'Use the git protocal rather than the http protocol when cloning repos.'
96+
});
97+
9098
function printPhase(phaseId: number) {
9199
const phase = PHASES[phaseId];
92100
console.log(chalk.green(`Phase ${phaseId}:`));
@@ -104,6 +112,8 @@ function getPatchUpdateVersion(version: string): string {
104112
}
105113

106114
async function main() {
115+
const args = parser.parseArgs();
116+
107117
PHASES.forEach((_, i) => printPhase(i));
108118
console.log();
109119

@@ -131,11 +141,13 @@ async function main() {
131141
$(`rm -f -r ${dir}`);
132142
$(`mkdir ${dir}`);
133143

144+
const urlBase = args.git_protocol ? '[email protected]:' : 'https://github.com/';
145+
134146
if (phase.repo != null) {
135-
$(`git clone https://github.com/tensorflow/${phase.repo} ${dir} --depth=1`);
147+
$(`git clone ${urlBase}tensorflow/${phase.repo} ${dir} --depth=1`);
136148
shell.cd(dir);
137149
} else {
138-
$(`git clone https://github.com/tensorflow/tfjs ${dir} --depth=1`);
150+
$(`git clone ${urlBase}tensorflow/tfjs ${dir} --depth=1`);
139151
shell.cd(dir);
140152
}
141153

tfjs-automl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Make sure you can access those files as static assets from your web app by servi
109109
### Demo
110110

111111
The object detection demo lives in
112-
[demo/object_classification](./demo/object_classification). To run it:
112+
[demo/object_detection](./demo/object_detection). To run it:
113113

114114
```sh
115115
cd demo/object_detection

tfjs-automl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tensorflow/tfjs-automl",
3-
"version": "0.0.1-alpha.1",
3+
"version": "0.0.1-alpha.2",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"module": "dist/tf-automl.esm.js",

tfjs-automl/src/img_classification_test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import {GraphModel} from '@tensorflow/tfjs-converter';
1919
import * as tf from '@tensorflow/tfjs-core';
20+
// tslint:disable-next-line: no-imports-from-dist
2021
import {BROWSER_ENVS, describeWithFlags} from '@tensorflow/tfjs-core/dist/jasmine_util';
2122

2223
import * as automl from './index';

tfjs-automl/src/object_detection_test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import {GraphModel} from '@tensorflow/tfjs-converter';
1919
import * as tf from '@tensorflow/tfjs-core';
20+
// tslint:disable-next-line: no-imports-from-dist
2021
import {BROWSER_ENVS, describeWithFlags} from '@tensorflow/tfjs-core/dist/jasmine_util';
2122

2223
import * as automl from './index';

0 commit comments

Comments
 (0)