refactor(deps): migrate @tensorflow/tfjs from 3.4.0 to 4.22.0#7061
Open
digital-wizard48 wants to merge 1 commit intotensorflow:masterfrom
Open
refactor(deps): migrate @tensorflow/tfjs from 3.4.0 to 4.22.0#7061digital-wizard48 wants to merge 1 commit intotensorflow:masterfrom
digital-wizard48 wants to merge 1 commit intotensorflow:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Dependency version bumps
@tensorflow/tfjs: 3.4.0 → 4.22.0@tensorflow/tfjs-backend-cpu: 3.4.0 → 4.22.0@tensorflow/tfjs-backend-webgl: 3.4.0 → 4.22.0@tensorflow/tfjs-core: 3.4.0 → 4.22.0All
@tensorflow/tfjs-*packages must share the same version in TF.js 4.x to avoid runtime conflicts from mismatched kernel registries.Source code migrations
tensorboard/plugins/projector/vz_projector/knn.tstf.tensor()→tf.tensor2d(): In TF.js 4.x the generictf.tensor()with a shape argument still works buttf.tensor2d()is the preferred typed constructor for rank-2 tensors and avoids implicitanytensor type downstream.tf.sub(1, ...)→tf.sub(tf.scalar(1), ...): TF.js 4.x tightened the overload resolution fortf.sub; the first argument must be aTensororTensorLikevalue explicitly. Wrapping the numeric literal intf.scalar()satisfies the updated type constraints.Array<[number, number]>→number[][]: Thepaddingparameter type fortf.pad()changed from a tuple-arrayArray<[number, number]>to the more permissivenumber[][]in TF.js 4.x type definitions. Updated the annotation and added aas tf.Tensor2Dcast after the call sincetf.padreturns the baseTensortype.tf.splitsecond argument: Explicitly typed asnumber[]to match the updated overload signature in 4.x.maybePaddedCosDistMatrixtype annotation: Now explicitly typed astf.Tensor2Dto propagate the rank information through the padding branch; requires a cast aftertf.padwhich returns the baseTensortype.tensorboard/webapp/third_party/tfjs.tstf.setBackend('webgl')ortf.setBackend('cpu')before running operations when the default automatic backend resolution is insufficient. The side-effect imports of the backend packages still register the backends, but explicit selection viasetBackendis the recommended pattern in 4.x.This PR was auto-generated by Gittensor upgrade bot using Claude AI