MCPcopy Create free account
hub / github.com/caelan/pddlstream / process_stream_queue

Function process_stream_queue

pddlstream/algorithms/incremental.py:68–84  ·  view source on GitHub ↗
(instantiator, store, complexity_limit=INF, verbose=False)

Source from the content-addressed store, hash-verified

66 return new_results
67
68def process_stream_queue(instantiator, store, complexity_limit=INF, verbose=False):
69 instances = []
70 results = []
71 num_successes = 0
72 while not store.is_terminated() and instantiator and (instantiator.min_complexity() <= complexity_limit):
73 instance = instantiator.pop_stream()
74 if instance.enumerated:
75 continue
76 instances.append(instance)
77 new_results = process_instance(instantiator, store, instance, verbose=verbose)
78 results.extend(new_results)
79 num_successes += bool(new_results) # TODO: max_results?
80 if verbose:
81 print('Eager Calls: {} | Successes: {} | Results: {} | Counts: {}'.format(
82 len(instances), num_successes, len(results),
83 str_from_object(Counter(instance.external.name for instance in instances))))
84 return len(instances)
85
86# def retrace_stream_plan(store, domain, goal_expression):
87# # TODO: retrace the stream plan that supports the plan to find the certificate

Callers 2

solve_abstractFunction · 0.90
solve_incrementalFunction · 0.85

Calls 5

str_from_objectFunction · 0.90
is_terminatedMethod · 0.80
min_complexityMethod · 0.80
pop_streamMethod · 0.80
process_instanceFunction · 0.70

Tested by

no test coverage detected