changeset 1620:92f8deb59735

log layout
author drewp@bigasterisk.com
date Wed, 08 Sep 2021 18:42:53 -0700
parents e24058ae4806
children da235054caa0
files service/mqtt_to_rdf/inference.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/service/mqtt_to_rdf/inference.py	Wed Sep 08 18:39:12 2021 -0700
+++ b/service/mqtt_to_rdf/inference.py	Wed Sep 08 18:42:53 2021 -0700
@@ -102,6 +102,7 @@
         if not orderedValueSets:
             yield CandidateBinding({})
             return
+
         if not orderedValueSets or not all(orderedValueSets):
             # some var or bnode has no options at all
             return
@@ -111,7 +112,7 @@
         while True:
             for col, curr in enumerate(currentSet):
                 currentSet[col] = next(rings[col])
-                log.debug(repr(currentSet))
+                log.debug(f'{INDENT*4} currentSet: {repr(currentSet)}')
                 yield CandidateBinding(dict(zip(orderedVars, currentSet)))
                 if curr is not starts[col]:
                     break
@@ -240,10 +241,10 @@
             log.debug(f'{INDENT*3} rule has a working binding:')
 
             for lhsBoundStmt in bound.binding.apply(bound.lhsStmtsWithoutEvals()):
-                log.debug(f'{INDENT*5} adding {lhsBoundStmt=}')
+                log.debug(f'{INDENT*4} adding {lhsBoundStmt=}')
                 workingSet.add(lhsBoundStmt)
             for newStmt in bound.binding.apply(self.rhsGraph):
-                log.debug(f'{INDENT*5} adding {newStmt=}')
+                log.debug(f'{INDENT*4} adding {newStmt=}')
                 workingSet.add(newStmt)
                 implied.add(newStmt)
 
@@ -279,6 +280,7 @@
         delta = 1
         stats['initWorkingSet'] = cast(int, workingSet.__len__())
         while delta > 0 and bailout_iterations > 0:
+            log.debug('')
             log.info(f'{INDENT*1}*iteration ({bailout_iterations} left)')
             bailout_iterations -= 1
             delta = -len(implied)