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

import error #52

Open
wwtian opened this issue Feb 21, 2022 · 1 comment
Open

import error #52

wwtian opened this issue Feb 21, 2022 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@wwtian
Copy link

wwtian commented Feb 21, 2022

Hi,

I installed bgflow by
pip install git+https://github.com/noegroup/bgflow.git

The installation is successful, but when I import bgflow in notebook, I get the following error messages. How can I sove this problem? Thanks!


TypeError Traceback (most recent call last)
in
1 import torch
2 import matplotlib.pyplot as plt
----> 3 import bgflow as bg
4
5 # define prior and target

~/anaconda3/lib/python3.7/site-packages/bgflow/init.py in
8 del get_versions, versions
9
---> 10 from .distribution import *
11 from .nn import *
12 from .factory import *

~/anaconda3/lib/python3.7/site-packages/bgflow/distribution/init.py in
34 """
35
---> 36 from .distributions import *
37 from .energy import *
38 from .sampling import *

~/anaconda3/lib/python3.7/site-packages/bgflow/distribution/distributions.py in
69
70
---> 71 class _SloppyUniform(torch.distributions.Uniform):
72 def init(self, *args, tol=1e-5, **kwargs):
73 super().init(*args, **kwargs)

~/anaconda3/lib/python3.7/site-packages/bgflow/distribution/distributions.py in _SloppyUniform()
74 self.tol = tol
75
---> 76 @constraints.dependent_property(is_discrete=False, event_dim=0)
77 def support(self):
78 return constraints.interval(self.low-self.tol, self.high+self.tol)

TypeError: 'is_discrete' is an invalid keyword argument for property()

@wwtian wwtian added bug Something isn't working question Further information is requested labels Feb 21, 2022
@Olllom
Copy link
Contributor

Olllom commented Feb 21, 2022

Hi,

try updating your pytorch version. We only test bgflow with torch>=1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants