(evaluations, stream_plan, iteration)
| 70 | visualize_stream_plan_bipartite(stream_plan, os.path.join(STREAM_PLAN_DIR, filename)) |
| 71 | |
| 72 | def 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 |
no test coverage detected