Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training Model #17

Open
ollierodrigues opened this issue Nov 21, 2023 · 1 comment
Open

Training Model #17

ollierodrigues opened this issue Nov 21, 2023 · 1 comment

Comments

@ollierodrigues
Copy link

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.

@atabeyunlu
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants