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

How to run CGCNN through Jupyter or Python interface #22

Open
sgbaird opened this issue Jan 6, 2021 · 4 comments
Open

How to run CGCNN through Jupyter or Python interface #22

sgbaird opened this issue Jan 6, 2021 · 4 comments

Comments

@sgbaird
Copy link

sgbaird commented Jan 6, 2021

I'm able to run CGCNN on a command line interface (PowerShell) through Anaconda, but I'm curious if you have suggestions for using it with an IDE.

@sgbaird
Copy link
Author

sgbaird commented Jan 6, 2021

%run main.py data/sample-regression
and
%run predict.py pre-trained/formation-energy-per-atom.pth.tar data/sample-regression
seem to do the trick in a Jupyter Notebook.

@sgbaird
Copy link
Author

sgbaird commented Jan 7, 2021

For Spyder, one way to go about it is using runfile() or debugfile(), i.e.

runfile(<path-to-main.py>, args='data/sample-regression', wdir=<path-to-working-directory>)

or

debugfile(<path-to-main.py>, args='data/sample-regression', wdir=<path-to-working-directory>)

e.g.

runfile('main.py', args='data/sample-regression', wdir='.')

@mliu7051

@txie-93
Copy link
Owner

txie-93 commented Jan 21, 2021

Another potential approach is to copy the code in main.py into a Jupyter notebook. This would allow to modify the code in the notebook as well.

@Amadeus-System
Copy link

Maybe you should copy and paste all the cgcnn code in your jupyter notebook in sequence, and should amend "args" part to a class with instance attributes. I am using cgcnn model like that. Until now, It's working well. hope you success!

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

3 participants