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

Function create_visualizations

pddlstream/algorithms/visualization.py:72–92  ·  view source on GitHub ↗
(evaluations, stream_plan, iteration)

Source from the content-addressed store, hash-verified

70 visualize_stream_plan_bipartite(stream_plan, os.path.join(STREAM_PLAN_DIR, filename))
71
72def create_visualizations(evaluations, stream_plan, iteration):
73 # TODO: place it in the temp_dir?
74 # TODO: decompose any joint streams
75 for result in stream_plan:
76 create_synthesizer_visualizations(result, iteration)
77 filename = ITERATION_TEMPLATE.format(iteration)
78 # visualize_stream_plan(stream_plan, path)
79
80 constraints = set() # TODO: approximates needed facts using produced ones
81 for stream in stream_plan:
82 constraints.update(filter(lambda f: evaluation_from_fact(f) not in evaluations, stream.get_certified()))
83 print('Constraints:', str_from_object(constraints))
84 visualize_constraints(constraints, os.path.join(CONSTRAINT_NETWORK_DIR, filename))
85
86 from pddlstream.retired.synthesizer import decompose_stream_plan
87 decomposed_plan = decompose_stream_plan(stream_plan)
88 if len(decomposed_plan) != len(stream_plan):
89 visualize_stream_plan(decompose_stream_plan(stream_plan), os.path.join(STREAM_PLAN_DIR, filename))
90
91 #visualize_stream_plan_bipartite(stream_plan, os.path.join(STREAM_PLAN_DIR, 'fused_' + filename))
92 visualize_stream_plan(stream_plan, os.path.join(STREAM_PLAN_DIR, 'fused_' + filename))
93
94##################################################
95

Callers 1

solve_abstractFunction · 0.90

Calls 8

evaluation_from_factFunction · 0.90
str_from_objectFunction · 0.90
decompose_stream_planFunction · 0.90
visualize_constraintsFunction · 0.85
visualize_stream_planFunction · 0.85
updateMethod · 0.45
get_certifiedMethod · 0.45

Tested by

no test coverage detected