Skip to content

Commit 88b1f59

Browse files
committed
Fix missing imports; remove prints.
1 parent 1c1235d commit 88b1f59

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

popper/gen2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def __init__(self, settings, bkcons=[]):
5656

5757
# AC: NEED TO COMPLETELY REFACTOR THIS CODE
5858
for p,a in settings.pointless:
59-
bias_text = re.sub(rf'body_pred\({p},\s*{a}\)\.', '', bias_text) bias_text = re.sub(rf'constant\({p},.*?\).*', '', bias_text, flags=re.MULTILINE)
59+
bias_text = re.sub(rf'body_pred\({p},\s*{a}\)\.', '', bias_text)
60+
bias_text = re.sub(rf'constant\({p},.*?\).*', '', bias_text, flags=re.MULTILINE)
6061

6162
encoding.append(bias_text)
6263
encoding.append(f'max_clauses({settings.max_rules}).')

popper/loop.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from itertools import chain, combinations, permutations
55

66
from bitarray.util import any_and, ones, subset
7+
from typing import Optional, Set
78

89
from .bkcons import deduce_bk_cons, deduce_non_singletons, deduce_recalls, deduce_type_cons
910
from .combine import Combiner
@@ -173,8 +174,6 @@ def run(self, bkcons):
173174
# generate a program
174175
with settings.stats.duration('generate'):
175176
prog = generator.get_prog()
176-
print("Generated prog: {}".format(prog))
177-
settings.logger.info("Generated prog: {}".format(prog))
178177
if prog is None:
179178
break
180179

@@ -203,7 +202,6 @@ def run(self, bkcons):
203202
prog_size)
204203
else:
205204
pos_covered, inconsistent = tester.test_prog(prog)
206-
print(f"pos_covered: {pos_covered}, inconsistent: {inconsistent}")
207205
# @CH: can you explain these?
208206
skipped, skip_early_neg = False, False
209207

@@ -1634,7 +1632,6 @@ def learn_solution(settings):
16341632
tester = Tester(settings)
16351633

16361634
bkcons = get_bk_cons(settings, tester)
1637-
print("Have incorporated bk cons.")
16381635
time_so_far = time.time() - t1
16391636
timeout(settings, popper, (settings, tester, bkcons), timeout_duration=int(settings.timeout - time_so_far), )
16401637
return settings.solution, settings.best_prog_score, settings.stats

0 commit comments

Comments
 (0)