Skip to content
Permalink
Browse files
Remove stats collection code measuring how often Tweets from specific…
… user groups are served
twitter-team committed Mar 31, 2023
1 parent 64e7548 commit ec83d01
Showing 5 changed files with 3 additions and 66 deletions.
@@ -220,30 +220,7 @@ object HomeTweetTypePredicates {
_.getOrElse(ConversationModule2DisplayedTweetsFeature, false)),
("conversation_module_has_gap", _.getOrElse(ConversationModuleHasGapFeature, false)),
("served_in_recap_tweet_candidate_module_injection", _ => false),
("served_in_threaded_conversation_module", _ => false),
(

This comment has been minimized.

Copy link
@BankkRoll

BankkRoll Apr 1, 2023

  "author_is_not_elon",

This comment has been minimized.

Copy link
@rafaelbeckel

rafaelbeckel Apr 1, 2023

If you're a human reading this from Mars in 3023, consider this as my cave painting: open_hands

"author_is_elon",

This comment has been minimized.

Copy link
@karolsw3

karolsw3 Mar 31, 2023

eyes camera_flashraised_eyebrow

This comment has been minimized.

Copy link
@iib0011

iib0011 Mar 31, 2023

lol

This comment has been minimized.

Copy link
@TesDevelopment

TesDevelopment Mar 31, 2023

LMAO

This comment has been minimized.

Copy link
@RevolvingDCON

RevolvingDCON Mar 31, 2023

Embarrassing.

This comment has been minimized.

Copy link
@Shreenabh664

Shreenabh664 Mar 31, 2023

lmao

This comment has been minimized.

Copy link
@edmundpf

edmundpf Mar 31, 2023

this will go down in history as the most meme Github commit of all time

This comment has been minimized.

Copy link
@dolfies

dolfies Mar 31, 2023

That's just sad ngl

This comment has been minimized.

Copy link
@RevolvingDCON

RevolvingDCON Mar 31, 2023

Tracking metrics on an individual user and hard-coding them into the source is the cringiest, most insecure, egotistical thing I've ever seen. How weak do you need to be as a person to instruct your developers to build you a personal dashboard just so you can track how liked you are in real time?

This comment has been minimized.

Copy link
@McShauno

McShauno Mar 31, 2023

This line. Right here. Hilarious.

This comment has been minimized.

Copy link
@sy1vi3

sy1vi3 Mar 31, 2023

lmfao

This comment has been minimized.

Copy link
@samedovzaur

samedovzaur Mar 31, 2023

lmfaoo

This comment has been minimized.

Copy link
@avin-kavish

avin-kavish Mar 31, 2023

Tracking metrics on an individual user and hard-coding them into the source is the cringiest, most insecure, egotistical thing I've ever seen

This looks like an experiment to measure the impact on code changes on the distribution of tweets of different user groups. (comment down below confirms it). Elon is a good candidate for the test because he is the most followed user, controversial and can provide consent to collection.

This comment has been minimized.

Copy link
@cosmtrek

cosmtrek Apr 1, 2023

hhh

This comment has been minimized.

Copy link
@baldoOsu

baldoOsu Apr 1, 2023

HAHAHAHAHAHA

This comment has been minimized.

Copy link
@kleberbaum

kleberbaum Apr 1, 2023

lgmt rocket

This comment has been minimized.

Copy link
@brandensilva

brandensilva Apr 1, 2023

Elon's reputation proceeds him...

This comment has been minimized.

Copy link
@AL1L

AL1L Apr 1, 2023

Totally not biased

This comment has been minimized.

Copy link
@itsbapic

itsbapic Apr 1, 2023

This line is definitely going down in history hahahah

This comment has been minimized.

Copy link
@aorjoa

aorjoa Apr 1, 2023

(ノ°Д°)ノ︵ ┻━┻

This comment has been minimized.

Copy link
@VortexHero

This comment has been minimized.

Copy link
@parsakhaz

parsakhaz Apr 1, 2023

caught in 4kcamera_flash

This comment has been minimized.

Copy link
@Javier-Machin

This comment has been minimized.

Copy link
@kurbus

kurbus Apr 1, 2023

this will go down in history as the most meme Github commit of all time

more than the blame-someone-else Torvalds commit?

candidate =>
candidate
.getOrElse(AuthorIdFeature, None).contains(candidate.getOrElse(DDGStatsElonFeature, 0L))),
(
"author_is_power_user",
candidate =>
candidate
.getOrElse(AuthorIdFeature, None)
.exists(candidate.getOrElse(DDGStatsVitsFeature, Set.empty[Long]).contains)),
(
"author_is_democrat",

This comment has been minimized.

Copy link
@DatoAkobiaQualcommAtheros

DatoAkobiaQualcommAtheros Mar 31, 2023

NO WAY THIS IS REAL sob

This comment has been minimized.

Copy link
@tomaszpieczykolan

tomaszpieczykolan Mar 31, 2023

there's also author_is_republican

This comment has been minimized.

Copy link
@bennash

bennash Mar 31, 2023

I submitted a PR to add libertarians. They closed it. And then this!!

This comment has been minimized.

Copy link
@sy1vi3

sy1vi3 Mar 31, 2023

aint no way

This comment has been minimized.

Copy link
@tomaszpieczykolan

tomaszpieczykolan Apr 1, 2023

apparently it was just used for logging

candidate =>
candidate
.getOrElse(AuthorIdFeature, None)
.exists(candidate.getOrElse(DDGStatsDemocratsFeature, Set.empty[Long]).contains)),
(
"author_is_republican",
candidate =>
candidate
.getOrElse(AuthorIdFeature, None)
.exists(candidate.getOrElse(DDGStatsRepublicansFeature, Set.empty[Long]).contains)),
("served_in_threaded_conversation_module", _ => false)

