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

Unified Diff: appengine/findit/crash/scorers/aggregated_scorer.py

Issue 2707603002: [Predator] Generate all changelogs in regression ranges instead of only matched changelogs (Closed)
Patch Set: . 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
« no previous file with comments | « appengine/findit/crash/scorers/__init__.py ('k') | appengine/findit/crash/scorers/aggregators.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/scorers/aggregated_scorer.py
diff --git a/appengine/findit/crash/scorers/aggregated_scorer.py b/appengine/findit/crash/scorers/aggregated_scorer.py
deleted file mode 100644
index 77479a5e85eb54fb62a0830e1e69af1c9438602a..0000000000000000000000000000000000000000
--- a/appengine/findit/crash/scorers/aggregated_scorer.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Aggregated scorer which uses aggregators to aggregate results from
-different scorers."""
-
-from crash.scorers import aggregators
-
-
-class AggregatedScorer(object):
-
- def __init__(self, scorers):
- self.scorers = scorers
-
- def Score(self, result,
- score_aggregator=aggregators.Multiplier(),
- reasons_aggregator=aggregators.IdentityAggregator(),
- changed_files_aggregator=aggregators.ChangedFilesAggregator()):
- """Aggregates score, reasons and changed_files from all the scorers.
-
- Note: This method sets confidence, reasons and changed_files of results.
- """
- # Transforms array of [(score1, reason1, changed_files1), (score2, reason2,
- # changed_files2)] to [(score1, score2), (reason1, reason2),
- # (changed_files1, changed_files2)] for aggregators to aggregate.
- scores, reasons, changed_files = zip(*[
- scorer(result) for scorer in self.scorers])
-
- result.confidence = score_aggregator(list(scores))
- result.reasons = reasons_aggregator(list(reasons))
- result.changed_files = changed_files_aggregator(list(changed_files))
-
- return result.confidence, result.reasons, result.changed_files
« no previous file with comments | « appengine/findit/crash/scorers/__init__.py ('k') | appengine/findit/crash/scorers/aggregators.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698