Skip to content

Commit

Permalink
integration test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilferrit committed Dec 2, 2024
1 parent 54366a5 commit 3028cd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def tiny_config(tmp_path):
"train_label_smoothing": 0.01,
"warmup_iters": 1,
"cosine_schedule_period_iters": 1,
"max_epochs": 15,
"max_epochs": 20,
"val_check_interval": 1,
"accelerator": "cpu",
"precursor_mass_tol": 5,
Expand Down Expand Up @@ -304,7 +304,7 @@ def tiny_config(tmp_path):
"gradient_clip_val": None,
"gradient_clip_algorithm": None,
"precision": "32-true",
"replace_isoleucine_with_leucine": False,
"replace_isoleucine_with_leucine": True,
"reverse_peptides": False,
"mskb_tokenizer": True,
"residues": {
Expand Down
14 changes: 7 additions & 7 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_train_and_run(
]

result = run(train_args)
model_file = tmp_path / "train.epoch=14-step=15.ckpt"
model_file = tmp_path / "train.epoch=19-step=20.ckpt"
best_model = tmp_path / "train.best.ckpt"
assert result.exit_code == 0
assert model_file.exists()
Expand Down Expand Up @@ -79,13 +79,13 @@ def test_train_and_run(
# Verify that the spectrum predictions are correct
# and indexed according to the peak input file type.
psms = mztab.spectrum_match_table
assert psms.loc[1, "sequence"] == "LESLIEK"
assert psms.loc[1, "sequence"] == "LESLLEK"
assert psms.loc[1, "spectra_ref"] == "ms_run[1]:index=0"
assert psms.loc[2, "sequence"] == "PEPTIDEK"
assert psms.loc[2, "sequence"] == "PEPTLDEK"
assert psms.loc[2, "spectra_ref"] == "ms_run[1]:index=1"
assert psms.loc[3, "sequence"] == "LESLIEK"
assert psms.loc[3, "sequence"] == "LESLLEK"
assert psms.loc[3, "spectra_ref"] == "ms_run[2]:scan=17"
assert psms.loc[4, "sequence"] == "PEPTIDEK"
assert psms.loc[4, "sequence"] == "PEPTLDEK"
assert psms.loc[4, "spectra_ref"] == "ms_run[2]:scan=111"

# Finally, try evaluating:
Expand Down Expand Up @@ -118,9 +118,9 @@ def test_train_and_run(
# Verify that the spectrum predictions are correct
# and indexed according to the peak input file type.
psms = mztab.spectrum_match_table
assert psms.loc[1, "sequence"] == "LESLIEK"
assert psms.loc[1, "sequence"] == "LESLLEK"
assert psms.loc[1, "spectra_ref"] == "ms_run[1]:index=0"
assert psms.loc[2, "sequence"] == "PEPTIDEK"
assert psms.loc[2, "sequence"] == "PEPTLDEK"
assert psms.loc[2, "spectra_ref"] == "ms_run[1]:index=1"

# Validate mztab output
Expand Down

0 comments on commit 3028cd2

Please sign in to comment.