* Disable firefox browserstack tests temporarily
* Remove unused WebGL scripts
* Update test-ci.sh
* Always use port 9876 for karma
* Always use port 9200 for karma
Browserstack supports ports 9200-9400 for safari
testing (https://www.browserstack.com/question/39572), and when karma launches
and its port is in use, it automatically increments the port. Starting at 9200
ensures the port is always supported by BrowserStack.
* Fix bash npm-run-all script
* Fix tfjs-vis test script
* Update karma.conf.js
* Update automl macos test version
---------
Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
Enable the 'noImplicitOverride' tsconfig setting, which requires the override keyword to be present when a subclass overrides a property of a superclass.
This major release upgrades TypeScript from 3.5.3 to 4.8.4 (https://github.com/tensorflow/tfjs/pull/6346). It is intended to be as non-breaking as possible, but it technically has breaking changes for users of `typescript<4.4`. All other users should be unaffected.
When compiling projects that depend on TFJS with `typescript<4.4`, the following error will appear.
```
node_modules/@webgpu/types/dist/index.d.ts:587:16 - error TS2304: Cannot find name 'PredefinedColorSpace'.
587 colorSpace?: PredefinedColorSpace;
~~~~~~~~~~~~~~~~~~~~
...
```
This can be fixed by upgrading TypeScript to 4.4.2 or greater, or by adding the file `predefined_color_space.d.ts` (name and path can be changed) with the following contents to your project to define the missing type. If this file is added, it will need to be removed when TypeScript is upgraded past 4.3.
```typescript
type PredefinedColorSpace = "display-p3" | "srgb";
```
`typescript<3.7` has the following additional error.
```
node_modules/@tensorflow/tfjs-core/dist/engine.d.ts:127:9 - error TS1086: An accessor cannot be declared in an ambient context.
127 get backend(): KernelBackend;
~~~~~~~
...
```
Enabling [`skipLibCheck`](https://www.typescriptlang.org/tsconfig#skipLibCheck) suppresses this error, and upgrading to at least TypeScript 3.6.2 fixes it (although the above fix for `PredefinedColorSpace` will also need to be applied).
Remove unused rollup config files that have been replaced with the Bazel-generated config.
Remove unused tsconfig.test.json files that have been replaced with Bazel test targets.
Co-authored-by: ahmedsabie <ahmedsabie@google.com>
Update jasmine from 3.1.0 to 4.2.1 for Bazel packages. Update karma from 6.3.16 to 6.4.0.
Remove deprecated use of async function and done callback at the same time in Jasmine tests.
Add karma-jasmine-html-reporter to show test status in the browser window.
Create a test_suite target named tests in each package and a test_suite in the root of the repository that runs all the tests for all the Bazel packages. WebGPU is excluded at the moment because it is in alpha.
Running yarn test at the root of the repository will run the tests.
This target is just for developer convenience.
This caused setup_tests.ts to be included in the non-test ts_library of tfjs-data, which would sometimes cause compilation to fail.
Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
* [core] Remove devDependencies that are no longer needed
* [cpu] Remove devDependencies that are no longer needed
* [layers] Remove devDependencies that are no longer needed
* [webgl] Remove devDependencies that are no longer needed
* [converter] Remove devDependencies that are no longer needed
* [data] Remove devDependencies that are no longer needed
* [tflite] Remove devDependencies that are no longer needed
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Co-authored-by: Na Li <linazhao@google.com>
Make webcam and microphone iterators check the IS_BROWSER flag instead of the IS_NODE flag when checking environment compatability. This is more accurate because some browsers, like Electron, look like node but still have all the browser features required for webcams and microphones.
Add repository metadata to the package.json files for the following packages:
* @tensorflow/tfjs-react-native
* @tensorflow/tfjs-layers
* @tensorflow/tfjs-data
* @tensorflow/tfjs-backend-wasm
Co-authored-by: Matthew Soulanille <msoulanille@google.com>
* init build file
* migrate tfjs-data to bazel
* fix tests
* skip mediaDevices tests if it is null
* test on chrome only
* addressed comments
* fix typo
* fixed snippet tests
IO tests use the same browser storage, so they need to run one-at-a-time. This PR adds the function runWithLock to jasmine_util that makes any spec that uses it run exclusively to other specs that use it.
Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
This PR builds tfjs-core and tfjs-backend-cpu using Bazel and makes the build outputs available to the other packages in the monorepo. It also sets up Bazel rules and macros that facilitate converting other packages in the monorepo to Bazel. For more details, see #5133.
BREAKING
FEATURE
Summary of breaking changes
Removal of *strict variants of ops
Remove deprecated tensor.depthwiseConv2D (use tensor.depthwiseConv2d)
Remove dilations param from maxPool3d and avgPool3d
Remove default registration of chaining api from core
Remove default registration of gradients from core
Other Changes
Add .fesm bundles to npm package
Rename custom-bundle tool to custom-module
Internal changes
refactor runKernel/runKernelFunc to remove legacy code after modularization of all kernels
* Don't rebuild core when running test-snippets in CI
* Add missing comma
* Make the test-snippets cloudbuild step wait for core to build
* [layers] Add a test-snippets-ci yarn command
* [data] Add a test-snippets-ci yarn command
* [converter] Add a test-snippets-ci yarn command
* Update cloudbuild test golden file
* Run ts-node tests with --transpile-only to increase speed
* Run 'yarn build' before testing with ts-node
* [cpu] Move run_tests.ts to /src so it is typechecked
* [union] Run test-tools with typechecking
* Remove old tfjs-node integration tests
* Add test-dev to packages that use ts-node
* [core] Remove dependency on union that was added earlier in this PR
* Add a command to each package
* Remove --transpile-only flag from targets that never run through tsc
* Remove tfjs-backend-cpu's karma.conf.js since it's unused
* Specify a tunnel identifier for browserstack and port for karma
* Remove karma from tfjs-converter since it's unused
* Upgrade tfjs union's browserstack launcher to 1.6.0
* Remove integration tests that are already in e2e
* Upgrade e2e browserstack launcher to 1.6.0
* Upgrade wasm backend's browserstack launcher to 1.6.0
* Upgrade tfjs-vis's browserstack launcher to 1.6.0
* upgrade tfjs-backend-webgpu's browserstack launcher to 1.6.0
* [wasm] Upgrade karma-typescript to 5.2.0
* [automl] Remove browserstack launcher since it's unused
* [core] Upgrade browserstack launcher to 1.6.0
* Change e2e browsertack benchmark port to match other e2e ports
* Update cloudbuild file generation tests due to editing e2e cloudbuild.yml
* [core] Move 'port' to browserstackConfig to fix webworker test
* Move 'port' to browserstackConfig