mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-13 14:48:54 +02:00
197bf2c563
Open sourcing Aggregation Framework, a config-driven Summingbird based framework for generating real-time and batch aggregate features to be consumed by ML models.
20 lines
680 B
Scala
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]])
|
|
}
|