Skip to content

Allow different input types for DataStats transform by default #6844

@surajpaib

Description

@surajpaib

Is your feature request related to a problem? Please describe.
Currently DataStats supports Ndarray or Tensor and breaks by default for any other data type if the shape attribute is not available.

There are four items for DataStats and in the default behavior,

  1. data_type: Works irrespective of the provided type.
  2. data_shape: Breaks when shape attribute is missing
  3. value_range: Works irrespective of provided type as there is a conditional check for type
  4. data_value: Off by default

Describe the solution you'd like
Could we streamline 2 and 3 so that there is a conditional check for the data_shape similar to type checks for value_range?

if self.value_range if value_range is None else value_range:

It makes sense that they would work the same and either both break by default or handle arbitrary types by default.

Describe alternatives you've considered
Setting data_shape to False explicitly works for arbitrary types.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions