Restrict scalar data class to DT_FLOAT tensors

Per [discussion on ][1], we intend for the
scalar data class to only support f32 tensors. This is all that we’ve
written historically, and supporting “anything that can be cast to f32”
introduces more complexity that doesn’t seem justified.

[1]: https://github.com/tensorflow/tensorboard/pull/4352#discussion_r528077811

PiperOrigin-RevId: 353280963
Change-Id: Ibe16c6491f7b452c6af9ec9413cccc6237be323c
This commit is contained in:
William Chargin 2021-01-22 11:20:53 -08:00 committed by TensorFlower Gardener
parent e8dd848664
commit b565087c5c

View File

@ -68,8 +68,7 @@ enum DataClass {
// processed by data ingestion pipelines.
DATA_CLASS_UNKNOWN = 0;
// Scalar time series. Each `Value` for the corresponding tag must have
// `tensor` set to a rank-0 tensor of floating-point dtype, which will be
// converted to float64.
// `tensor` set to a rank-0 tensor of type `DT_FLOAT` (float32).
DATA_CLASS_SCALAR = 1;
// Tensor time series. Each `Value` for the corresponding tag must have
// `tensor` set. The tensor value is arbitrary, but should be small to