Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class RptInferenceClient implements RecommendationClient {
private static final Logger logger = LoggerFactory.getLogger(RptInferenceClient.class);

// RPT-1 specific: the placeholder value that marks a column as a prediction target in the request
public static final String PREDICT = "[PREDICT]";
public static final String PREDICTION_PLACEHOLDER = "[PREDICT]";

private static final Retry INFERENCE_RETRY = buildInferenceRetry();

Expand Down Expand Up @@ -111,7 +111,7 @@ static String computeSyntheticKey(Map<String, Object> row, List<String> keyNames
private static CdsData preparePredictRow(CdsData predictRow, List<String> predictionColumns) {
Map<String, Object> preparedPredictRowMap = new HashMap<>(predictRow);
for (String col : predictionColumns) {
preparedPredictRowMap.putIfAbsent(col, PREDICT);
preparedPredictRowMap.putIfAbsent(col, PREDICTION_PLACEHOLDER);
}
return CdsData.create(preparedPredictRowMap);
}
Expand All @@ -127,7 +127,7 @@ private static PredictRequestPayload buildRequest(
col ->
TargetColumnConfig.create()
.name(col)
.predictionPlaceholder(PredictionPlaceholder.create(PREDICT))
.predictionPlaceholder(PredictionPlaceholder.create(PREDICTION_PLACEHOLDER))
.taskType(TargetColumnConfig.TaskTypeEnum.CLASSIFICATION))
.toList();

Expand Down