Skip to content

Commit

Permalink
For the 'tracking' model, rollback bugs to the time when the tracking…
Browse files Browse the repository at this point in the history
… was requested

Fixes marco-c#58
  • Loading branch information
marco-c committed Jan 10, 2019
1 parent 8bab68a commit 2a44029
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bugbug/models/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, lemmatization=False):
self.comments_vectorizer = self.text_vectorizer(stop_words='english')

self.extraction_pipeline = Pipeline([
('bug_extractor', bug_features.BugExtractor(feature_extractors, cleanup_functions)),
('bug_extractor', bug_features.BugExtractor(feature_extractors, cleanup_functions, rollback=True, rollback_when=self.rollback)),
('union', FeatureUnion(
transformer_list=[
('data', Pipeline([
Expand All @@ -69,6 +69,9 @@ def __init__(self, lemmatization=False):
self.clf = xgboost.XGBClassifier(n_jobs=16)
self.clf.set_params(predictor='cpu_predictor')

def rollback(self, change):
return change['field_name'].startswith('cf_tracking_firefox')

def get_labels(self):
classes = {}

Expand Down

0 comments on commit 2a44029

Please sign in to comment.