Unify the improt statments for the logger in the `bugbug/models` directory (#3365)

This commit is contained in:
Ademola Adebowale 2023-04-02 04:44:25 +01:00 коммит произвёл GitHub
Родитель 0810800e2e
Коммит 5ec12df431
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
14 изменённых файлов: 42 добавлений и 42 удалений

Просмотреть файл

@ -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):