google / google/praxis

Incorrect conversion from tf dtype to jax dtype

Open
#49 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
200
Forks
45
PR merge metrics
No merged PRs in 30d

Description

In `class DatasetInputSpecsProvider` when converting tf specs to jax
https://github.com/google/praxis/blob/dd07dd68d303c322ba9bcdb33efd96efc42c7090/praxis/base_input.py#L1116

`as_numpy_dtype` is considered as a method when it is actually an attribute of `tf.dtypes.Dtype` ([https://www.tensorflow.org/api_docs/python/tf/dtypes/DType#attributes](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType#attributes)).

The code works for most dtypes but fails to do for `tf.string` as the returned entity is a *pointer* to the object np datatype and not the `object` datatype itself.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.