This comment has been minimized.

Copy link
@StormyDragon

StormyDragon Mar 31, 2023

Didn't leave a trailing comma.

This comment has been minimized.

Copy link
@gussegovia98

gussegovia98 Mar 31, 2023

absolutely terrible delete the whole repo

This comment has been minimized.

Copy link
@pluckpawz

pluckpawz Mar 31, 2023

skull emoji

This comment has been minimized.

Copy link
@RubberDuckShobe

RubberDuckShobe Mar 31, 2023

bruh momentum

This comment has been minimized.

Copy link
@NicholasDominici

NicholasDominici Mar 31, 2023

lgtm

This comment has been minimized.

Copy link
@whit3st

whit3st Mar 31, 2023

AHAHAH BROOO

This comment has been minimized.

Copy link
@HotNoob

HotNoob Mar 31, 2023

scroll down

This comment has been minimized.

Copy link
@BankkRoll

BankkRoll Mar 31, 2023

There should not be a trailing comma on line 223. Adding a trailing comma would result in a syntax error.

This comment has been minimized.

Copy link
@luduvigo

luduvigo Apr 1, 2023

Nice April Fool

)

val PredicateMap = CandidatePredicates.toMap
@@ -1,12 +1,10 @@
package com.twitter.home_mixer.functional_component.feature_hydrator

import com.twitter.config.yaml.YamlMap
import com.twitter.finagle.tracing.Annotation.BinaryAnnotation
import com.twitter.finagle.tracing.ForwardAnnotation
import com.twitter.home_mixer.model.HomeFeatures._
import com.twitter.home_mixer.model.request.DeviceContext.RequestContext
import com.twitter.home_mixer.model.request.HasDeviceContext
import com.twitter.home_mixer.param.HomeMixerInjectionNames.DDGStatsAuthors
import com.twitter.joinkey.context.RequestJoinKeyContext
import com.twitter.product_mixer.component_library.model.cursor.UrtOrderedCursor
import com.twitter.product_mixer.core.feature.Feature
@@ -24,22 +22,16 @@ import com.twitter.snowflake.id.SnowflakeId
import com.twitter.stitch.Stitch
import java.util.UUID
import javax.inject.Inject
import javax.inject.Named
import javax.inject.Singleton

