blob: f20214e4a08a9d47b251f585a8c9ff71a6270645 [file] [log] [blame]
// Copyright (c) 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Contains features required for AssistRanker model inference and training.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package machine_intelligence;
// Generic message that can contain a variety of data types.
message Feature {
oneof feature_type {
// Bool values are used for scalar features.
bool bool_value = 1;
// Float and int values can be used for scalar and bucketized features.
float float_value = 2;
int32 int32_value = 3;
// String values are used for one-hot features.
bytes string_value = 4;
}
}
// RankerExample protos contain a set of features to be used as input for
// AssistRanker inference, and optionally a target for training.
message RankerExample {
// Input features for the ranker model. This is the only field that is
// required for inference.
map<string, Feature> features = 1;
// This field represents the ground truth that the ranker is
// expected to predict, and is typically derived from user feedback. It is
// used for training only and is not required for inference.
optional Feature target = 2;
}