Skip to content

Commit 60401ec

Browse files
committed
Generate graphs enabled
1 parent fa49fb0 commit 60401ec

File tree

5 files changed

+291
-286
lines changed

5 files changed

+291
-286
lines changed

.pipelex/pipelex.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
[pipelex.pipeline_execution_config]
3434
# Set to false to disable conversion of incoming data URLs to pipelex-storage:// URIs
3535
is_normalize_data_urls_to_storage = true
36+
# Set to false to disable generation of execution graphs
37+
is_generate_graph = true
3638

3739
[pipelex.pipeline_execution_config.graph_config.data_inclusion]
3840
# Control what data is included in graph outputs

pipelex/cli/commands/build/pipe_cmd.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from pipelex.builder.builder_loop import BuilderLoop
1313
from pipelex.builder.runner_code import generate_runner_code
1414
from pipelex.cli.cli_factory import make_pipelex_for_cli
15+
from pipelex.cli.commands.build.structures_cmd import generate_structures_from_blueprints
1516
from pipelex.cli.error_handlers import (
1617
ErrorContext,
1718
handle_model_availability_error,
@@ -153,9 +154,9 @@ def build_pipe_cmd(
153154
typer.Option("--no-extras", help="Skip generating inputs.json and runner.py, only generate the PLX file"),
154155
] = False,
155156
graph: Annotated[
156-
bool,
157+
bool | None,
157158
typer.Option("--graph/--no-graph", help="Generate execution graphs for both build process and built pipeline"),
158-
] = True,
159+
] = None,
159160
graph_full_data: Annotated[
160161
bool | None,
161162
typer.Option(
@@ -172,9 +173,6 @@ def build_pipe_cmd(
172173
),
173174
] = None,
174175
) -> None:
175-
# Import here to avoid circular imports
176-
from pipelex.cli.commands.build.structures_cmd import generate_structures_from_blueprints # noqa: PLC0415
177-
178176
make_pipelex_for_cli(context=ErrorContext.VALIDATION_BEFORE_BUILD_PIPE)
179177

180178
typer.secho("🔥 Starting pipe builder... 🚀\n", fg=typer.colors.GREEN)
@@ -304,8 +302,8 @@ async def run_pipeline():
304302
save_text_to_path(text="", path=init_path)
305303
typer.secho(f"✅ Package init file saved to: {init_path}", fg=typer.colors.GREEN)
306304

307-
# Generate graphs if --graph is enabled
308-
if graph and builder_graph_spec:
305+
# Generate graphs if it was tracked during the build process
306+
if builder_graph_spec:
309307
typer.secho("\n📊 Generating graphs...", fg=typer.colors.CYAN)
310308

311309
# Save builder pipeline graph in graphs/ subfolder

0 commit comments

Comments
 (0)