jugoetz / slap-platform-predict

ML code to accompany the paper describing the SLAP platform
https://doi.org/10.1126/sciadv.adj2314
MIT License
0 stars 0 forks source link

IndexError in build_cgr during training process #2

Open caihaihua057200 opened 2 months ago

caihaihua057200 commented 2 months ago

Description:

I encountered an issue while running the training script with the following command: python run.py train --config config/config.yaml --data-path data/example_dataset.csv

Error Message:

The script fails with the following traceback: Traceback (most recent call last): File "slap-platform-predict-master\src\data\grapher.py", line 108, in build_cgr products = MolFromSmiles(reaction_smiles.split(">>")[1]) IndexError: list index out of range The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\xtalpi\SLAM\slap-platform-predict-master\slap-platform-predict-master\run.py", line 134, in args.func(args, hparams) File "D:\xtalpi\SLAM\slap-platform-predict-master\slap-platform-predict-master\src\run_experiment.py", line 29, in run_training data.process() File "D:\xtalpi\SLAM\slap-platform-predict-master\slap-platform-predict-master\src\data\dataloader.py", line 195, in process self.graphs = [ File "D:\xtalpi\SLAM\slap-platform-predict-master\slap-platform-predict-master\src\data\dataloader.py", line 196, in build_cgr( File "D:\xtalpi\SLAM\slap-platform-predict-master\slap-platform-predict-master\src\data\grapher.py", line 114, in build_cgr raise ValueError(f"Could not build CGR for reaction: {reaction_smiles}") from e ValueError: Could not build CGR for reaction: CSi(C)COCC1(/N=C/c2ccc(C(F)(F)F)cc2)CCOCC1

jugoetz commented 2 months ago

Looks like a SMILES input when the model expects a reactionSMILES. Try setting reaction to false in config.yaml