Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task]: Create a helper function fill_in_missing for TFT Criteo tests #24902

Open
1 of 15 tasks
AnandInguva opened this issue Jan 5, 2023 · 4 comments
Open
1 of 15 tasks

Comments

@AnandInguva
Copy link
Contributor

What needs to happen?

This function should accept a rank 2 SparseTensor, and a default value, and return a rank 1 Tensor. It will assume the input is from a VarLenFeature and has dimensions [batch_size, 0] or [batch_size, 1] depending on the max size of the feature over the batch. It's assumed each feature has 0 or 1 values (0 for missing, 1 for present).

It will emit a Tensor which is constructed using the code

  feature = tf.sparse_to_dense(
      feature.indices, [feature.dense_shape[0], 1], feature.values,
      default_value=-1)
  feature = tf.squeeze(feature, axis=1)

Issue Priority

Priority: 3 (nice-to-have improvement)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@smeet07
Copy link
Contributor

smeet07 commented Apr 10, 2023

.take-issue

@smeet07
Copy link
Contributor

smeet07 commented Apr 10, 2023

@AnandInguva where should I put this helper function?

@AnandInguva
Copy link
Contributor Author

AnandInguva commented Apr 11, 2023

This is the place that needs this feature.

# TODO(https://github.com/apache/beam/issues/24902):

@smeet07
Copy link
Contributor

smeet07 commented Apr 11, 2023

R: @AnandInguva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants