Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: appengine/findit/crash/loglinear/changelist_classifier.py

Issue 2663063007: [Predator] Switch from anonymous dict to CrashData. (Closed)
Patch Set: Rebase and fix delta test. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/findit/crash/loglinear/changelist_classifier.py
diff --git a/appengine/findit/crash/loglinear/changelist_classifier.py b/appengine/findit/crash/loglinear/changelist_classifier.py
index 96277a04aefab650a935aa33a7cf08c3b48f7e7a..11bcd2717b2842a36c47445a8d5796f8b5e9d0c6 100644
--- a/appengine/findit/crash/loglinear/changelist_classifier.py
+++ b/appengine/findit/crash/loglinear/changelist_classifier.py
@@ -8,7 +8,7 @@ import logging
from common.chrome_dependency_fetcher import ChromeDependencyFetcher
from crash import changelist_classifier
from crash.changelist_classifier import StackInfo
-from crash.crash_report_with_dependencies import CrashReportWithDependencies
+from crash.crash_report import CrashReport
from crash.loglinear.model import UnnormalizedLogLinearModel
@@ -49,27 +49,19 @@ class LogLinearChangelistClassifier(object):
Returns:
List of ``Suspect``s, sorted by probability from highest to lowest.
"""
- annotated_report = CrashReportWithDependencies(
- report, self._dependency_fetcher)
- if annotated_report is None:
- logging.warning('%s.__call__: '
- 'Could not obtain dependencies for report: %s',
- self.__class__.__name__, str(report))
- return []
-
- suspects = self.GenerateSuspects(annotated_report)
+ suspects = self.GenerateSuspects(report)
if not suspects:
logging.warning('%s.__call__: Found no suspects for report: %s',
- self.__class__.__name__, str(annotated_report))
+ self.__class__.__name__, str(report))
return []
- return self.RankSuspects(annotated_report, suspects)
+ return self.RankSuspects(report, suspects)
def GenerateSuspects(self, report):
"""Generate all possible suspects for the reported crash.
Args:
- report (CrashReportWithDependencies): the crash we seek to explain.
+ report (CrashReport): the crash we seek to explain.
Returns:
A list of ``Suspect``s who may be to blame for the
@@ -106,7 +98,7 @@ class LogLinearChangelistClassifier(object):
will be filtered.
Args:
- report (CrashReportWithDependencies): the crash we seek to explain.
+ report (CrashReport): the crash we seek to explain.
suspects (iterable of Suspect): the CLs to consider blaming for the crash.
Returns:
« no previous file with comments | « appengine/findit/crash/findit_for_chromecrash.py ('k') | appengine/findit/crash/loglinear/changelist_features/min_distance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698