f16992b25bb153df3ab87c5111db2a101cf68c73,bugbug/models/testselect.py,TestSelectModel,train_test_split,#TestSelectModel#Any#Any#,91
Before Change
rev = test_data["revs"][0]
name = test_data["name"]
if self.granularity == "label" and not name.startswith("test-"):
continue
if rev in pushes:
pushes[rev] += 1
else:
pushes[rev] = 1
train_push_len = math.floor(0.9 * len(pushes))
train_pushes = list(pushes.values())[:train_push_len]
train_len = sum(count for count in train_pushes)
After Change
def train_test_split(self, X, y):
pushes, train_push_len = self.get_pushes()
train_len = sum(
len(push["failures"]) + len(push["passes"])
for push in pushes[:train_push_len]
)
print(
f"{train_push_len} pushes in the training set (corresponding to {train_len} push/jobs)"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: mozilla/bugbug
Commit Name: f16992b25bb153df3ab87c5111db2a101cf68c73
Time: 2020-04-09
Author: mcastelluccio@mozilla.com
File Name: bugbug/models/testselect.py
Class Name: TestSelectModel
Method Name: train_test_split
Project Name: deepfakes/faceswap
Commit Name: 0a7e5d397ed2bb9b61ee54d73e38d7ef6d890e46
Time: 2019-06-26
Author: 36920800+torzdf@users.noreply.github.com
File Name: lib/gui/display_graph.py
Class Name: GraphBase
Method Name: lines_groupsize
Project Name: senarvi/theanolm
Commit Name: b73fc0c21ea55c7d3357fbf633944e1e67db8bdf
Time: 2016-07-31
Author: seppo.git@marjaniemi.com
File Name: theanolm/scoring/latticedecoder.py
Class Name: LatticeDecoder
Method Name: decode