INNER CODE UNIT · Python

_print_dag_enhanced

F-R-L/forge-film · forge/cli.py:205

def _print_dag_enhanced(plan, routing: dict, cfg=None):
    """Print DAG with scene_type, assigned backend, and CPM priority."""
    from forge.scheduler.cpm import compute_critical_path_with_routing
    cp = compute_critical_path_with_routing(plan.dag, plan.scenes, routing)
    max_cp = max(cp.values(), default=1.0)

    table = Table(title=f"Production Plan: {plan.title}", show_lines=True)
    table.add_column("Scene", style="cyan", no_wrap=True)
    table.add_column("Type", style="magenta")
    table.add_column("Backend", style="green")
    table.add_column("CP Priority", justify="right")
    table.add_column("Depends On")
    table.add_column("Description", max_width=50)

    for scene in plan.scenes:
        scene_type_val = scene.scene_type.value if hasattr(scene.scene_type, "value") else str(scene.scene_type)
        backend = routing.get(scene_type_val, routing.get("default", "mock"))
        cp_val = cp.get(scene.id, 0.0)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…