Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Sep 22, 2025

example to dict

  1. treat feature values as lists instead of single value if the feature only contains single scalar
  2. support the conversion of list to ndarray with proper type to retain the feature type

dict to example

  1. Check the type for numeric feature as they might be float instead of int which we could not rely on the first number of the list to determine the type.

move script to internal codebase

  • Unit test requires using internal module (checked by our kokor check)

@copybara-service copybara-service bot changed the title Move and refactor tf_examples_to_dict to handle feature values as lists and support the conversion of list to ndarray with proper type. *example to dict* Sep 24, 2025
1. treat feature values as lists instead of single value if the feature only contains single scalar
2. support the conversion of list to ndarray with proper type to retain the feature type

*dict to example*
1. Check the type for numeric feature as they might be float instead of int which we could not rely on the first number of the list to determine the type.

*move script to internal codebase*
* Unit test requires using internal module (checked by our kokor check)

PiperOrigin-RevId: 810197698
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants