Big NDArray generate Operand Tensor meet protobuf exceeded maximum protobuf size of 2GB ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- machine-learning
Research direction
Start with the reported Ops.constant and Constant.tensorOf call path, using the SparkConverter-generated DoubleNdArray and the smaller filtered DataFrame as contrasting inputs. Reproduce the protobuf size failure and determine the expected behavior for tensors above 2GB; the issue does not define a requested change or a clear completion test.
Written by the indexing model from the issue text.
Description
Hi :
from spark DataFrame generate org.tensorflow.ndarray.DoubleNdArray , after I want to generate Operand[TFloat64] tensor , meet error
scala> val featureVector = SparkConverter.sparkDataframeFeatureVectorConvertTfTensor(finalInputDf,"final_features" )
featureVector: org.tensorflow.ndarray.DoubleNdArray = org.tensorflow.ndarray.impl.dense.DoubleDenseNdArray@e3f6a6a0
scala> val ft = tf.constant(featureVector)
[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/message_lite.cc:451] tensorflow.AttrValue exceeded maximum protobuf size of 2GB: 6279090916
org.tensorflow.exceptions.TFInvalidArgumentException: AttrValue missing value with expected type 'tensor'
for attr 'value'
; NodeDef: {{node Const}}; Op<name=Const; signature= -> output:dtype; attr=value:tensor; attr=dtype:type>
at org.tensorflow.internal.c_api.AbstractTF_Status.throwExceptionIfNotOK(AbstractTF_Status.java:87)
at org.tensorflow.EagerOperationBuilder.execute(EagerOperationBuilder.java:314)
at org.tensorflow.EagerOperationBuilder.build(EagerOperationBuilder.java:77)
at org.tensorflow.EagerOperationBuilder.build(EagerOperationBuilder.java:64)
at org.tensorflow.op.core.Constant.create(Constant.java:1350)
at org.tensorflow.op.core.Constant.tensorOf(Constant.java:521)
at org.tensorflow.op.Ops.constant(Ops.java:1669)
... 59 elided
but if I filter some small part Dataframe is ok
scala> val featureVector = SparkConverter.sparkDataframeFeatureVectorConvertTfTensor(finalInputDf.filter(col("pay_status").equalTo(1)),"final_features" )
featureVector: org.tensorflow.ndarray.DoubleNdArray = org.tensorflow.ndarray.impl.dense.DoubleDenseNdArray@627077a
scala> val ft_small = tf.constant(featureVector)
ft_small: org.tensorflow.op.core.Constant[org.tensorflow.types.TFloat64] = <Const 'Const_2'>
scala> ft_small.asTensor().numBytes()
res43: Long = 1058424696
- Dominant language
- Java
- Stars
- 928
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tensorflow/java
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tensorflow/java#653 · 1 comment · 4 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#621 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#617 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
tensorflow/java#615 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#614 · 1 comment ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100