mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
Delete cr-mixer/thrift/src/main/thrift directory
This commit is contained in:
parent
d2365ea66c
commit
56fa226967
|
@ -1,48 +0,0 @@
|
|||
create_thrift_libraries(
|
||||
base_name = "thrift",
|
||||
sources = ["*.thrift"],
|
||||
platform = "java8",
|
||||
tags = ["bazel-compatible"],
|
||||
dependency_roots = [
|
||||
"finatra-internal/thrift/src/main/thrift",
|
||||
"product-mixer/core/src/main/thrift/com/twitter/product_mixer/core:thrift",
|
||||
"src/thrift/com/twitter/ads/schema:common",
|
||||
"src/thrift/com/twitter/ml/api:data",
|
||||
"src/thrift/com/twitter/recos:recos-common",
|
||||
"src/thrift/com/twitter/simclusters_v2:simclusters_v2-thrift",
|
||||
"src/thrift/com/twitter/timelines/render:thrift",
|
||||
"strato/config/src/thrift/com/twitter/strato/graphql",
|
||||
"strato/config/src/thrift/com/twitter/strato/graphql:api-media-graphql",
|
||||
"strato/config/src/thrift/com/twitter/strato/graphql:topics-graphql",
|
||||
],
|
||||
generate_languages = [
|
||||
"java",
|
||||
"scala",
|
||||
"strato",
|
||||
],
|
||||
provides_java_name = "cr-mixer-thrift-java",
|
||||
provides_scala_name = "cr-mixer-thrift-scala",
|
||||
)
|
||||
|
||||
create_thrift_libraries(
|
||||
base_name = "cr-mixer-scribe",
|
||||
sources = ["*.thrift"],
|
||||
tags = ["bazel-compatible"],
|
||||
dependency_roots = [
|
||||
"finatra-internal/thrift/src/main/thrift",
|
||||
"product-mixer/core/src/main/thrift/com/twitter/product_mixer/core:thrift",
|
||||
"src/thrift/com/twitter/ads/schema:common",
|
||||
"src/thrift/com/twitter/ml/api:data",
|
||||
"src/thrift/com/twitter/recos:recos-common",
|
||||
"src/thrift/com/twitter/simclusters_v2:simclusters_v2-thrift",
|
||||
"src/thrift/com/twitter/timelines/render:thrift",
|
||||
"strato/config/src/thrift/com/twitter/strato/graphql",
|
||||
],
|
||||
generate_languages = [
|
||||
"java",
|
||||
"scala",
|
||||
"strato",
|
||||
],
|
||||
provides_java_name = "cr-mixer-scribe-java",
|
||||
provides_scala_name = "cr-mixer-scribe-scala",
|
||||
)
|
|
@ -1,33 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "product.thrift"
|
||||
include "product_context.thrift"
|
||||
|
||||
include "com/twitter/product_mixer/core/client_context.thrift"
|
||||
include "com/twitter/ads/schema/shared.thrift"
|
||||
|
||||
struct AdsRequest {
|
||||
1: required client_context.ClientContext clientContext
|
||||
2: required product.Product product
|
||||
# Product-specific parameters should be placed in the Product Context
|
||||
3: optional product_context.ProductContext productContext
|
||||
4: optional list<i64> excludedTweetIds (personalDataType = 'TweetId')
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct AdsResponse {
|
||||
1: required list<AdTweetRecommendation> ads
|
||||
} (persisted='true')
|
||||
|
||||
struct AdTweetRecommendation {
|
||||
1: required i64 tweetId (personalDataType = 'TweetId')
|
||||
2: required double score
|
||||
3: optional list<LineItemInfo> lineItems
|
||||
|
||||
} (persisted='true')
|
||||
|
||||
struct LineItemInfo {
|
||||
1: required i64 lineItemId (personalDataType = 'LineItemId')
|
||||
2: required shared.LineItemObjective lineItemObjective
|
||||
} (persisted='true')
|
|
@ -1,21 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "source_type.thrift"
|
||||
include "com/twitter/simclusters_v2/identifier.thrift"
|
||||
|
||||
struct SimilarityEngine {
|
||||
1: required source_type.SimilarityEngineType similarityEngineType
|
||||
2: optional string modelId
|
||||
3: optional double score
|
||||
} (persisted='true')
|
||||
|
||||
struct CandidateGenerationKey {
|
||||
1: required source_type.SourceType sourceType
|
||||
2: required i64 sourceEventTime (personalDataType = 'PrivateTimestamp')
|
||||
3: required identifier.InternalId id
|
||||
4: required string modelId
|
||||
5: optional source_type.SimilarityEngineType similarityEngineType
|
||||
6: optional list<SimilarityEngine> contributingSimilarityEngine
|
||||
} (persisted='true')
|
|
@ -1,104 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "ads.thrift"
|
||||
include "candidate_generation_key.thrift"
|
||||
include "product.thrift"
|
||||
include "product_context.thrift"
|
||||
include "validation.thrift"
|
||||
include "metric_tags.thrift"
|
||||
include "related_tweet.thrift"
|
||||
include "uteg.thrift"
|
||||
include "frs_based_tweet.thrift"
|
||||
include "related_video_tweet.thrift"
|
||||
include "topic_tweet.thrift"
|
||||
|
||||
include "com/twitter/product_mixer/core/client_context.thrift"
|
||||
include "com/twitter/timelines/render/response.thrift"
|
||||
include "finatra-thrift/finatra_thrift_exceptions.thrift"
|
||||
include "com/twitter/strato/graphql/slice.thrift"
|
||||
|
||||
struct CrMixerTweetRequest {
|
||||
1: required client_context.ClientContext clientContext
|
||||
2: required product.Product product
|
||||
# Product-specific parameters should be placed in the Product Context
|
||||
3: optional product_context.ProductContext productContext
|
||||
4: optional list<i64> excludedTweetIds (personalDataType = 'TweetId')
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct TweetRecommendation {
|
||||
1: required i64 tweetId (personalDataType = 'TweetId')
|
||||
2: required double score
|
||||
3: optional list<metric_tags.MetricTag> metricTags
|
||||
# 4: the author of the tweet candidate. To be used by Content-Mixer to unblock the Hydra experiment.
|
||||
4: optional i64 authorId (personalDataType = 'UserId')
|
||||
# 5: extra info about candidate generation. To be used by Content-Mixer to unblock the Hydra experiment.
|
||||
5: optional candidate_generation_key.CandidateGenerationKey candidateGenerationKey
|
||||
# 1001: the latest timestamp of fav signals. If null, the candidate is not generated from fav signals
|
||||
1001: optional i64 latestSourceSignalTimestampInMillis(personalDataType = 'PublicTimestamp')
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct CrMixerTweetResponse {
|
||||
1: required list<TweetRecommendation> tweets
|
||||
} (persisted='true')
|
||||
|
||||
service CrMixer {
|
||||
CrMixerTweetResponse getTweetRecommendations(1: CrMixerTweetRequest request) throws (
|
||||
# Validation errors - the details of which will be reported to clients on failure
|
||||
1: validation.ValidationExceptionList validationErrors;
|
||||
# Server errors - the details of which will not be reported to clients
|
||||
2: finatra_thrift_exceptions.ServerError serverError
|
||||
)
|
||||
|
||||
# getRelatedTweetsForQueryTweet and getRelatedTweetsForQueryAuthor do very similar things
|
||||
# We can merge these two endpoints into one unified endpoint
|
||||
related_tweet.RelatedTweetResponse getRelatedTweetsForQueryTweet(1: related_tweet.RelatedTweetRequest request) throws (
|
||||
# Validation errors - the details of which will be reported to clients on failure
|
||||
1: validation.ValidationExceptionList validationErrors;
|
||||
# Server errors - the details of which will not be reported to clients
|
||||
2: finatra_thrift_exceptions.ServerError serverError
|
||||
)
|
||||
|
||||
related_tweet.RelatedTweetResponse getRelatedTweetsForQueryAuthor(1: related_tweet.RelatedTweetRequest request) throws (
|
||||
# Validation errors - the details of which will be reported to clients on failure
|
||||
1: validation.ValidationExceptionList validationErrors;
|
||||
# Server errors - the details of which will not be reported to clients
|
||||
2: finatra_thrift_exceptions.ServerError serverError
|
||||
)
|
||||
|
||||
uteg.UtegTweetResponse getUtegTweetRecommendations(1: uteg.UtegTweetRequest request) throws (
|
||||
# Validation errors - the details of which will be reported to clients on failure
|
||||
1: validation.ValidationExceptionList validationErrors;
|
||||
# Server errors - the details of which will not be reported to clients
|
||||
2: finatra_thrift_exceptions.ServerError serverError
|
||||
)
|
||||
|
||||
frs_based_tweet.FrsTweetResponse getFrsBasedTweetRecommendations(1: frs_based_tweet.FrsTweetRequest request) throws (
|
||||
# Validation errors - the details of which will be reported to clients on failure
|
||||
1: validation.ValidationExceptionList validationErrors;
|
||||
# Server errors - the details of which will not be reported to clients
|
||||
2: finatra_thrift_exceptions.ServerError serverError
|
||||
)
|
||||
|
||||
related_video_tweet.RelatedVideoTweetResponse getRelatedVideoTweetsForQueryTweet(1: related_video_tweet.RelatedVideoTweetRequest request) throws (
|
||||
# Validation errors - the details of which will be reported to clients on failure
|
||||
1: validation.ValidationExceptionList validationErrors;
|
||||
# Server errors - the details of which will not be reported to clients
|
||||
2: finatra_thrift_exceptions.ServerError serverError
|
||||
)
|
||||
|
||||
ads.AdsResponse getAdsRecommendations(1: ads.AdsRequest request) throws (
|
||||
# Validation errors - the details of which will be reported to clients on failure
|
||||
1: validation.ValidationExceptionList validationErrors;
|
||||
# Server errors - the details of which will not be reported to clients
|
||||
2: finatra_thrift_exceptions.ServerError serverError
|
||||
)
|
||||
|
||||
topic_tweet.TopicTweetResponse getTopicTweetRecommendations(1: topic_tweet.TopicTweetRequest request) throws (
|
||||
# Validation errors - the details of which will be reported to clients on failure
|
||||
1: validation.ValidationExceptionList validationErrors;
|
||||
# Server errors - the details of which will not be reported to clients
|
||||
2: finatra_thrift_exceptions.ServerError serverError
|
||||
)
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "product.thrift"
|
||||
include "product_context.thrift"
|
||||
include "com/twitter/product_mixer/core/client_context.thrift"
|
||||
|
||||
struct FrsTweetRequest {
|
||||
1: required client_context.ClientContext clientContext
|
||||
2: required product.Product product
|
||||
3: optional product_context.ProductContext productContext
|
||||
# excludedUserIds - user ids to be excluded from FRS candidate generation
|
||||
4: optional list<i64> excludedUserIds (personalDataType = 'UserId')
|
||||
# excludedTweetIds - tweet ids to be excluded from Earlybird candidate generation
|
||||
5: optional list<i64> excludedTweetIds (personalDataType = 'TweetId')
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct FrsTweet {
|
||||
1: required i64 tweetId (personalDataType = 'TweetId')
|
||||
2: required i64 authorId (personalDataType = 'UserId')
|
||||
# skip 3 in case we need tweet score in the future
|
||||
# frsPrimarySource - which FRS candidate source is the primary one to generate this author
|
||||
4: optional i32 frsPrimarySource
|
||||
# frsCandidateSourceScores - FRS candidate sources and the scores for this author
|
||||
# for i32 to algorithm mapping, see https://sourcegraph.twitter.biz/git.twitter.biz/source/-/blob/hermit/hermit-core/src/main/scala/com/twitter/hermit/constants/AlgorithmFeedbackTokens.scala?L12
|
||||
5: optional map<i32, double> frsCandidateSourceScores
|
||||
# frsPrimaryScore - the score of the FRS primary candidate source
|
||||
6: optional double frsAuthorScore
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct FrsTweetResponse {
|
||||
1: required list<FrsTweet> tweets
|
||||
} (persisted='true')
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
|
||||
// NOTE: DO NOT depend on MetricTags for important ML Features or business logic.
|
||||
// MetricTags are meant for stats tracking & debugging purposes ONLY.
|
||||
// cr-mixer may change its definitions & how each candidate is tagged without public notice.
|
||||
// NOTE: TSPS needs the caller (Home) to specify which signal it uses to make Personalized Topics
|
||||
enum MetricTag {
|
||||
// Source Signal Tags
|
||||
TweetFavorite = 0
|
||||
Retweet = 1
|
||||
TrafficAttribution = 2
|
||||
OriginalTweet = 3
|
||||
Reply = 4
|
||||
TweetShare = 5
|
||||
|
||||
UserFollow = 101
|
||||
UserRepeatedProfileVisit = 102
|
||||
|
||||
PushOpenOrNtabClick = 201
|
||||
|
||||
HomeTweetClick = 301
|
||||
HomeVideoView = 302
|
||||
|
||||
// sim engine types
|
||||
SimClustersANN = 401
|
||||
TweetBasedUserTweetGraph = 402
|
||||
TweetBasedTwHINANN = 403
|
||||
ConsumerEmbeddingBasedTwHINANN = 404
|
||||
|
||||
|
||||
// combined engine types
|
||||
UserInterestedIn = 501 // Will deprecate soon
|
||||
LookalikeUTG = 502
|
||||
TwhinCollabFilter = 503
|
||||
|
||||
// Offline Twice
|
||||
TwiceUserId = 601
|
||||
|
||||
// Other Metric Tags
|
||||
RequestHealthFilterPushOpenBasedTweetEmbedding = 701
|
||||
} (persisted='true', hasPersonalData='true')
|
|
@ -1,19 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
# In CrMixer, one org should only have one Product
|
||||
enum Product {
|
||||
Home = 1
|
||||
Notifications = 2
|
||||
Email = 3
|
||||
MoreTweetsModule = 4 # aka RUX
|
||||
ImmersiveMediaViewer = 5
|
||||
VideoCarousel = 6
|
||||
ExploreTopics = 7
|
||||
Ads = 8
|
||||
HomeRealTime = 9 // Home Real-Time Tab is considered as a different Product surface to Home Tab. It's in early experiment phase.
|
||||
TopicLandingPage = 10
|
||||
HomeTopicsBackfill = 11
|
||||
TopicTweetsStrato = 12
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
struct HomeContext {
|
||||
2: optional i32 maxResults // enabled for QuaityFactor related DDGs only
|
||||
} (persisted='true', hasPersonalData='false')
|
||||
|
||||
struct NotificationsContext {
|
||||
1: optional i32 devNull // not being used. it's a placeholder
|
||||
} (persisted='true', hasPersonalData='false')
|
||||
|
||||
struct ExploreContext {
|
||||
1: required bool isVideoOnly
|
||||
} (persisted='true', hasPersonalData='false')
|
||||
|
||||
union ProductContext {
|
||||
1: HomeContext homeContext
|
||||
2: NotificationsContext notificationsContext
|
||||
3: ExploreContext exploreContext
|
||||
} (persisted='true', hasPersonalData='false')
|
|
@ -1,24 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "product.thrift"
|
||||
include "com/twitter/product_mixer/core/client_context.thrift"
|
||||
include "com/twitter/simclusters_v2/identifier.thrift"
|
||||
|
||||
struct RelatedTweetRequest {
|
||||
1: required identifier.InternalId internalId
|
||||
2: required product.Product product
|
||||
3: required client_context.ClientContext clientContext # RUX LogOut will have clientContext.userId = None
|
||||
4: optional list<i64> excludedTweetIds (personalDataType = 'TweetId')
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct RelatedTweet {
|
||||
1: required i64 tweetId (personalDataType = 'TweetId')
|
||||
2: optional double score
|
||||
3: optional i64 authorId (personalDataType = 'UserId')
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct RelatedTweetResponse {
|
||||
1: required list<RelatedTweet> tweets
|
||||
} (persisted='true')
|
|
@ -1,23 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "product.thrift"
|
||||
include "com/twitter/product_mixer/core/client_context.thrift"
|
||||
include "com/twitter/simclusters_v2/identifier.thrift"
|
||||
|
||||
struct RelatedVideoTweetRequest {
|
||||
1: required identifier.InternalId internalId
|
||||
2: required product.Product product
|
||||
3: required client_context.ClientContext clientContext # RUX LogOut will have clientContext.userId = None
|
||||
4: optional list<i64> excludedTweetIds (personalDataType = 'TweetId')
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct RelatedVideoTweet {
|
||||
1: required i64 tweetId (personalDataType = 'TweetId')
|
||||
2: optional double score
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct RelatedVideoTweetResponse {
|
||||
1: required list<RelatedVideoTweet> tweets
|
||||
} (persisted='true')
|
|
@ -1,168 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "ads.thrift"
|
||||
include "candidate_generation_key.thrift"
|
||||
include "cr_mixer.thrift"
|
||||
include "metric_tags.thrift"
|
||||
include "product.thrift"
|
||||
include "related_tweet.thrift"
|
||||
include "source_type.thrift"
|
||||
include "uteg.thrift"
|
||||
include "com/twitter/ml/api/data.thrift"
|
||||
include "com/twitter/simclusters_v2/identifier.thrift"
|
||||
|
||||
struct VITTweetCandidatesScribe {
|
||||
1: required i64 uuid (personalDataType = 'UniversallyUniqueIdentifierUuid') # RequestUUID - unique scribe id for every request that comes in. Same request but different stages of scribe log (FetchCandidate, Filter, etc) share the same uuid
|
||||
2: required i64 userId (personalDataType = 'UserId')
|
||||
3: required list<VITTweetCandidateScribe> candidates
|
||||
7: required product.Product product
|
||||
8: required list<ImpressesedBucketInfo> impressedBuckets
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct VITTweetCandidateScribe {
|
||||
1: required i64 tweetId (personalDataType = 'TweetId')
|
||||
2: required i64 authorId (personalDataType = 'UserId')
|
||||
3: required double score
|
||||
4: required list<metric_tags.MetricTag> metricTags
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct GetTweetsRecommendationsScribe {
|
||||
1: required i64 uuid (personalDataType = 'UniversallyUniqueIdentifierUuid') # RequestUUID - unique scribe id for every request that comes in. Same request but different stages of scribe log (FetchCandidate, Filter, etc) share the same uuid
|
||||
2: required i64 userId (personalDataType = 'UserId')
|
||||
3: required Result result
|
||||
4: optional i64 traceId
|
||||
5: optional PerformanceMetrics performanceMetrics
|
||||
6: optional list<ImpressesedBucketInfo> impressedBuckets
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct SourceSignal {
|
||||
# optional, since that the next step covers all info here
|
||||
1: optional identifier.InternalId id
|
||||
} (persisted='true')
|
||||
|
||||
struct PerformanceMetrics {
|
||||
1: optional i64 latencyMs
|
||||
} (persisted='true')
|
||||
|
||||
struct TweetCandidateWithMetadata {
|
||||
1: required i64 tweetId (personalDataType = 'TweetId')
|
||||
2: optional candidate_generation_key.CandidateGenerationKey candidateGenerationKey
|
||||
3: optional i64 authorId (personalDataType = 'UserId') # only for InterleaveResult for hydrating training data
|
||||
4: optional double score # score with respect to candidateGenerationKey
|
||||
5: optional data.DataRecord dataRecord # attach any features to this candidate
|
||||
6: optional i32 numCandidateGenerationKeys # num CandidateGenerationKeys generating this tweetId
|
||||
} (persisted='true')
|
||||
|
||||
struct FetchSignalSourcesResult {
|
||||
1: optional set<SourceSignal> signals
|
||||
} (persisted='true')
|
||||
|
||||
struct FetchCandidatesResult {
|
||||
1: optional list<TweetCandidateWithMetadata> tweets
|
||||
} (persisted='true')
|
||||
|
||||
struct PreRankFilterResult {
|
||||
1: optional list<TweetCandidateWithMetadata> tweets
|
||||
} (persisted='true')
|
||||
|
||||
struct InterleaveResult {
|
||||
1: optional list<TweetCandidateWithMetadata> tweets
|
||||
} (persisted='true')
|
||||
|
||||
struct RankResult {
|
||||
1: optional list<TweetCandidateWithMetadata> tweets
|
||||
} (persisted='true')
|
||||
|
||||
struct TopLevelApiResult {
|
||||
1: required i64 timestamp (personalDataType = 'PrivateTimestamp')
|
||||
2: required cr_mixer.CrMixerTweetRequest request
|
||||
3: required cr_mixer.CrMixerTweetResponse response
|
||||
} (persisted='true')
|
||||
|
||||
union Result {
|
||||
1: FetchSignalSourcesResult fetchSignalSourcesResult
|
||||
2: FetchCandidatesResult fetchCandidatesResult
|
||||
3: PreRankFilterResult preRankFilterResult
|
||||
4: InterleaveResult interleaveResult
|
||||
5: RankResult rankResult
|
||||
6: TopLevelApiResult topLevelApiResult
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct ImpressesedBucketInfo {
|
||||
1: required i64 experimentId (personalDataType = 'ExperimentId')
|
||||
2: required string bucketName
|
||||
3: required i32 version
|
||||
} (persisted='true')
|
||||
|
||||
############# RelatedTweets Scribe #############
|
||||
|
||||
struct GetRelatedTweetsScribe {
|
||||
1: required i64 uuid (personalDataType = 'UniversallyUniqueIdentifierUuid') # RequestUUID - unique scribe id for every request that comes in. Same request but different stages of scribe log (FetchCandidate, Filter, etc) share the same uuid
|
||||
2: required identifier.InternalId internalId
|
||||
3: required RelatedTweetResult relatedTweetResult
|
||||
4: optional i64 requesterId (personalDataType = 'UserId')
|
||||
5: optional i64 guestId (personalDataType = 'GuestId')
|
||||
6: optional i64 traceId
|
||||
7: optional PerformanceMetrics performanceMetrics
|
||||
8: optional list<ImpressesedBucketInfo> impressedBuckets
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct RelatedTweetTopLevelApiResult {
|
||||
1: required i64 timestamp (personalDataType = 'PrivateTimestamp')
|
||||
2: required related_tweet.RelatedTweetRequest request
|
||||
3: required related_tweet.RelatedTweetResponse response
|
||||
} (persisted='true')
|
||||
|
||||
union RelatedTweetResult {
|
||||
1: RelatedTweetTopLevelApiResult relatedTweetTopLevelApiResult
|
||||
2: FetchCandidatesResult fetchCandidatesResult
|
||||
3: PreRankFilterResult preRankFilterResult # results after seqential filters
|
||||
# if later we need rankResult, we can add it here
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
############# UtegTweets Scribe #############
|
||||
|
||||
struct GetUtegTweetsScribe {
|
||||
1: required i64 uuid (personalDataType = 'UniversallyUniqueIdentifierUuid') # RequestUUID - unique scribe id for every request that comes in. Same request but different stages of scribe log (FetchCandidate, Filter, etc) share the same uuid
|
||||
2: required i64 userId (personalDataType = 'UserId')
|
||||
3: required UtegTweetResult utegTweetResult
|
||||
4: optional i64 traceId
|
||||
5: optional PerformanceMetrics performanceMetrics
|
||||
6: optional list<ImpressesedBucketInfo> impressedBuckets
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct UtegTweetTopLevelApiResult {
|
||||
1: required i64 timestamp (personalDataType = 'PrivateTimestamp')
|
||||
2: required uteg.UtegTweetRequest request
|
||||
3: required uteg.UtegTweetResponse response
|
||||
} (persisted='true')
|
||||
|
||||
union UtegTweetResult {
|
||||
1: UtegTweetTopLevelApiResult utegTweetTopLevelApiResult
|
||||
2: FetchCandidatesResult fetchCandidatesResult
|
||||
# if later we need rankResult, we can add it here
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
############# getAdsRecommendations() Scribe #############
|
||||
|
||||
struct GetAdsRecommendationsScribe {
|
||||
1: required i64 uuid (personalDataType = 'UniversallyUniqueIdentifierUuid') # RequestUUID - unique scribe id for every request that comes in. Same request but different stages of scribe log (FetchCandidate, Filter, etc) share the same uuid
|
||||
2: required i64 userId (personalDataType = 'UserId')
|
||||
3: required AdsRecommendationsResult result
|
||||
4: optional i64 traceId
|
||||
5: optional PerformanceMetrics performanceMetrics
|
||||
6: optional list<ImpressesedBucketInfo> impressedBuckets
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct AdsRecommendationTopLevelApiResult {
|
||||
1: required i64 timestamp (personalDataType = 'PrivateTimestamp')
|
||||
2: required ads.AdsRequest request
|
||||
3: required ads.AdsResponse response
|
||||
} (persisted='true')
|
||||
|
||||
union AdsRecommendationsResult{
|
||||
1: AdsRecommendationTopLevelApiResult adsRecommendationTopLevelApiResult
|
||||
2: FetchCandidatesResult fetchCandidatesResult
|
||||
}(persisted='true', hasPersonalData = 'true')
|
|
@ -1,123 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
// Due to legacy reason, SourceType used to represent both SourceSignalType and SimilarityEngineType
|
||||
// Hence, you can see several SourceType such as UserInterestedIn, HashSpace, etc.
|
||||
// Moving forward, SourceType will be used for SourceSignalType ONLY. eg., TweetFavorite, UserFollow
|
||||
// We will create a new SimilarityEngineType to separate them. eg., SimClustersANN
|
||||
enum SourceType {
|
||||
// Tweet based Source Signal
|
||||
TweetFavorite = 0
|
||||
Retweet = 1
|
||||
TrafficAttribution = 2 // Traffic Attribution will be migrated over in Q3
|
||||
OriginalTweet = 3
|
||||
Reply = 4
|
||||
TweetShare = 5
|
||||
GoodTweetClick = 6 // total dwell time > N seconds after click on the tweet
|
||||
VideoTweetQualityView = 7
|
||||
VideoTweetPlayback50 = 8
|
||||
|
||||
// UserId based Source Signal (includes both Producer/Consumer)
|
||||
UserFollow = 101
|
||||
UserRepeatedProfileVisit = 102
|
||||
|
||||
CurrentUser_DEPRECATED = 103
|
||||
|
||||
RealGraphOon = 104
|
||||
FollowRecommendation = 105
|
||||
|
||||
TwiceUserId = 106
|
||||
UserTrafficAttributionProfileVisit = 107
|
||||
GoodProfileClick = 108 // total dwell time > N seconds after click into the profile page
|
||||
|
||||
// (Notification) Tweet based Source Signal
|
||||
NotificationClick = 201
|
||||
|
||||
// (Home) Tweet based Source Signal
|
||||
HomeTweetClick = 301
|
||||
HomeVideoView = 302
|
||||
HomeSongbirdShowMore = 303
|
||||
|
||||
// Topic based Source Signal
|
||||
TopicFollow = 401 // Deprecated
|
||||
PopularTopic = 402 // Deprecated
|
||||
|
||||
// Old CR code
|
||||
UserInterestedIn = 501 // Deprecated
|
||||
TwiceInterestedIn = 502 // Deprecated
|
||||
MBCG = 503 // Deprecated
|
||||
HashSpace = 504 // Deprecated
|
||||
|
||||
// Old CR code
|
||||
Cluster = 601 // Deprecated
|
||||
|
||||
// Search based Source Signal
|
||||
SearchProfileClick = 701 // Deprecated
|
||||
SearchTweetClick = 702 // Deprecated
|
||||
|
||||
// Graph based Source
|
||||
StrongTiePrediction = 801 // STP
|
||||
TwiceClustersMembers = 802
|
||||
Lookalike = 803 // Deprecated
|
||||
RealGraphIn = 804
|
||||
|
||||
// Current requester User Id. It is only used for scribing. Placeholder value
|
||||
RequestUserId = 1001
|
||||
// Current request Tweet Id used in RelatedTweet. Placeholder value
|
||||
RequestTweetId = 1002
|
||||
|
||||
// Negative Signals
|
||||
TweetReport = 1101
|
||||
TweetDontLike = 1102
|
||||
TweetSeeFewer = 1103
|
||||
AccountBlock = 1104
|
||||
AccountMute = 1105
|
||||
|
||||
// Aggregated Signals
|
||||
TweetAggregation = 1201
|
||||
ProducerAggregation = 1202
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
enum SimilarityEngineType {
|
||||
SimClustersANN = 1
|
||||
TweetBasedUserTweetGraph = 2
|
||||
TweetBasedTwHINANN = 3
|
||||
Follow2VecANN = 4 // ConsumerEmbeddingBasedFollow2Vec
|
||||
QIG = 5
|
||||
OfflineSimClustersANN = 6
|
||||
LookalikeUTG_DEPRECATED = 7
|
||||
ProducerBasedUserTweetGraph = 8
|
||||
FrsUTG_DEPRECATED = 9
|
||||
RealGraphOonUTG_DEPRECATED = 10
|
||||
ConsumerEmbeddingBasedTwHINANN = 11
|
||||
TwhinCollabFilter = 12
|
||||
TwiceUTG_DEPRECATED = 13
|
||||
ConsumerEmbeddingBasedTwoTowerANN = 14
|
||||
TweetBasedBeTANN = 15
|
||||
StpUTG_DEPRECATED = 16
|
||||
UTEG = 17
|
||||
ROMR = 18
|
||||
ConsumersBasedUserTweetGraph = 19
|
||||
TweetBasedUserVideoGraph = 20
|
||||
CertoTopicTweet = 24
|
||||
ConsumersBasedUserAdGraph = 25
|
||||
TweetBasedUserAdGraph = 26
|
||||
SkitTfgTopicTweet = 27
|
||||
ConsumerBasedWalsANN = 28
|
||||
ProducerBasedUserAdGraph = 29
|
||||
SkitHighPrecisionTopicTweet = 30
|
||||
SkitInterestBrowserTopicTweet = 31
|
||||
SkitProducerBasedTopicTweet = 32
|
||||
ExploreTripOfflineSimClustersTweets = 33
|
||||
DiffusionBasedTweet = 34
|
||||
ConsumersBasedUserVideoGraph = 35
|
||||
|
||||
// In network
|
||||
EarlybirdRecencyBasedSimilarityEngine = 21
|
||||
EarlybirdModelBasedSimilarityEngine = 22
|
||||
EarlybirdTensorflowBasedSimilarityEngine = 23
|
||||
// Composite
|
||||
TweetBasedUnifiedSimilarityEngine = 1001
|
||||
ProducerBasedUnifiedSimilarityEngine = 1002
|
||||
} (persisted='true')
|
|
@ -1,28 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "com/twitter/product_mixer/core/client_context.thrift"
|
||||
include "product.thrift"
|
||||
include "product_context.thrift"
|
||||
include "source_type.thrift"
|
||||
|
||||
|
||||
struct TopicTweetRequest {
|
||||
1: required client_context.ClientContext clientContext
|
||||
2: required product.Product product
|
||||
3: required list<i64> topicIds
|
||||
5: optional product_context.ProductContext productContext
|
||||
6: optional list<i64> excludedTweetIds (personalDataType = 'TweetId')
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct TopicTweet {
|
||||
1: required i64 tweetId (personalDataType = 'TweetId')
|
||||
2: required double score
|
||||
3: required source_type.SimilarityEngineType similarityEngineType
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct TopicTweetResponse {
|
||||
1: required map<i64, list<TopicTweet>> tweets
|
||||
} (persisted='true')
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
include "product.thrift"
|
||||
include "product_context.thrift"
|
||||
|
||||
include "com/twitter/product_mixer/core/client_context.thrift"
|
||||
include "com/twitter/recos/recos_common.thrift"
|
||||
|
||||
struct UtegTweetRequest {
|
||||
1: required client_context.ClientContext clientContext
|
||||
2: required product.Product product
|
||||
# Product-specific parameters should be placed in the Product Context
|
||||
3: optional product_context.ProductContext productContext
|
||||
4: optional list<i64> excludedTweetIds (personalDataType = 'TweetId')
|
||||
} (persisted='true', hasPersonalData='true')
|
||||
|
||||
struct UtegTweet {
|
||||
// tweet id
|
||||
1: required i64 tweetId(personalDataType = 'TweetId')
|
||||
// sum of weights of seed users who engaged with the tweet.
|
||||
// If a user engaged with the same tweet twice, liked it and retweeted it, then his/her weight was counted twice.
|
||||
2: required double score
|
||||
// user social proofs per engagement type
|
||||
3: required map<recos_common.SocialProofType, list<i64>> socialProofByType(personalDataTypeKey='EngagementTypePrivate', personalDataTypeValue='UserId')
|
||||
} (persisted='true', hasPersonalData = 'true')
|
||||
|
||||
struct UtegTweetResponse {
|
||||
1: required list<UtegTweet> tweets
|
||||
} (persisted='true')
|
|
@ -1,19 +0,0 @@
|
|||
namespace java com.twitter.cr_mixer.thriftjava
|
||||
#@namespace scala com.twitter.cr_mixer.thriftscala
|
||||
#@namespace strato com.twitter.cr_mixer
|
||||
|
||||
// ValidationErrorCode is used to identify classes of client errors returned from a Product Mixer
|
||||
// service. Use [[PipelineFailureExceptionMapper]] to adapt pipeline failures into thrift errors.
|
||||
enum ValidationErrorCode {
|
||||
PRODUCT_DISABLED = 1
|
||||
PLACEHOLDER_2 = 2
|
||||
} (hasPersonalData='false')
|
||||
|
||||
exception ValidationException {
|
||||
1: ValidationErrorCode errorCode
|
||||
2: string msg
|
||||
} (hasPersonalData='false')
|
||||
|
||||
exception ValidationExceptionList {
|
||||
1: list<ValidationException> errors
|
||||
} (hasPersonalData='false')
|
Loading…
Reference in New Issue
Block a user