the-algorithm/timelines/data_processing/ml_util/aggregation_framework/package.scala
twitter-team 197bf2c563 Open-sourcing Timelines Aggregation Framework
Open sourcing Aggregation Framework, a config-driven Summingbird based framework for generating real-time and batch aggregate features to be consumed by ML models.
2023-04-28 14:17:02 -05:00

20 lines
680 B
Scala

package com.twitter.timelines.data_processing.ml_util
import com.twitter.ml.api.DataRecord
package object aggregation_framework {
object AggregateType extends Enumeration {
type AggregateType = Value
val User, UserAuthor, UserEngager, UserMention, UserRequestHour, UserRequestDow,
UserOriginalAuthor, UserList, UserTopic, UserInferredTopic, UserMediaUnderstandingAnnotation =
Value
}
type AggregateUserEntityKey = (Long, AggregateType.Value, Option[Long])
case class MergedRecordsDescriptor(
userId: Long,
keyedRecords: Map[AggregateType.Value, Option[KeyedRecord]],
keyedRecordMaps: Map[AggregateType.Value, Option[KeyedRecordMap]])
}