def eval_tracking(self): results = [] model = TrackingModel.load('trackingmodel') for bug in bugzilla.get_bugs(): if self.is_tracking_decision_made(bug): continue if model.classify(bug)[0] == 1: results.append(bug['id']) with open('tracking.json', 'w') as f: json.dump(results, f)
def test_get_tracking_labels(): model = TrackingModel() classes, _ = model.get_labels() assert not classes[1101825] assert classes[1042096]
def train_tracking(self): logger.info("Training *tracking* model") model = TrackingModel() model.train() self.compress_file("trackingmodel")