drcassar / glasspy Goto Github PK
View Code? Open in Web Editor NEWPython module for scientists working with glass materials
Home Page: https://glasspy.readthedocs.io
License: Other
Python module for scientists working with glass materials
Home Page: https://glasspy.readthedocs.io
License: Other
Hello @drcassar,
I'm the creator of SciGlass Next.
I would like to integrate some glass property prediction models into the SciGlass Next Python backend.
GlassNet seems to be the only open source (python) model so far in the internet.๐ค
I am very appreciative of your work!
The current plan is to integrate ML models from our group developed by my colleague (papers submitted) and [GlassNet] (https://arxiv.org/abs/2303.15538).
Before I continue, I would like to ask
If there will be any major updates to the package? (I saw there's a dev branch)
And also regarding performance, does the user benefit from having a GPU when making prediction or training?
(I will mainly focus on the prediction part for the integration and won't retrain the model).
I will first make a prediction for all data that falls within the range and store the predicted values in the database.
And the web interface is used to predict properties from glass compositions entered by the user (simple use case).
Or for the advanced use case, batch predictions all at once. (this will probably take longer time for our server)
I will get back to you when I have more information (UI designs or some benchmarks) and hope you can give me your feedback or insights and even ideas for the UI design!
I want to know why you drop some data from the original database?
I am curious about the chosen conversion of the viscosity data from the sciglass data to the glasspy data.
In translators.py
we have, e.g. for V500
, the following:
"V500": { "info": "Viscosity at 773 K", "rename": "Viscosity773K", "convert": lambda x: 10 ** (x - 1), "unit": "Pa.s", }
Why do you calculate 10**(x-1)
and not just 10**x
?
I presumed that V500
in the sciglass database is the log10-value of the viscosity at 500C.
Is it actually the the log10-value plus 1 instead? (How do I get this kind of information about the properties in the sciglass database?)
I'm interested in doing transfer learning from the original GlassNet
model to the prediction of other glass properties - is this possible within the current glasspy
framework?
Hi, we updated GlassPy to 0.4.2 (from 0.4.0), and since then cannot load GlassNet. It seems that a model file is missing in 0.4.2.
The problem is solved downgrading to 0.4.0 for now. We did not test if it replicates in 0.4.1, but in 0.4.2 we replicated the problem on two different installs on two Mac OS computers.
FileNotFoundError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 model = GlassNet()
File ~/anaconda3/envs/ml/lib/python3.9/site-packages/glasspy/predict/models.py:578, in GlassNet.init(self, st_models)
576 self.st_dict = {}
577 for target in self._st_models:
--> 578 _model = GlassNetSTNN(target)
579 _model.eval()
580 self.st_dict[target] = _model
File ~/anaconda3/envs/ml/lib/python3.9/site-packages/glasspy/predict/models.py:501, in GlassNetSTNN.init(self, model_name)
493 self.tasks = nn.ModuleList(
494 [
495 nn.Sequential(nn.Linear(dim, 10), nn.ReLU(), nn.Linear(10, 1))
496 for n in range(self.hparams["n_targets"])
497 ]
498 )
500 self.training_file = _BASEMODELPATH / f"st-nn/{model_name}.p"
--> 501 self.load_training(self.training_file)
File ~/anaconda3/envs/ml/lib/python3.9/site-packages/glasspy/predict/base.py:940, in MLP.load_training(self, path)
938 def load_training(self, path):
939 state_dict, learning_train, learning_val, hparams = pickle.load(
--> 940 open(path, "rb")
941 )
942 self.load_state_dict(state_dict)
943 self.learning_curve_train = learning_train
FileNotFoundError: [Errno 2] No such file or directory: '/Users/charleslelosq/anaconda3/envs/ml/lib/python3.9/site-packages/glasspy/predict/models/st-nn/AbbeNum.p'
Setup:
Windows 10
Python 3.11.6 (64bit) & Python 3.9.13 (64bit)
Code:
from glasspy.predict import GlassNet
model = GlassNet()
composition = "Li2O(SiO2)2"
predictions = model.predict(composition)
print(predictions)
Expected output:
Table as shown in https://glasspy.readthedocs.io/en/latest/intro/notebooks/glasspy_predict.html
Actual output:
FileNotFoundError: Could not find module 'C:\Program Files\Python311\Lib\site-packages\torchaudio\lib\libtorchaudio.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
Comments:
I have tried this on fresh installs for both Python versions and get the same error. The file "libtorchaudio.pyd" is in the folder specified in the error. This is the same for both Python versions.
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.