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

Errors on educational example (it's not duplicated). #82

Open
daisylab opened this issue Mar 3, 2023 · 0 comments
Open

Errors on educational example (it's not duplicated). #82

daisylab opened this issue Mar 3, 2023 · 0 comments

Comments

@daisylab
Copy link

daisylab commented Mar 3, 2023

While trying to replicate the result from the educational examples, I've got this error.

  1. url:
    https://ibm.github.io/LNN/education/examples/reasoning.html#more-complex-reasoning-example

  2. code:

from lnn import (Predicate, Variable, Join, And,
                 Exists, Implies, Forall, Model, Fact, World)

model = Model()  # Instantiate a model.
x, y, z, w = map(Variable, ['x', 'y', 'z', 'w'])

# Define and add predicates to the model.
owns = model['owns'] = Predicate('owns', 2)  # binary predicate
  1. result:
Traceback (most recent call last):
  File "/home/sungjin/home/lnn-examples/complex.py", line 9, in <module>
    owns = model['owns'] = Predicate('owns', 2)  # binary predicate
TypeError: 'Model' object does not support item assignment
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