diff --git a/app/boosting_decision_making/boosting_featurizer.py b/app/boosting_decision_making/boosting_featurizer.py index 563aec45..999b820d 100644 --- a/app/boosting_decision_making/boosting_featurizer.py +++ b/app/boosting_decision_making/boosting_featurizer.py @@ -27,8 +27,7 @@ class BoostingFeaturizer: - def __init__(self, all_results, config, feature_ids, - weighted_log_similarity_calculator=None, + def __init__(self, all_results, config, feature_ids, weighted_log_similarity_calculator=None, features_dict_with_saved_objects=None): self.config = config self.previously_gathered_features = {} @@ -39,7 +38,7 @@ def __init__(self, all_results, config, feature_ids, self.similarity_calculator = similarity_calculator.SimilarityCalculator( self.config, weighted_similarity_calculator=weighted_log_similarity_calculator) - if type(feature_ids) == str: + if type(feature_ids) is str: self.feature_ids = text_processing.transform_string_feature_range_into_list(feature_ids) else: self.feature_ids = feature_ids diff --git a/app/boosting_decision_making/suggest_boosting_featurizer.py b/app/boosting_decision_making/suggest_boosting_featurizer.py index 6e9baf7d..581efb58 100644 --- a/app/boosting_decision_making/suggest_boosting_featurizer.py +++ b/app/boosting_decision_making/suggest_boosting_featurizer.py @@ -20,11 +20,9 @@ class SuggestBoostingFeaturizer(boosting_featurizer.BoostingFeaturizer): def __init__(self, all_results, config, feature_ids, weighted_log_similarity_calculator=None, features_dict_with_saved_objects=None): - boosting_featurizer.BoostingFeaturizer.__init__( - self, - all_results, config, feature_ids=feature_ids, - weighted_log_similarity_calculator=weighted_log_similarity_calculator, - features_dict_with_saved_objects=features_dict_with_saved_objects) + super().__init__(all_results, config, feature_ids, + weighted_log_similarity_calculator=weighted_log_similarity_calculator, + features_dict_with_saved_objects=features_dict_with_saved_objects) def _calculate_percent_issue_types(self): scores_by_issue_type = self.find_most_relevant_by_type() diff --git a/app/service/suggest_service.py b/app/service/suggest_service.py index 6ab5ee9e..470fc55e 100644 --- a/app/service/suggest_service.py +++ b/app/service/suggest_service.py @@ -340,6 +340,7 @@ def suggest_items(self, test_item_info): logger.info(f'Number of logs for suggestions: {len(logs)}') logger.debug(f'Logs for suggestions: {json.dumps(logs)}') searched_res = self.query_es_for_suggested_items(test_item_info, logs) + logger.debug(f'Suggested items by FTS (KNN): {json.dumps(searched_res)}') boosting_config = self.get_config_for_boosting_suggests(test_item_info.analyzerConfig) boosting_config["chosen_namespaces"] = self.namespace_finder.get_chosen_namespaces(