Commit Graph

6112 Commits

Author SHA1 Message Date
Matthew Soulanille 0fc04d958e
Remove hub from tests (#8563) 2025-06-06 13:55:10 -07:00
gaikwadrahul8 0ef019b66d
Add NAPI-v9 support to tfjs-node-gpu package (#8547)
* Add NAPI-v9 support to tfjs-node-gpu package

* Update napi version to 9 for tfjs-node
2025-05-29 15:39:13 -07:00
Matthew Soulanille 51577688f1
Move nightly publishing tests and release branch tests to github actions (#8555)
[Example nightly release and publish test](https://github.com/mattsoulanille/tfjs/actions/runs/14672995746/job/41183624273)

[Example release PR test](https://github.com/mattsoulanille/tfjs/actions/runs/14674243426/job/41187438555?pr=1)
2025-04-28 09:07:00 -07:00
Valérian Rousset dc7261728f
[tfjs-core] do not hang on invalid browser files (#8517)
`tf.io.browserFiles` doesn't fail when loading invalid files. or rather, it fails, but never rejects the promise, making the `IOHandler.load` hang forever.

wrapping the `JSON.parse` call in a try/catch and rejecting accordingly did the trick. and a small test to try it out.

note: `FileReader.readAsText()` is a callback way to go around reading files. the promise-based `Blob.text()` would make `BrowserFile.load` simpler and safer (but felt ouf-of-scope here).
2025-04-23 18:59:09 +00:00
croraf a83539db79
Fix description for util_base.ts `assert` function (#8270)
Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2025-04-23 18:54:17 +00:00
Matthew Soulanille 8c087a4cb3
[WebGPU] Access properties with `.prop` instead of `['prop']` (#8503)
Fixes a bug with closure compiler property renaming.
2025-04-23 11:44:17 -07:00
Shivam Mishra 29c5db378f
Remove --no-site-packages flag from virtualenv command and update the supported python version. (#8551)
* Remove --no-site-packages flag from virtualenv.

* change python version to least supported version.

---------

Co-authored-by: Matthew Soulanille <msoulanille@google.com>
2025-04-23 11:35:13 -07:00
Valérian Rousset f2e55729ba
[tfjs-node] replace deprecated utils (#8425)
Co-authored-by: Matthew Soulanille <msoulanille@google.com>
2025-04-23 11:30:04 -07:00
Matthew Soulanille 407c6e56b9
Fix wrong branch name in CI workflow 2025-04-23 11:04:02 -07:00
Matthew Soulanille 78345c5f33
Move PR Continuous Integration to Github Actions (#8534)
Move GCP presubmits to Github actions. This allows us to run WebGL / WebGPU tests, since Github Actions have a MacOS runner with a GPU. This should unblock several PRs.
2025-04-23 10:55:01 -07:00
Matthew Soulanille 2644bd0d6c
[WebGPU] Make dataToGPU upload to GPU if data is on CPU (#8483) 2024-12-19 01:57:50 +00:00
Matthew Soulanille cb6206c291
Update README.md (#8464) 2024-12-05 18:31:40 +00:00
mattvr 33d939a55c
webgpu: fix: conditionally call deprecated GPUAdapter.requestAdapterInfo (#8392)
* fix: conditionally call deprecated GPUAdapter.requestAdapterInfo

* Update tfjs-backend-webgpu/src/base.ts

Co-authored-by: Kenta Moriuchi <moriken@kimamass.com>

* fix: update webgpu types

---------

Co-authored-by: Kenta Moriuchi <moriken@kimamass.com>
2024-10-11 19:50:26 +00:00
gaikwadrahul8 8d594e32ca
Fix typos in the documentation strings of the tfjs-core directory (#8413) 2024-10-10 23:24:41 +00:00
gaikwadrahul8 8206e95ff5
Fix typos in the documentation strings of the tfjs-node directory (#8412) 2024-10-10 22:20:47 +00:00
gaikwadrahul8 15c00f8948
Fix typos in the documentation strings of the tfjs-layers directory (#8411) 2024-10-10 15:03:13 -07:00
Valérian Rousset 636c616d14
[tfjs-data] support async generator (#8408) 2024-10-08 11:35:37 -07:00
Matthew Soulanille 3daf152cb7
Quote props of DataType enum to prevent name mangling (#8361)
BUG
These properties must be quoted since they are used by parseDtypeParam in tfjs-converter/src/operations/operation_mapper.ts to look up dtypes by string name. If they are not quoted, Closure will mangle their names.
2024-08-23 14:29:08 -07:00
lukonik 936b448c20
Subject: Add R2Score metric. (#8169) (#8353)
Body:
FEATURE

Co-authored-by: Matthew Soulanille <msoulanille@google.com>
2024-08-22 16:00:22 +00:00
gaikwadrahul8 0677375de6
Update broken link for tf.keras SavedModel in README.md (#8313) 2024-08-21 18:52:32 +00:00
Matthew Soulanille 97f1531a09
Fix iOS nightly device deprecated by updating device (#8348) 2024-08-06 10:15:19 -07:00
gaikwadrahul8 fcad805d35
Update supported TypedArray data types in tf.tensor in the documentation (#8287)
* Update supported TypedArray data types in tf.tensor in the documentation

* Address Exceeds maximum line length of 80 tslint error

* Address Exceeds maximum line length of 80 tslint error again

* Address no-consecutive-blank-lines tslint error
2024-05-29 17:15:25 -07:00
gaikwadrahul8 737b8f1052
Update tar package version for tfjs-node & tfjs-node-gpu (#8280) 2024-05-21 10:09:24 -07:00
Matthew Soulanille 68c4de61d5
Export WebGPUProgram as type to fix g3 isolatedModules issue (#8252) 2024-04-18 23:19:35 +00:00
gaikwadrahul8 5092b04251
Update installation steps for Windows / Mac OS X for tfjs-node in README.md (#8101) 2024-04-18 16:02:45 -07:00
gaikwadrahul8 1bf2fca8df
Update exception logic in convolutional.ts (#8248)
BUG
2024-04-17 10:19:15 -07:00
gaikwadrahul8 63250eceec
Address tfjs-react-native typos in documentation strings (#8217) 2024-04-12 13:21:11 -07:00
Architect c027d6a51d
Add support for GELU and approximate activation functions (#8224)
FEATURE
* add docker configs for isolated testing

* implement gelu and gelu_new as separate activations

* Update activations.ts

* Update activations_test.ts

* Update activations_test.ts

* remove docker files

* fix activation tests

* fix lint errors

* remove extra blank line

* fix gelu_new calc

* fix 1D test

---------

Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
Co-authored-by: Matthew Soulanille <msoulanille@google.com>
2024-04-12 13:18:22 -07:00
gaikwadrahul8 baf2364168
Address tfjs-automl typos in documentation strings (#8219) 2024-04-12 10:52:06 -07:00
Branchverse 3fbd65e2f2
Fixing typos in READMEs (#8213)
* fix: typo in README.md

* Update README.md
2024-04-12 10:51:09 -07:00
Ping Yu c465681739
nightly test fix (#8214)
* testing nightly fix

* disable mobilenet test

* fix converter and e2e tests
2024-04-06 00:56:02 -07:00
gaikwadrahul8 f0f981fe30
Address typos in scripts documentation strings (#8185)
DOC
2024-02-27 10:22:08 -08:00
Shivam Mishra 818d672e1b
Fixed typos in documentation string. (#7782)
* Migrate stale management probot to Github action

* Migrate stale management probot to Github action

* Fixed typos in documentation string.

* Fixed typos in documentation string.

---------

Co-authored-by: Matthew Soulanille <msoulanille@google.com>
Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>
Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2024-02-05 18:41:41 +00:00
Ping Yu 45f1a86ace
merge g3 cl (#8138) 2024-01-23 23:47:28 +00:00
Nitin Tiwari 7a1cc67bc2
Added a new project - TF.js-TFLite Object Detection. (#8147) 2024-01-22 13:31:43 -08:00
Victor Moreno G f224f1db87
Fix for windows installation #7341 (#8122)
* Fix for windows installation #7341

Fix a problem with the installation on windows.
My problem on windows was that `./lib/napi-v9` directory didn't exist and `./scripts/deps-stage.js` on line **60** needed the path to symlink or copy the dll. 

My fix was to make sure that the directory `napi-v9` exists with:
`await fs.mkdir(path.dirname(destLibTensorFlowPath), {recursive: true})`;

I'm solving the copy issue with this code.

* Fix fs.mkdir usage in deps-stage.js
2024-01-09 23:55:09 +00:00
gaikwadrahul8 b004ab65d6
Update broken link for MacOS Catalina guide in README.md (#8032)
Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>
2024-01-09 19:44:48 +00:00
Ping Yu 4d7f465ddd
apply g3 fixes for jax (#8099)
BUG
* apply g3 fixes for jax

* fixed python version and jax version and udpated the failing test

* update the deps in linux box
2023-12-18 15:24:44 -08:00
Bill ZHANG d94193de3f
Add support for complex64 data type in `parseDtypeParam` function (#8083)
* Add support for complex64 data type in `parseDtypeParam` function

* Add parse complex64 test to operation_mapper_test.ts
2023-12-04 14:28:03 -08:00
Shivam Mishra b8a002390d
Remove 'awaiting' labels when user issue/PR updated. (#7963)
Remove the label "stat:awaiting response", when issue/PR unstale.
2023-11-29 17:58:57 +00:00
Matthew Soulanille e2ba43c041
Stream weights to the GPU when loading a model (#7994)
When downloading model weight data, slice it into weight tensors and push them to the GPU eagerly. This avoids storing an extra copy of the weights on CPU, allowing for larger models (1.3B to possibly ~6.7B or larger) to be loaded without causing a V8 OOM crash.

When streaming the weights, check CPU_HANDOFF_SIZE_THRESHOLD or WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD to determine whether the weight should be sent to GPU or remain on CPU.

This feature is guarded by the streamWeights option in LoadOptions. Since most of TFJS's graph model saving relies on the CPU copy of the model, model saving is disabled when the model was streamed (i.e. it will throw an error since the weights ArrayBuffer is missing).
2023-11-28 12:37:51 -08:00
Matthew Soulanille 929b35db95
Fix webgpu support check failing if globalThis is undefined (#8073)
Fix WebGPU support not working on iOS, where globalThis is sometimes not
available.
2023-11-16 22:20:14 +00:00
gaikwadrahul8 5ad2606577
Update broken link for Frozen Model hyperlink in README.md (#8063)
Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2023-11-14 13:30:11 -08:00
Matthew Soulanille 0e50e74237
Fix isWebGPUSupported throwing an error in node (#8070)
BUG
While node is not supported, 'isWebGPUSupported' should return false instead of
throwing an error. This fixes pose-detection node tests, which use the same
files as the browser tests.
2023-11-14 13:28:37 -08:00
Zhu Liang 7270e449ad
Update tfjs-react-native dependencies (#8062)
FEATURE
* feat: update deps

* feat: update dep

* feat: update dep

* feat: update
2023-11-14 11:22:34 -08:00
Matthew Soulanille fe7f4f3a56
Make lockfiles branch checking more lenient (#8060)
BUG
2023-11-08 11:47:24 -08:00
gaikwadrahul8 e5ead68fe5
Update correct links for Keras HDF5 and tf.keras SavedModel in README.md (#8051)
DOC
2023-11-03 14:09:27 -07:00
Jiajia Qin 9ae972e79f
webgpu: apply the new timestampWrites format (#8048)
* webgpu: apply the new timestampWrites format

* Add types/dom-webcodecs to fix bots errors

* downgrade @types/dom-webcodecs version

* try @types/dom-webcodecs: 0.1.4
2023-11-03 15:07:37 +08:00
Matthew Soulanille e003c32b92
Fix worker tests using the wrong paths in importScripts (#8050)
Worker tests were getting the path for `importScripts` by referencing
`location.origin`, but this is `blob://` when accessed from the worker
context.

Template `location.origin` from the main context into the worker source code
instead of accessing the worker's version of `location.origin`.
2023-11-02 14:46:39 -07:00
Matthew Soulanille 18c42242b1
Fix missing publish tag for non-bazel packages (#8044) 2023-10-31 09:43:24 -07:00