microsoft / microsoft/molskill

Getting segfault's from workers, but not sure what's causing it

Open
#6 4 comments 0 reactions 1 assignee View on GitHub

@josejimenezluna is already working on this.

Since Mar 1, 2023.

bug
Dominant language
Python
Stars
122
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hi - thanks for the nicely packaged code. I've been running it on some internal data so can't share the inputs data. The code I'm running is

from molskill.scorer import MolSkillScorer
import numpy as np

d= [x.strip() for x in open("d.smi").read().split("\n")]

scorer = MolSkillScorer()
scores = scorer.score(d)
np.savetxt("d-molskill.csv", scores, delimiter=",")

However I see the follow errors - and as far as I can tell the input SMILES are all valid (they've been cleaned). Do you know what might cause this error?

Traceback (most recent call last):
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/rdkit/ML/Descriptors/MoleculeDescriptors.py", line 88, in CalcDescriptors
    res[i] = fn(mol)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/rdkit/Chem/EState/EState.py", line 76, in MaxEStateIndex
    return max(EStateIndices(mol, force))
ValueError: max() arg is an empty sequence
Traceback (most recent call last):
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/rdkit/ML/Descriptors/MoleculeDescriptors.py", line 88, in CalcDescriptors
    res[i] = fn(mol)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/rdkit/Chem/EState/EState.py", line 83, in MinEStateIndex
    return min(EStateIndices(mol, force))
ValueError: min() arg is an empty sequence
Traceback (most recent call last):
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/rdkit/ML/Descriptors/MoleculeDescriptors.py", line 88, in CalcDescriptors
    res[i] = fn(mol)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/rdkit/Chem/EState/EState.py", line 90, in MaxAbsEStateIndex
    return max(abs(x) for x in EStateIndices(mol, force))
ValueError: max() arg is an empty sequence
Traceback (most recent call last):
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/rdkit/ML/Descriptors/MoleculeDescriptors.py", line 88, in CalcDescriptors
    res[i] = fn(mol)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/rdkit/Chem/EState/EState.py", line 97, in MinAbsEStateIndex
    return min(abs(x) for x in EStateIndices(mol, force))
ValueError: min() arg is an empty sequence
ERROR: Unexpected segmentation fault encountered in worker.
@Traceback (most recent call last):
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1120, in _try_get_data
    data = self._data_queue.get(timeout=timeout)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/multiprocessing/queues.py", line 113, in get
    if not self._poll(timeout):
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/multiprocessing/connection.py", line 257, in poll
    return self._poll(timeout)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/multiprocessing/connection.py", line 424, in _poll
    r = wait([self], timeout)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/multiprocessing/connection.py", line 931, in wait
    ready = selector.select(timeout)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/selectors.py", line 416, in select
    fd_event_list = self._selector.poll(timeout)
  File "/cluster/home/guha/miniconda3/envs/molskill/lib/python3.9/site-packages/torch/utils/data/_utils/signal_handling.py", line 66, in handler
    _error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 171390) is killed by signal: Segmentation fault. 

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.