Skip to content

Commit

Permalink
Replace logging.[...] with LOGGER.[...] (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfG authored Sep 8, 2023
1 parent da2d545 commit 2bc1613
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mokapot/brew.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ def brew(psms, model=None, test_fdr=0.01, folds=3, max_workers=1, rng=None):
descs = [True] * len(psms)

if using_best_feat:
logging.warning(
LOGGER.warning(
"Learned model did not improve over the best feature. "
"Now scoring by the best feature for each collection "
"of PSMs."
)
elif reset:
logging.warning(
LOGGER.warning(
"Learned model did not improve upon the pretrained "
"input model. Now re-scoring each collection of PSMs "
"using the original model."
Expand Down
4 changes: 2 additions & 2 deletions mokapot/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def load_model(model_file):
# Try a percolator model first:
try:
weights = pd.read_csv(model_file, sep="\t", nrows=2).loc[1, :]
logging.info("Loading the Percolator model.")
LOGGER.info("Loading the Percolator model.")

weight_cols = [c for c in weights.index if c != "m0"]
model = Model(estimator=LinearSVC(), scaler="as-is")
Expand All @@ -553,7 +553,7 @@ def load_model(model_file):

# Then try loading it with pickle:
except (KeyError, UnicodeDecodeError):
logging.info("Loading mokapot model.")
LOGGER.info("Loading mokapot model.")
with open(model_file, "rb") as mod_in:
model = pickle.load(mod_in)

Expand Down

0 comments on commit 2bc1613

Please sign in to comment.