Skip to content

Commit

Permalink
✨ why does training fail (silently?)
Browse files Browse the repository at this point in the history
  • Loading branch information
gessulat committed Oct 8, 2024
1 parent f11693e commit 78548ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions mokapot/brew.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def brew(
)

except TypeError:
LOGGER.info("No idea how we ended up here, but this seems to be standard training oO?! tf.")

Check failure on line 152 in mokapot/brew.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (E501)

mokapot/brew.py:152:89: E501 Line too long (100 > 88)
train_sets = list(
make_train_sets(
test_idx=test_folds_idx,
Expand Down Expand Up @@ -539,6 +540,8 @@ def _fit_model(train_set, psms, model, fold):
try:
model.fit(train_set)
except RuntimeError as msg:
LOGGER.info("=== Analyzing Fold %i ===", fold + 1)
LOGGER.info(msg)
if str(msg) != "Model performs worse after training.":
raise

Expand Down
4 changes: 0 additions & 4 deletions mokapot/mokapot.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ def main(main_args=None):
rng=config.seed,
)
logging.info("")
logging.info("BREW DELETE ME")
for s in scores:
logging.info(f"{s}")
logging.info(f"{(s == 0).all()}")

if config.dest_dir is not None:
config.dest_dir.mkdir(exist_ok=True)
Expand Down

0 comments on commit 78548ff

Please sign in to comment.