mims-harvard / TDC

Therapeutics Commons (TDC-2): Multimodal Foundation for Therapeutic Science
https://tdcommons.ai
MIT License
1.02k stars 174 forks source link

Unpickling error when loading `JNK3`. #306

Open miguelgondu opened 3 months ago

miguelgondu commented 3 months ago

Describe the bug On a fresh install of PyTDC (in version PyTDC==1.0.6 with scikit-learn==1.2.2) I get an UnpicklingError for the oracle JNK3.

When running

import tdc
oracle = tdc.Oracle(name = 'JNK3')
oracle(['CC(C)(C)[C@H]1CCc2c(sc(NC(=O)COc3ccc(Cl)cc3)c2C(N)=O)C1'])

I get the following traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sjt972/anaconda3/envs/tdc-debug/lib/python3.10/site-packages/tdc/oracles.py", line 67, in __init__
    self.assign_evaluator()
  File "/Users/sjt972/anaconda3/envs/tdc-debug/lib/python3.10/site-packages/tdc/oracles.py", line 109, in assign_evaluator
    oracle_object = jnk3()
  File "/Users/sjt972/anaconda3/envs/tdc-debug/lib/python3.10/site-packages/tdc/chem_utils/oracle/oracle.py", line 706, in __init__
    self.jnk3_model = load_pickled_model(jnk3_model_path)
  File "/Users/sjt972/anaconda3/envs/tdc-debug/lib/python3.10/site-packages/tdc/chem_utils/oracle/oracle.py", line 456, in load_pickled_model
    model = pickle.load(f)
_pickle.UnpicklingError: invalid load key, '<'.

Expected behavior The oracle should run and return 0.01

Environment: