in src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/PropertyGraphTrainingDataConfigWriterV2.java [253:302]
private void writeEdgeFeatures(LabelSchema labelSchema) throws IOException {
Label label = labelSchema.label();
Collection<PropertySchema> propertySchemas = labelSchema.propertySchemas();
generator.writeArrayFieldStart("features");
ElementConfig edgeConfig = config.edgeConfig();
for (PropertySchema propertySchema : propertySchemas) {
String column = propertySchema.nameWithoutDataType();
if (edgeConfig.hasClassificationSpecificationForProperty(label, column)) {
continue;
}
if (!config.allowFeatureEncoding()) {
writeNoneFeature(propertySchema);
} else {
if (edgeConfig.allowAutoInferFeature(label, column)) {
writeAutoInferredFeature(propertySchema);
}
if (edgeConfig.hasNoneFeatureSpecification(label, column)) {
writeNoneFeature(propertySchema);
}
if (edgeConfig.hasTfIdfSpecification(label, column)) {
writeTfIdfFeature(propertySchema, edgeConfig.getTfIdfSpecification(label, column));
}
if (edgeConfig.hasDatetimeSpecification(label, column)) {
writeDatetimeFeature(propertySchema, edgeConfig.getDatetimeSpecification(label, column));
}
if (edgeConfig.hasWord2VecSpecification(label, column)) {
writeWord2VecFeature(propertySchema, edgeConfig.getWord2VecSpecification(label, column));
}
if (edgeConfig.hasFastTextSpecification(label, column)) {
writeFastTextFeature(propertySchema, edgeConfig.getFastTextSpecification(label, column));
}
if (edgeConfig.hasSbertSpecification(label, column)) {
writeSbertFeature(propertySchema, edgeConfig.getSbertSpecification(label, column));
}
if (edgeConfig.hasNumericalBucketSpecification(label, column)) {
writeNumericalBucketFeature(propertySchema, edgeConfig.getNumericalBucketSpecification(label, column));
}
}
}
for (FeatureOverrideConfigV2 featureOverride : edgeConfig.getFeatureOverrides(label)) {
writeFeatureOverride(labelSchema, featureOverride, edgeConfig);
}
generator.writeEndArray();
}