-
Notifications
You must be signed in to change notification settings - Fork 7
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
Import error of GlassNet in 0.4.2 #10
Comments
Thanks a lot @charlesll! It should be fixed now in v0.4.3. Could you please test and report back? |
I now get another error, from a file not found at module import: |
Thanks again for your input, @charlesll. For now, please try to install GlassPy using |
I confirm, it works! |
Thanks! I will leave the issue open until I sort out how to work with the size limit on PyPI. |
Hi @charlesll, if possible, could you please test installing GlassPy v0.4.4 from pip ( |
Hi @drcassar, install is good on Mac OS 13.4.1 (Intel processor). GlassNet predictions work. Getting data from SciGlass effectively download SciGlass and it seems to work well. |
Great, thanks a lot @charlesll! I will close this issue as it seems to be solved now. |
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'
The text was updated successfully, but these errors were encountered: