Skip to content

Commit ac1aa2a

Browse files
authored
Limit penalization on blocks / mutes. Fix #658
1 parent ec83d01 commit ac1aa2a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/scala/com/twitter/interaction_graph/scio/agg_negative/InteractionGraphNegativeJob.scala

+13
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,30 @@ object InteractionGraphNegativeJob extends ScioBeamJob[InteractionGraphNegativeO
4949
val endTs = opts.interval.getEndMillis
5050

5151
// read input datasets
52+
53+
// We only count blocks in the past 180 days to make sure we don't fall
54+
// into any long-term cancellation effects in a tweeter.
55+
// As an example, some accounts may have higher count of blocks because
56+
// what they said is controversial in one period of time but it might be
57+
// not in other (for example, @RWMaloneMD or others)
5258
val blocks: SCollection[InteractionGraphRawInput] =
5359
GraphUtil.getFlockFeatures(
5460
readSnapshot(FlockBlocksEdgesScalaDataset, sc),
5561
FeatureName.NumBlocks,
5662
endTs)
63+
.filter(_.age < 180)
5764

65+
// We only count mutes in the past 180 days to make sure we don't fall
66+
// into any long-term cancellation effects in a tweeter.
67+
// As an example, some accounts may have higher count of blocks because
68+
// what they said is controversial in one period of time but it might be
69+
// not in other (for example, @RWMaloneMD or others)
5870
val mutes: SCollection[InteractionGraphRawInput] =
5971
GraphUtil.getFlockFeatures(
6072
readSnapshot(FlockMutesEdgesScalaDataset, sc),
6173
FeatureName.NumMutes,
6274
endTs)
75+
.filter(_.age < 180)
6376

6477
val abuseReports: SCollection[InteractionGraphRawInput] =
6578
GraphUtil.getFlockFeatures(

0 commit comments

Comments
 (0)