Closed isabelg-arcia closed 4 months ago
@isabelg-arcia the error seems to suggest that your dataset is multi-class with 13 classes rather than binary. Can you double check your data file, or try to reproduce the issue with one of our datasets in tests/data/
?
@kevingreenman Thank you for your returning. I did some tests and observed that this error occurs when we use the ROC and PRC metrics to train the model.
I am using binary classification and my data set consists of a smile column and another with 0 and 1 indicating activity.
The tests on your dataset are working normally.
@isabelg-arcia thanks for the additional info! Could you provide a minimal working example of the data file and the script you're using so I can try to reproduce it?
@isabelg-arcia I got your reply by email but don't see it on the web here anymore for some reason. Your test file only has 1's and 0's as targets, except for the final line, which has no target value. This is causing chemprop to read the final SMILES string as one of the targets, so the unique characters in that string plus the 1's and 0's from the other targets make 13 unique characters (0123CONScn()=
), hence the error message you're seeing. If you add a target value to that last line, your error should go away.
I'll close this issue for now, but feel free to reopen if this doesn't resolve your problem or if you have additional questions.
Describe the bug I'm having a runtimeError problem when running the training cell. I'm using a dataset whose target is binary. splitting randomly.
I'm not sure if this is a bug, but I was able to run this same dataset and parameters normally before.
I am runnig the "training.ipynb" script.
The error occurs on line " trainer.fit(mpnn, train_loader, val_loader)"
Environment
aimsim_core 2.2.1 aiohttp 3.9.5 aiosignal 1.3.1 astartes 1.2.2 asttokens 2.4.1 attrs 23.2.0 chemprop 2.0.3 colorama 0.4.6 comm 0.2.2 ConfigArgParse 1.7 contourpy 1.2.1 cycler 0.12.1 debugpy 1.8.2 decorator 5.1.1 dill 0.3.8 executing 2.0.1 filelock 3.15.4 fonttools 4.53.0 frozenlist 1.4.1 fsspec 2024.6.1 idna 3.7 intel-openmp 2021.4.0 ipykernel 6.29.5 ipython 8.26.0 jedi 0.19.1 Jinja2 3.1.4 joblib 1.4.2 jupyter_client 8.6.2 jupyter_core 5.7.2 kiwisolver 1.4.5 lightning 2.3.1 lightning-utilities 0.11.3.post0 MarkupSafe 2.1.5 matplotlib 3.9.0 matplotlib-inline 0.1.7 mhfp 1.9.6 mkl 2021.4.0 mordredcommunity 2.0.5 mpmath 1.3.0 multidict 6.0.5 multiprocess 0.70.16 nest-asyncio 1.6.0 networkx 3.3 numpy 1.26.4 packaging 24.1 padelpy 0.1.16 pandas 2.2.2 parso 0.8.4 pillow 10.4.0 pip 24.1.1 pip-review 1.3.0 platformdirs 4.2.2 plotly 5.22.0 pretty-errors 1.2.25 prompt_toolkit 3.0.47 psutil 6.0.0 pure-eval 0.2.2 Pygments 2.18.0 pyparsing 3.1.2 python-dateutil 2.9.0.post0 pytorch-lightning 2.3.1 pytz 2024.1 pywin32 306 PyYAML 6.0.1 pyzmq 26.0.3 rdkit 2024.3.1 scikit-learn 1.5.0 scikit-plot 0.3.7 scipy 1.14.0 seaborn 0.13.2 setuptools 70.2.0 six 1.16.0 stack-data 0.6.3 sympy 1.12.1 tabulate 0.9.0 tbb 2021.13.0 tenacity 8.4.2 threadpoolctl 3.5.0 torch 2.3.1 torchmetrics 1.4.0.post0 tornado 6.4.1 tqdm 4.66.4 traitlets 5.14.3 typing_extensions 4.12.2 tzdata 2024.1 wcwidth 0.2.13 yarl 1.9.4