Closed hcp4715 closed 2 years ago
I also encountered the same problem, and after my troubleshooting of the source code, I have a few discoveries.
hddm.model_config.model_config.py
module, there is a config definition for "full_ddm"
and "ddm_vanilla"
."full_ddm"
in hddm.torch.torch_config.py
where it just have "ddm" network file.
Therefore, it will occur an error when the model
is defined as "full ddm", but not when it is defined as "ddm" or "levy".I guess the reason may be that the contributor forgot to update this part. It's also possible that I only installed pytorch for cpu instead of pytorch for cuda, which may also be a problem.
Hi, Wanke,
I can reproduce your error in my docker image (see the screenshot below), but it's not related to the Pytorch version but the content of this script in HDDM. As you can see from the script, full_ddm
is not in the config file, caused error when running TorchConfig
, in contrast, model angle
is in the list and worked.
Maybe @AlexanderFengler can help to solve this issue.
reproduced error:
model_config has "doc" keys which give some info for each model now. It reflects that full_ddm
is missing atm.
It will appear soon. full_ddm
got lost in updating everything from keras to pytorch.
I assume (as per above) the pytorch error can be considered resolved by using more recent pytorch versions. Will update pytorch dependency to be > 1.7, didn't realize they made breaking changes when it comes to loading models (but I should have learned that lesson from tensorflow / keras earlier..).
Best, Alex
Dear there,
I am trying to package HDDM 0.9.0 into a docker image, it seem that I can generate the docker images without error, but when I am trying the
HDDMnn
example (https://hddm.readthedocs.io/en/latest/lan_new_classes.html#short-example), an version error occurred.The
PyTorch
was installed viaconda
:The PyTorch version is 1.4.0, as the returned by the command below
here is the screenshot of the short example:
I doubt this error is related to the version of pytorch, but not very sure about it.
The error message of the last cell is pasted below:
2021.11.30 Update:
I tried to look into the details of the error message, the error was generated from
torch.load()
Then I check why this happen, the problem is: model trained in higher version of PyTorch, e.g., 1.7.0, can not be directly loaded by lower version PyTorch 1.4.0.
There are two solutions. One is to save the model file that compatible with lower version:
The other is using the higher version of
PyTorch
. I tried the latter solution. After testing with the latest and older version of PyTorch, now it seems that PyTorch 1.7.0 works with py 3.8.8 and other packages.I've updated the docker image.