DrugGEN icon indicating copy to clipboard operation
DrugGEN copied to clipboard

Training Model

Open ollierodrigues opened this issue 2 years ago • 1 comments

When going through the instructions on the README page, I came across a TypeError after this input: python DrugGEN/main.py --submodel="CrossLoss" --mode="train" --raw_file="DrugGEN/data/chembl_train.smi" --dataset_file="chembl45_train.pt" --drug_raw_file="DrugGEN/data/akt_train.smi" --drug_dataset_file="drugs_train.pt" --max_atom=45

The TypeError was related to the trainer.py file on line 590, specifically this part: real_graphs, a_tensor, x_tensor = load_molecules( data=data, batch_size=self.batch_size, device=self.device, b_dim=self.b_dim, m_dim=self.m_dim, )

The TypeError was due to load_molecules() not taking 'data' as an argument. This is shown in the training_data.py file: def load_molecules(batch=None, b_dim=32, m_dim=32, device=None, batch_size=32): data = data.to(device) a = geoutils.to_dense_adj( edge_index = data.edge_index, batch=data.batch, edge_attr=data.edge_attr, max_num_nodes=int(data.batch.shape[0]/batch_size)

After we added in 'data=None', 'after batch_size=32', the training of the model began running.

ollierodrigues avatar Nov 21 '23 16:11 ollierodrigues

Thank you for reporting this error. I appreciate you bringing this to our attention and I will look into it.

atabeyunlu avatar Dec 07 '23 13:12 atabeyunlu