in src/main/java/com/amazonaws/sagemaker/helper/DataConversionHelper.java [93:112]
public DefaultLeapFrame convertInputToLeapFrame(final DataSchema schema, final List<Object> data) {
final int inputLength = schema.getInput().size();
final List<StructField> structFieldList = Lists.newArrayList();
final List<Object> valueList = Lists.newArrayList();
for (int idx = 0; idx < inputLength; ++idx) {
ColumnSchema sc = schema.getInput().get(idx);
structFieldList
.add(new StructField(sc.getName(), this.convertInputToMLeapInputType(sc.getType(), sc.getStruct())));
valueList.add(this.convertInputDataToJavaType(sc.getType(), sc.getStruct(), data.get(idx)));
}
final StructType mleapSchema = leapFrameBuilder.createSchema(structFieldList);
final Row currentRow = support.createRowFromIterable(valueList);
final List<Row> rows = Lists.newArrayList();
rows.add(currentRow);
return leapFrameBuilder.createFrame(mleapSchema, rows);
}