File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 23
23
from sklearn .model_selection import cross_validate , train_test_split
24
24
from tabulate import tabulate
25
25
26
- from bugbug import bugzilla , db , repository
26
+ from bugbug import bugzilla , db , github , repository
27
27
from bugbug .nlp import SpacyVectorizer
28
28
from bugbug .utils import split_tuple_generator , to_array
29
29
@@ -757,3 +757,17 @@ def items_gen(self, classes):
757
757
758
758
for (bug_id1 , bug_id2 ), label in classes .items ():
759
759
yield (bugs [bug_id1 ], bugs [bug_id2 ]), label
760
+
761
+
762
+ class IssueModel (Model ):
763
+ def __init__ (self , lemmatization = False ):
764
+ Model .__init__ (self , lemmatization )
765
+ self .training_dbs = [github .GITHUB_ISSUES_DB ]
766
+
767
+ def items_gen (self , classes ):
768
+ for issue in github .get_issues ():
769
+ issue_number = issue ["number" ]
770
+ if issue_number not in classes :
771
+ continue
772
+
773
+ yield issue , classes [issue_number ]
You can’t perform that action at this time.
0 commit comments