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

TypeError: unhashable type: 'GroundLit' #27

Open
tinicode opened this issue Jul 20, 2019 · 0 comments
Open

TypeError: unhashable type: 'GroundLit' #27

tinicode opened this issue Jul 20, 2019 · 0 comments

Comments

@tinicode
Copy link

I created my own test example to run inference with Gibbs Sampler. My python code is leaned on the given test file. But running the python script gives me the following error:

Traceback (most recent call last):
File "/Users/thaonguyen/Documents/Environments/pracmln_env/lib/python3.7/site-packages/pracmln/example/test_pet.py", line 38, in
main()
File "/Users/thaonguyen/Documents/Environments/pracmln_env/lib/python3.7/site-packages/pracmln/example/test_pet.py", line 33, in main
test_GibbsSampler()
File "/Users/thaonguyen/Documents/Environments/pracmln_env/lib/python3.7/site-packages/pracmln/example/test_pet.py", line 29, in test_GibbsSampler
multicore=True).run().write()
File "/Users/thaonguyen/Documents/Environments/pracmln_env/lib/python3.7/site-packages/pracmln/mlnquery.py", line 242, in run
inference = self.method(mrf, self.queries, **params)
File "/Users/thaonguyen/Documents/Environments/pracmln_env/lib/python3.7/site-packages/pracmln/mln/inference/gibbs.py", line 47, in init
for v in vars
: self.var2gf[v].add(gf)
TypeError: unhashable type: 'GroundLit'_

If I use the smoking example instead of my own, the inference test works. Seems like something is wrong with my example. So I checked the syntax of the data files but couldn't find any mistakes...

I'd really appreciate your help. Many thanks in advance!

--> example attached
pracmln_pet_example.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant