Skip to content

Commit

Permalink
Fix bug in preprocess_spec.py: Remove list() that fails if tensor r…
Browse files Browse the repository at this point in the history
…ank is unknown.

PiperOrigin-RevId: 627656872
  • Loading branch information
mjlm authored and Copybara-Service committed Apr 24, 2024
1 parent 613dcbb commit b172f5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clu/preprocess_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def _describe_features(features: Features) -> str:
description = {}
for k, v in features.items():
if isinstance(v, (tf.Tensor, tf.RaggedTensor, tf.SparseTensor)):
description[k] = f"{v.dtype.name}{list(v.shape)}"
description[k] = f"{v.dtype.name}{v.shape}"
elif isinstance(v, dict):
description[k] = _describe_features(v)
else:
Expand Down

0 comments on commit b172f5a

Please sign in to comment.