ramprasad-group / polygnn Goto Github PK
View Code? Open in Web Editor NEWpolyGNN is a Python library to automate ML model training for polymer informatics.
License: Other
polyGNN is a Python library to automate ML model training for polymer informatics.
License: Other
Multi-Task model with 9,100 points for one property and 6,200 points for the other property
I have previously trained this dataset on polygnn_trainer and got much better results
I have attached:
Do you know why this behavior might be seen?
I got very similar results on my first test and decided to increase some of the constants at the beginning. Those changes did not improve prediction accuracy.
The purpose of this file is to provide an example of how to just do prediction using already-trained models. A prediction example is already contained in example.py
but it is far down in the file (something like line 340), so having a new shorter file will be helpful.
As part of this issue, let's also create another folder called more_examples
and place example_predict.py
in it. Additional example files can be added to this directory without cluttering the root directory.
I got this error. Any thoughts of how to fix?
RuntimeError: CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 15.89 GiB total capacity; 2.14 GiB already allocated; 3.31 MiB free; 2.31 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Hi,
Im trying to make predictions on 12k+ polymers and ran into a problem with double and triple bonds on the terminator. The smiles_featurizer fails to featurize these bonds and the program ends. The exact error is; "Invalid repeat unit. Periodic bond types are mismatching.". Ive also included a picture of the whole output.
Here are some smiles that make the program fail;
'[]CCCC(=[])Cl'
'[]CC(COS(=O)(=O)c1ccc(C)cc1)=C(C#[])COS(=O)(=O)c1ccc(C)cc1'
'[]CC(OS(=O)(=O)c1ccc(C)cc1)=C(C#[])OS(=O)(=O)c1ccc(C)cc1'
The current citation details in the README correspond to the ArXiv preprint. They should be updated to the Chem. Mat. version.
Modfiy the polyGNN
class in https://github.com/Ramprasad-Group/polygnn/blob/main/polygnn/models.py so that the learned polymer fingerprints can be directly accessed.
Hi, I only find part of the dataset in your paper in Khazana. Can you provide a full dataset use in your article? Thanks!
Upon setup and running the following command:
`poetry run poe torch-linux_win-cuda102
on tyrion2, the following error message is received:
ModuleNotFoundError: No module named 'distutils.cmd'
And distutils cannot be installed on python 3.7 without sudo permission
Do you have any ideas? I have been reading through the code a little to try and figure out why this may be happening.
Traceback (most recent call last):
File "GNN_CV_training.py", line 434, in
random_seed=RANDOM_SEED,
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/polygnn_trainer/train.py", line 373, in train_kfold_ensemble
model, train_pts, val_pts, scaler_dict, train_config, break_bad_grads=False
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/polygnn_trainer/train.py", line 182, in train_submodel
train_pts = tc.get_train_dataloader()
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/polygnn_trainer/train.py", line 368, in
training_df
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/polygnn_trainer/train.py", line 345, in cv_get_train_dataloader
return training_df.apply(get_data_augmented, axis=1).values.tolist()
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/pandas/core/frame.py", line 7552, in apply
return op.get_result()
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/pandas/core/apply.py", line 185, in get_result
return self.apply_standard()
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/pandas/core/apply.py", line 276, in apply_standard
results, res_index = self.apply_series_generator()
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/pandas/core/apply.py", line 305, in apply_series_generator
results[i] = self.f(v)
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/polygnn_trainer/train.py", line 331, in get_data_augmented
data = augmented_featurizer(x.smiles_string)
File "GNN_CV_training.py", line 270, in
augmented_featurizer = lambda x: random.sample(eq_graph_tensors[x], k=1)[0]
KeyError: '[]C(C)(C(=O)OCCCS(=O)(=O)[N-]S(=O)(=O)C(F)(F)F)COCCOCCOCCOCCOCCOCCOCCOCCOCCOCC[].[Li+]'
in the sample.csv, the values of Egc and Egb seem to be reversed:
sample.csv:
https://www.polymergenome.org :
and by the way, how to get the full dataset? the website https://khazana.gatech.edu/ seems have ssl and nginx 400 mistake, or I should get some keywords to get the dataset
I am getting a matrix multiplication error that is a few layers down in the code. Currently it is trying to multiply a 50x128 matrix by a 129x64 matrix. I am assuming the correct multiplication dimension length is 128, but I am not sure what to do to make this happen.
I was wondering what the best way was to figure out what is causing this error and how to fix it.
Error pasted here:
Traceback (most recent call last):
File "GNN_training.py", line 281, in
optimal_capacity = session.choose_model_size_by_overfit()
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/nndebugger/dl_debug.py", line 387, in choose_model_size_by_overfit
start=start,
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/nndebugger/torch_utils.py", line 72, in default_per_epoch_trainer
output = model(data)
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/data/oliver/polygnn/polygnn/models.py", line 63, in forward
x = self.final_mlp(x) # hidden layers
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/polygnn_trainer/layers.py", line 106, in forward
x = layer(x)
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/polygnn_trainer/layers.py", line 41, in forward
return self.dropout(self.activation(self.linear(x)))
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/oliver/.cache/pypoetry/virtualenvs/polygnn-5wmT02iB-py3.7/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (50x128 and 129x64)
how to get the whole data used in this paper
Hi,
Im trying to tune my model HP using a subset of my data and then train on the whole dataset. I am running into this issue of 'inconsistent numbers of samples:'.
In the code i changed where it begins to '# split train and val data'; I changed the split to split on the subset (master_data) instead of group data.
Hi, Our systems were recently updated to CUDA 12.3 and Im having issues with dependencies. How should i go about using polyGNN for CUDA 12.3?
Users have reported that they need to change the wheel version from 0.37.1 to 0.40.0 in pyproject.toml manually.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.