зеркало из https://github.com/mozilla/bugbug.git
Unify the improt statments for the logger in the `bugbug/models` directory (#3365)
This commit is contained in:
Родитель
0810800e2e
Коммит
5ec12df431
|
@ -3,9 +3,9 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import logging
|
||||
import pickle
|
||||
from collections import defaultdict
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
from typing import Any
|
||||
|
||||
import matplotlib
|
||||
|
@ -30,8 +30,8 @@ from bugbug.github import Github
|
|||
from bugbug.nlp import SpacyVectorizer
|
||||
from bugbug.utils import split_tuple_generator, to_array
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def classification_report_imbalanced_values(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
import logging
|
||||
|
||||
import xgboost
|
||||
from imblearn.under_sampling import RandomUnderSampler
|
||||
|
@ -14,8 +14,8 @@ from sklearn.pipeline import Pipeline
|
|||
from bugbug import bugzilla, commit_features, feature_cleanup, labels, repository, utils
|
||||
from bugbug.model import CommitModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AnnotateIgnoreModel(CommitModel):
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import logging
|
||||
from collections import Counter
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
|
||||
import xgboost
|
||||
from sklearn.compose import ColumnTransformer
|
||||
|
@ -25,8 +25,8 @@ ADDRESSES_TO_EXCLUDE = [
|
|||
"nobody@t4b.me",
|
||||
]
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AssigneeModel(BugModel):
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
|
||||
import dateutil.parser
|
||||
import xgboost
|
||||
|
@ -17,8 +17,8 @@ from sklearn.pipeline import Pipeline
|
|||
from bugbug import bug_features, commit_features, feature_cleanup, repository, utils
|
||||
from bugbug.model import CommitModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class BackoutModel(CommitModel):
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import logging
|
||||
from collections import Counter
|
||||
from datetime import datetime, timezone
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
|
||||
import dateutil.parser
|
||||
import xgboost
|
||||
|
@ -18,8 +18,8 @@ from bugbug import bug_features, bugzilla, feature_cleanup, utils
|
|||
from bugbug.bugzilla import get_product_component_count
|
||||
from bugbug.model import BugModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ComponentModel(BugModel):
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import itertools
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
import xgboost
|
||||
|
@ -16,8 +16,8 @@ from sklearn.pipeline import Pipeline
|
|||
from bugbug import bug_features, bugzilla, feature_cleanup, labels, utils
|
||||
from bugbug.model import BugModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DefectModel(BugModel):
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from bugbug.models.defect import DefectModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DefectEnhancementTaskModel(DefectModel):
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import logging
|
||||
import random
|
||||
from itertools import combinations
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
|
||||
from sklearn.compose import ColumnTransformer
|
||||
from sklearn.feature_extraction import DictVectorizer
|
||||
|
@ -17,8 +17,8 @@ from bugbug.model import BugCoupleModel
|
|||
|
||||
REPORTERS_TO_IGNORE = {"intermittent-bug-filer@mozilla.bugs", "wptsync@mozilla.bugs"}
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DuplicateModel(BugCoupleModel):
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from bugbug.models.defect import DefectModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RegressionModel(DefectModel):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
import logging
|
||||
|
||||
import xgboost
|
||||
from imblearn.under_sampling import RandomUnderSampler
|
||||
|
@ -14,8 +14,8 @@ from sklearn.pipeline import Pipeline
|
|||
from bugbug import bug_features, bugzilla, feature_cleanup, utils
|
||||
from bugbug.model import BugModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RegressionRangeModel(BugModel):
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import itertools
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
|
||||
import dateutil.parser
|
||||
import numpy as np
|
||||
|
@ -19,8 +19,8 @@ from sklearn.pipeline import Pipeline
|
|||
from bugbug import bugzilla, commit_features, db, feature_cleanup, repository, utils
|
||||
from bugbug.model import CommitModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
BUG_FIXING_COMMITS_DB = "data/bug_fixing_commits.json"
|
||||
db.register(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
import logging
|
||||
|
||||
import xgboost
|
||||
from imblearn.over_sampling import BorderlineSMOTE
|
||||
|
@ -14,8 +14,8 @@ from sklearn.pipeline import Pipeline
|
|||
from bugbug import bug_features, bugzilla, feature_cleanup, utils
|
||||
from bugbug.model import BugModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SpamBugModel(BugModel):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
import logging
|
||||
|
||||
import xgboost
|
||||
from imblearn.under_sampling import RandomUnderSampler
|
||||
|
@ -14,8 +14,8 @@ from sklearn.pipeline import Pipeline
|
|||
from bugbug import bug_features, bugzilla, feature_cleanup, utils
|
||||
from bugbug.model import BugModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class StepsToReproduceModel(BugModel):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from logging import INFO, basicConfig, getLogger
|
||||
import logging
|
||||
|
||||
import xgboost
|
||||
from imblearn.under_sampling import RandomUnderSampler
|
||||
|
@ -14,8 +14,8 @@ from sklearn.pipeline import Pipeline
|
|||
from bugbug import commit_features, repository, test_scheduling, utils
|
||||
from bugbug.model import CommitModel
|
||||
|
||||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestFailureModel(CommitModel):
|
||||
|
|
Загрузка…
Ссылка в новой задаче