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 MagicInfo models yields "AttributeError: 'Namespace' object has no attribute 'info'" #1

Closed
hakank opened this issue Aug 25, 2022 · 1 comment

Comments

@hakank
Copy link

hakank commented Aug 25, 2022

When running any of the examples, e.g.

$ python3 popper examples/iggp-magiccoins

the following error is thrown:

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 364, in __init__
    elif args.info:
AttributeError: 'Namespace' object has no attribute 'info'

After commenting these lines

--- a/magicpopper/popper/util.py
+++ b/magicpopper/popper/util.py
@@ -361,9 +361,9 @@ class Settings:
         elif args.debug:
             log_level = logging.DEBUG
             logging.basicConfig(format='%(asctime)s %(message)s', level=log_level, datefmt='%H:%M:%S')
-        elif args.info:
-            log_level = logging.INFO
-            logging.basicConfig(format='%(asctime)s %(message)s', level=log_level, datefmt='%H:%M:%S')
+        # elif args.info:
+        #     log_level = logging.INFO
+        #     logging.basicConfig(format='%(asctime)s %(message)s', level=log_level, datefmt='%H:%M:%S')
 
         self.stats = Stats(info=info, debug=args.debug, stats_file=args.stats_file)
         self.stats.logger = self.logger

then he specific MagicPopper examples work, e,g,

python3 popper.py examples/iggp-magiccoins-goal

NO MORE SOLUTIONS
********** SOLUTION **********
Precision:1.00 Recall:1.00 TP:62 FN:0 TN:62 FP:0 Size:5
goal(A,you,100):- my_true_step(A,5).
goal(A,you,0):- my_true_step(A,E),different(5,E).
******************************

Note: running any "plain" Popper examples yields an error:

AttributeError: 'Settings' object has no attribute 'max_vars'

I report a separate issue about this.

@celinehocquette
Copy link
Owner

Thanks for pointing this issue, I have fixed it. Let me know if you experience any other problem.

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