DeepGraphLearning / torchdrug

A powerful and flexible machine learning platform for drug discovery
https://torchdrug.ai/
Apache License 2.0
1.42k stars 199 forks source link

Reading own dataset?? #223

Open amarye opened 11 months ago

amarye commented 11 months ago

I am a new user of AI, and I have followed a molecule generation tutorial in Colab. However, I encountered an error when I tried to use my dataset. Unfortunately, I don't know how to solve this error. Could you please assist me?

Screenshot from 2023-09-14 15-37-04

Screenshot from 2023-09-14 15-36-24

Arkhymadhe commented 6 months ago

The dataset you need is not tthe pandas dataset, but an instance of the Dataset object in torchdrug. Try doing something like:

import pandas as pd
from torchdrug.dataset import MoleculeDataset

molecule_dataset = MoleculeDataset.from_smiles(csv_file = "out.csv")

This should do the trick.