Skip to content

On RemoveAllColumnsExceptForTransform, the size of the writables is expected to be different that the columns to keep #10114

@nojuliang

Description

@nojuliang

Refering to this:
https://github.com/deeplearning4j/deeplearning4j/blame/7c01957162ea55f19d5a406880434ab96770c339/datavec/datavec-api/src/main/java/org/datavec/api/transform/transform/column/RemoveAllColumnsExceptForTransform.java#L89C20-L89C20

It is expected to have writables size >= inputSchema.numColumns()

So instead of
if (writables.size() != inputSchema.numColumns()) { throw new IllegalStateException("Cannot execute transform: input writables list length (" + writables.size() + ") does not " + "match expected number of elements (schema: " + inputSchema.numColumns() + "). Transform = " + toString()); }

shouldn't you have something like this:
if (writables.size() < inputSchema.numColumns()) { throw new IllegalStateException("Cannot execute transform: input writables list length (" + writables.size() + ") is less than " + "expected number of elements (schema: " + inputSchema.numColumns() + "). Transform = " + toString()); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions