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

Running plain Popper models does not work #2

Closed
hakank opened this issue Aug 25, 2022 · 2 comments
Closed

Running plain Popper models does not work #2

hakank opened this issue Aug 25, 2022 · 2 comments

Comments

@hakank
Copy link

hakank commented Aug 25, 2022

After fixing the error reporting in #1 (commenting the lines regarding args.info in utils.py), the MagicPopper specific examples works, but for the plain Popper examples errors are thrown.

$ python3 popper.py examples/alleven       
Traceback (most recent call last):
  File "popper.py", line 7, in <module>
    settings = Settings()
  File "/home/hakank/inductive_programming/andrewcropper/popper/magicpopper/magicpopper/popper/util.py", line 447, in __init__
    self.logger.debug(f'Max vars: {self.max_vars}')
AttributeError: 'Settings' object has no attribute 'max_vars'

After commenting the offending line and the next line (since it yields a similar error):

   # self.logger.debug(f'Max vars: {self.max_vars}')
   # self.logger.debug(f'Max body: {self.max_body}')

then the program throws this error:

Traceback (most recent call last):
  File "popper.py", line 8, in <module>
    prog, score, stats = learn_solution(settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/magicpopper/magicpopper/popper/loop.py", line 316, in learn_solution
    timeout(settings, popper, (settings,), timeout_duration=int(settings.timeout),)
  File "/home/hakank/inductive_programming/andrewcropper/popper/magicpopper/magicpopper/popper/util.py", line 78, in timeout
    raise moo
  File "/home/hakank/inductive_programming/andrewcropper/popper/magicpopper/magicpopper/popper/util.py", line 70, in timeout
    result = func(*args, **kwargs)
  File "/home/hakank/inductive_programming/andrewcropper/popper/magicpopper/magicpopper/popper/loop.py", line 67, in popper
    generator = Generator(settings, grounder)
  File "/home/hakank/inductive_programming/andrewcropper/popper/magicpopper/magicpopper/popper/generate.py", line 40, in __init__
    encoding.append(f'max_body({settings.max_body}).')
AttributeError: 'Settings' object has no attribute 'max_body'
@celinehocquette
Copy link
Owner

Thanks for pointing this issue out, I have fixed the default value issue for max_vars and max_body.

@hakank
Copy link
Author

hakank commented Aug 25, 2022

Thanks. I can confirm that it now works.

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

2 participants