GithubHelp home page GithubHelp logo

ramprasad-group / polygnn Goto Github PK

View Code? Open in Web Editor NEW
30.0 1.0 5.0 16.96 MB

polyGNN is a Python library to automate ML model training for polymer informatics.

License: Other

Python 100.00%
data-driven-design data-science machine-learning materials-informatics materials-science polymer polymer-informatics rdkit artificial-intelligence graph-neural-network

polygnn's People

Contributors

dependabot[bot] avatar rishigurnani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

polygnn's Issues

Poor Prediction Results

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:

  • three parity plots (plots.png),
  • the output log file (mT_Log.txt)
  • the altered python file that I used to run polygnn (GNN_CV_training.txt)

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.

plots
mT_Log.txt
GNN_CV_training.txt

Create a `example_predict.py` file

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.

Issue with installation

HI, while installing polyGNN with a virtual environment, we face the following issue:
image

Could you please help us out?
Thanks in advance!

Model seemingly not converging

image
Hi, was wondering how I can get the model to converge, the high RMSE and low R2 seem to be almost unchanging. Any leads?

Memory Allocation Error

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

smiles_featurizer;'ValueError: Invalid repeat unit. Periodic bond types are mismatching.'

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'
Screenshot 2023-08-22 at 7 04 46 PM

Update citation details

The current citation details in the README correspond to the ArXiv preprint. They should be updated to the Chem. Mat. version.

About Dataset

Hi, I only find part of the dataset in your paper in Khazana. Can you provide a full dataset use in your article? Thanks!

ModuleNotFoundError: No module named 'distutils.cmd'

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

Smiles Key Error

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+]'

Debugging Matrix Multiplication Error

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)

Running with CUDA 12.3

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?

Update wheel version

Users have reported that they need to change the wheel version from 0.37.1 to 0.40.0 in pyproject.toml manually.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.