Skip to content

Commit 016a40b

Browse files
authored
Merge pull request #216 from compomics/fix/xgboost-cuda-visible-devices-bug
Fix silent crash due to XGBoost-CUDA environment variable incompatibility
2 parents 8a094aa + 16e5d81 commit 016a40b

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

ms2rescore/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
"""MS²Rescore: Sensitive PSM rescoring with predicted MS² peak intensities and RTs."""
1+
"""Modular and user-friendly platform for AI-assisted rescoring of peptide identifications ."""
22

3-
__version__ = "3.2.0.dev1"
3+
__version__ = "3.2.0.dev2"
4+
__all__ = [
5+
"parse_configurations",
6+
"rescore",
7+
]
48

59
from warnings import filterwarnings
610

@@ -12,5 +16,5 @@
1216
module="psims.mzmlb",
1317
)
1418

15-
from ms2rescore.config_parser import parse_configurations # noqa: F401 E402
16-
from ms2rescore.core import rescore # noqa: F401 E402
19+
from ms2rescore.config_parser import parse_configurations # noqa: E402
20+
from ms2rescore.core import rescore # noqa: E402

ms2rescore/feature_generators/ms2pip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
import logging
2727
import multiprocessing
28+
import os
2829
import warnings
2930
from itertools import chain
3031
from typing import List, Optional, Union
@@ -194,6 +195,7 @@ def add_features(self, psm_list: PSMList) -> None:
194195
spectrum_filename = infer_spectrum_path(self.spectrum_path, run)
195196
logger.debug(f"Using spectrum file `{spectrum_filename}`")
196197
try:
198+
os.environ.pop("CUDA_VISIBLE_DEVICES", None)
197199
ms2pip_results = correlate(
198200
psms=psm_list_run,
199201
spectrum_file=str(spectrum_filename),

0 commit comments

Comments
 (0)