Code Monkey home page Code Monkey logo

glasspy's People

Contributors

drcassar 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

glasspy's Issues

Integration to SciGlass Next

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

  1. If there will be any major updates to the package? (I saw there's a dev branch)

  2. 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!

Import error of GlassNet in 0.4.2

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.

The exact error message is the following:

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'

FileNotFoundError: libtorchaudio.pyd

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.

Conversion of viscosity data

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?)

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.