Skip to content

Commit

Permalink
Cleanup markdown files after monorepo merge & add tfjs cloudbui… (#1812)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil Thorat committed Aug 13, 2019
1 parent 81225ad commit 9fd1948
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 108 deletions.
42 changes: 15 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
node_modules/
<<<<<<< HEAD
package-lock.json
npm-debug.log
*.tgz
**/*.pyc
*/diff
.DS_Store
dist/
tensorflow-tfjs-*.tgz
yarn-error.log
.yalc/
yalc.lock
.idea/
.rpt2_cache/
package
release-notes.md
=======
.yalc/
bazel-out/
coverage/
npm-debug.log
yarn-error.log
local.log
.DS_Store
dist/
bazel-out/
.idea/
*.tgz
**/*.pyc
.yalc/
yalc.lock
.rpt2_cache/
package/
*/diff

local.log
package
package-lock.json
node_modules/
npm-debug.log
release-notes.md
tensorflow-tfjs-*.tgz
tfjs-backend-wasm/dist
tfjs-backend-wasm/wasm-out
>>>>>>> tfjs-core/master
yalc.lock
yarn-error.log
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

<<<<<<< HEAD
## Code reviews

All submissions, including submissions by project members, require review. We
Expand Down Expand Up @@ -52,7 +51,6 @@ substantial it's better to discuss your design before submitting a PR.
If you're looking for tasks to work on, we also mark issues as ["help wanted"](https://github.com/tensorflow/tfjs/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).


=======
## Adding functionality

One way to ensure that your PR will be accepted is to add functionality that
Expand Down Expand Up @@ -84,4 +82,3 @@ information on using pull requests.

We require unit tests for most code, instructions for running our unit test
suites are in the documentation.
>>>>>>> tfjs-core/master
143 changes: 71 additions & 72 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,77 @@
## Development

<<<<<<< HEAD
This repository contains only the logic and scripts that combine
two packages:
- [TensorFlow.js Core](https://github.com/tensorflow/tfjs-core),
a flexible low-level API, formerly known as *deeplearn.js*.
- [TensorFlow.js Layers](https://github.com/tensorflow/tfjs-layers),
a high-level API which implements functionality similar to
This repository contains only the logic and scripts that combine the following NPM packages:
- TensorFlow.js Core (@tensorflow/tfjs-core),
a flexible low-level linear algebra and gradients API.
- TensorFlow.js Layers (@tensorflow/tfjs-layers),
a high-level model-centric API which implements functionality similar to
[Keras](https://keras.io/).
- TensorFlow.js Converter (@tensorflow/tfjs-converter),
a library to load converted TensorFlow SavedModels and execute them in JavaScript.
- TensorFlow.js Data (@tensorflow/tfjs-data),
a library to load and prepare data for use in machine learning models.

#### Yarn
We use yarn, and if you are adding or removing dependencies you should use yarn
to keep the `yarn.lock` file up to date.

#### Code editor
We recommend using [Visual Studio Code](https://code.visualstudio.com/) for
development. Make sure to install
[TSLint VSCode extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin)
and the npm [clang-format](https://github.com/angular/clang-format) `1.2.2` or later
with the
[Clang-Format VSCode extension](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format)
for auto-formatting.

#### Testing
Before submitting a pull request, make sure the code passes all the tests and is clean of lint errors:

```bash
# cd into the package directory you want to test
$ yarn test
$ yarn lint
```

To run a subset of tests and/or on a specific browser:

```bash
$ yarn test --browsers=Chrome --grep='multinomial'

> ...
> Chrome 62.0.3202 (Mac OS X 10.12.6): Executed 28 of 1891 (skipped 1863) SUCCESS (6.914 secs / 0.634 secs)
```

To run the tests once and exit the karma process (helpful on Windows):

```bash
$ yarn test --single-run
```

To run the tests in an environment that does not have GPU support (such as Chrome Remote Desktop):

```bash
$ yarn test --testEnv cpu
```

Available test environments: cpu, webgl1, webgl2.

#### Packaging (browser and npm)

In any of the directories the following commands build the NPM tarball:

```bash
$ yarn build-npm
> Stored standalone library at dist/tf-core(.min).js
> Stored also tensorflow-tf-core-VERSION.tgz
```

To install it locally, run `yarn add ./tensorflow-tf-core-VERSION.tgz`.

> On Windows, use bash (available through git) to use the scripts above.
Looking to contribute, and don't know where to start? Check out our "stat:contributions welcome" [issues](https://github.com/tensorflow/tfjs/labels/stat%3Acontributions%20welcome).

To develop:
- `tfjs-core`, see [this doc](https://github.com/tensorflow/tfjs-core/blob/master/DEVELOPMENT.md).
- `tfjs-layers` see [this doc](https://github.com/tensorflow/tfjs-layers/blob/master/DEVELOPMENT.md).
- `tfjs` with locally modified `tfjs-layers` (or `tfjs-core`) see [this section](https://github.com/tensorflow/tfjs-layers/blob/master/DEVELOPMENT.md#changing-tensorflowtfjs-layers-and-testing-tensorflowtfjs) in [tfjs-layers/DEVELOPMENT.md](https://github.com/tensorflow/tfjs-layers) repo.

## For repository owners: commit style guide

Expand Down Expand Up @@ -74,71 +133,11 @@ This will show up under "Features" as:

This will also show up under "Performance" as:
- Improve matMul CPU speed by 100%. (Improvements to matMul.) (#900). Thanks, @externalcontributor.
=======
To build **TensorFlow.js Core API** from source, we need to clone the project and prepare
the dev environment:

```bash
$ git clone https://github.com/tensorflow/tfjs-core.git
$ cd tfjs-core
$ yarn # Installs dependencies.
```

#### Yarn
We use yarn, and if you are adding or removing dependencies you should use yarn
to keep the `yarn.lock` file up to date.

#### Code editor
We recommend using [Visual Studio Code](https://code.visualstudio.com/) for
development. Make sure to install
[TSLint VSCode extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin)
and the npm [clang-format](https://github.com/angular/clang-format) `1.2.2` or later
with the
[Clang-Format VSCode extension](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format)
for auto-formatting.

#### Testing
Before submitting a pull request, make sure the code passes all the tests and is clean of lint errors:

```bash
$ yarn test
$ yarn lint
```

To run a subset of tests and/or on a specific browser:

```bash
$ yarn test --browsers=Chrome --grep='multinomial'

> ...
> Chrome 62.0.3202 (Mac OS X 10.12.6): Executed 28 of 1891 (skipped 1863) SUCCESS (6.914 secs / 0.634 secs)
```

To run the tests once and exit the karma process (helpful on Windows):

```bash
$ yarn test --single-run
```

To run the tests in an environment that does not have GPU support (such as Chrome Remote Desktop):

```bash
$ yarn test --testEnv cpu
```

Available test environments: cpu, webgl1, webgl2.

#### Packaging (browser and npm)

```bash
$ yarn build-npm
> Stored standalone library at dist/tf-core(.min).js
> Stored also tensorflow-tf-core-VERSION.tgz
```

To install it locally, run `yarn add ./tensorflow-tf-core-VERSION.tgz`.

> On Windows, use bash (available through git) to use the scripts above.
Looking to contribute, and don't know where to start? Check out our "stat:contributions welcome" [issues](https://github.com/tensorflow/tfjs/labels/stat%3Acontributions%20welcome).
>>>>>>> tfjs-core/master
```
13 changes: 10 additions & 3 deletions cloudbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,27 @@ steps:
# Core.
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
id: 'core'
id: 'tfjs-core'
args: ['./scripts/run-build.sh', 'tfjs-core']
waitFor: ['diff']

# Union.
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
id: 'tfjs'
args: ['./scripts/run-build.sh', 'tfjs']
waitFor: ['diff']

# WebGPU.
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
id: 'webgpu'
id: 'tfjs-backend-webgpu'
args: ['./scripts/run-build.sh', 'tfjs-webgpu']
waitFor: ['diff']

# React Native.
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
id: 'react-native'
id: 'tfjs-react-native'
args: ['./scripts/run-build.sh', 'tfjs-react-native']
waitFor: ['diff']
4 changes: 1 addition & 3 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
To see the logs from the Cloud Build CI, please join either
our [discussion](https://groups.google.com/a/tensorflow.org/forum/#!forum/tfjs)
or [announcement](https://groups.google.com/a/tensorflow.org/forum/#!forum/tfjs-announce) mailing list.
To see the logs from the Cloud Build CI, please join either our [discussion](https://groups.google.com/a/tensorflow.org/forum/#!forum/tfjs) or [announcement](https://groups.google.com/a/tensorflow.org/forum/#!forum/tfjs-announce) mailing list.

0 comments on commit 9fd1948

Please sign in to comment.