@Singleton
class RequestQueryFeatureHydrator[
Query <: PipelineQuery with HasPipelineCursor[UrtOrderedCursor] with HasDeviceContext] @Inject() (
@Named(DDGStatsAuthors) ddgStatsAuthors: YamlMap)
extends QueryFeatureHydrator[Query] {
) extends QueryFeatureHydrator[Query] {

override val features: Set[Feature[_, _]] = Set(
AccountAgeFeature,
ClientIdFeature,
DDGStatsDemocratsFeature,
DDGStatsRepublicansFeature,
DDGStatsElonFeature,
DDGStatsVitsFeature,
DeviceLanguageFeature,
GetInitialFeature,
GetMiddleFeature,
@@ -59,10 +51,6 @@ class RequestQueryFeatureHydrator[
override val identifier: FeatureHydratorIdentifier = FeatureHydratorIdentifier("Request")

private val DarkRequestAnnotation = "clnt/has_dark_request"
private val Democrats = "democrats"
private val Republicans = "republicans"
private val Elon = "elon"

This comment has been minimized.

Copy link
@VortexHero

VortexHero Apr 1, 2023

noooooooo not the elon variable sobsobsob

anything but the elon variable sobsobsob

PepeHands

This comment has been minimized.

Copy link
@CozyMeli-gitv2

CozyMeli-gitv2 Apr 1, 2023

bro has his own fucking variable skull

private val Vits = "vits"

// Convert Language code to ISO 639-3 format
private def getLanguageISOFormatByCode(languageCode: String): String =
@@ -83,16 +71,6 @@ class RequestQueryFeatureHydrator[
val featureMap = FeatureMapBuilder()
.add(AccountAgeFeature, query.getOptionalUserId.flatMap(SnowflakeId.timeFromIdOpt))
.add(ClientIdFeature, query.clientContext.appId)
/**
* These author ID lists are used purely for metrics collection. We track how often we are
* serving Tweets from these authors and how often their tweets are being impressed by users.
* This helps us validate in our A/B experimentation platform that we do not ship changes
* that negatively impacts one group over others.
*/
.add(DDGStatsDemocratsFeature, ddgStatsAuthors.longSeq(Democrats).toSet)
.add(DDGStatsRepublicansFeature, ddgStatsAuthors.longSeq(Republicans).toSet)
.add(DDGStatsVitsFeature, ddgStatsAuthors.longSeq(Vits).toSet)
.add(DDGStatsElonFeature, ddgStatsAuthors.longValue(Elon))
.add(DeviceLanguageFeature, query.getLanguageCode.map(getLanguageISOFormatByCode))
.add(
GetInitialFeature,
@@ -176,10 +176,6 @@ object HomeFeatures {
override def personalDataTypes: Set[pd.PersonalDataType] = Set(pd.PersonalDataType.ClientType)
}
object CachedScoredTweetsFeature extends Feature[PipelineQuery, Seq[hmt.CachedScoredTweet]]
object DDGStatsElonFeature extends Feature[PipelineQuery, Long]
object DDGStatsVitsFeature extends Feature[PipelineQuery, Set[Long]]
object DDGStatsDemocratsFeature extends Feature[PipelineQuery, Set[Long]]
object DDGStatsRepublicansFeature extends Feature[PipelineQuery, Set[Long]]
object DeviceLanguageFeature extends Feature[PipelineQuery, Option[String]]
object DismissInfoFeature
extends FeatureWithDefaultOnFailure[PipelineQuery, Map[st.SuggestType, Option[DismissInfo]]] {
@@ -1,18 +1,5 @@
package com.twitter.home_mixer.module

import com.google.inject.Provides
import com.twitter.config.yaml.YamlMap
import com.twitter.home_mixer.param.HomeMixerInjectionNames.DDGStatsAuthors
import com.twitter.inject.TwitterModule
import javax.inject.Named
import javax.inject.Singleton

object HomeMixerResourcesModule extends TwitterModule {

private val AuthorsFile = "/config/authors.yml"

@Provides
@Singleton
@Named(DDGStatsAuthors)
def providesDDGStatsAuthors(): YamlMap = YamlMap.load(AuthorsFile)
}
object HomeMixerResourcesModule extends TwitterModule {}
@@ -4,7 +4,6 @@ object HomeMixerInjectionNames {
final val AuthorFeatureRepository = "AuthorFeatureRepository"
final val CandidateFeaturesScribeEventPublisher = "CandidateFeaturesScribeEventPublisher"
final val CommonFeaturesScribeEventPublisher = "CommonFeaturesScribeEventPublisher"
final val DDGStatsAuthors = "DDGStatsAuthors"
final val EarlybirdRepository = "EarlybirdRepository"
final val EngagementsReceivedByAuthorCache = "EngagementsReceivedByAuthorCache"
final val GraphTwoHopRepository = "GraphTwoHopRepository"

31 comments on commit ec83d01

@byronbytes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH MY GOD THEY ACTUALLY DID IT (#327)

@acgfbr
Copy link

@acgfbr acgfbr commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA

@mxkrsv
Copy link

@mxkrsv mxkrsv commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An ensign comes into the recreation room one day. He sees a soldier standing near an aquarium, looking at the fish.
-- What are you doing here, comrade soldier?
-- Studying the influence of the higher mind on the lower mind, Comrade Warrant Officer. I move my eyes to the right - the fish
swim to the right, I lead to the left - the fish swim to the left.
-- Go away, comrade soldier, read a newspaper.
The soldier left. Five minutes left until the end of personal time, and he decided to go into the recreation room again, and there stands the warrant officer and monotonously opens and closes his mouth (imitates the breathing of fish).

@revelsix
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surely this change will be reflected on the actual twitter site (CLUELESS)

@shadeofsound
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good lord, look at them go.

@syndek
Copy link

@syndek syndek commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They probably think we can't see this LMAO

@gussegovia98
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LMAO

@SoufianAkh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About time lmao, can't believe they actually had Elon hardcoded in the source...

@foxt
Copy link

@foxt foxt commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@revelsix from a quick glance it seems that these are only used for analytics purposes, not actually affecting the algo

      /**
       * These author ID lists are used purely for metrics collection. We track how often we are
       * serving Tweets from these authors and how often their tweets are being impressed by users.
       * This helps us validate in our A/B experimentation platform that we do not ship changes
       * that negatively impacts one group over others.
       */

@msm-code
Copy link

@msm-code msm-code commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everyone commenting, I know you are here just for cheap drama, but please at least read the commit you're commenting on:

      /**
       * These author ID lists are used purely for metrics collection. We track how often we are
       * serving Tweets from these authors and how often their tweets are being impressed by users.
       * This helps us validate in our A/B experimentation platform that we do not ship changes
       * that negatively impacts one group over others.
       */

@BetaKors
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hilarious

@Om4ar
Copy link

@Om4ar Om4ar commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

free speech chart_with_upwards_trend ... LUL

@annasajkh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lmao

@jacc
Copy link

@jacc jacc commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMG_8609 Large

guys is my fit hard

@BankkRoll
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

@alsonick
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jacc W

@MarHoff
Copy link

@MarHoff MarHoff commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@revelsix from a quick glance it seems that these are only used for analytics purposes, not actually affecting the algo

      /**
       * These author ID lists are used purely for metrics collection. We track how often we are
       * serving Tweets from these authors and how often their tweets are being impressed by users.
       * This helps us validate in our A/B experimentation platform that we do not ship changes
       * that negatively impacts one group over others.
       */

Do you realize this is actually worse. You pointed to a comment that state the goal of this code.
A/B testing every changes so that they don't negatively impact specifics groups:

      .add(DDGStatsDemocratsFeature, ddgStatsAuthors.longSeq(Democrats).toSet)
      .add(DDGStatsRepublicansFeature, ddgStatsAuthors.longSeq(Republicans).toSet)
      .add(DDGStatsVitsFeature, ddgStatsAuthors.longSeq(Vits).toSet)
      .add(DDGStatsElonFeature, ddgStatsAuthors.longValue(Elon))

Democrat / Republican why not even if it is a little bit to US centric for my taste.
Elon... well i guess all is said.
But who on are the Vits? Any clues?

At least thanks to the dev for using a clean commit instead of trying a shamefull push force on a public repo that would probably had an even greater Streisand effect+1

PS: Apologies they actually did a push force on a public repo facepalmas one can observe in #327
Let's just hope no one could possibly have cloned 7f90d0c before they erased it blowing up every pull request in the process... Must contain some other smoking guns...

image

@michaelhly
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i pooped

@msm-code
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A/B testing every changes so that they don't negatively impact specifics groups:

And any other specific group, like "DeviceLanguageFeature", "AccountAgeFeature" and "IsNsfwFeature". This is just regular A/B testing, they are making sure they don't hurt any particular group with a new PR.This absolutely makes sense, and I say this as a Twitter hater.

@HotNoob
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github is the new facebook.

@SoufianAkh
Copy link

@SoufianAkh SoufianAkh commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cat copy

@Meqativ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cat wit the drip ong

@M4cs
Copy link

@M4cs M4cs commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolute pussy drip

@sy1vi3
Copy link

@sy1vi3 sy1vi3 commented on ec83d01 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the commits of all time, certainly

@Heliodex
Copy link

@Heliodex Heliodex commented on ec83d01 Apr 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the commits of all time, certainly

This is the commit ever

@Nightcaat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am so proud of this community

@SimplyVoid
Copy link

@SimplyVoid SimplyVoid commented on ec83d01 Apr 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you proud of me now Momfearful

@tomlson2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to be a part of this commit in some form or another.

@renchris
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for April Fools thinking

@luduvigo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely April Fool, Elon.
Amazing Entertainment.

@LrWm3
Copy link

@LrWm3 LrWm3 commented on ec83d01 Apr 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elon you shouldn't have

Please sign in to comment.