Orchestrators API πΌ
Orchestrators form the execution layer of FlowyML. They decide where and how each step runs β locally in a subprocess, inside a Docker container, or remotely on managed infrastructure such as Vertex AI, SageMaker, or Kubernetes. Every orchestrator implements the Executor base class, ensuring a uniform interface for step dispatch, resource allocation, and failure handling regardless of the target environment.
Orchestrators manage the execution of pipeline steps.
Base Executor
Base executor for running pipeline steps.
Functions
execute_step(step, inputs: dict[str, Any], context_params: dict[str, Any], cache_store: Any | None = None, artifact_store: Any | None = None, run_id: str | None = None, project_name: str = 'default', all_outputs: dict[str, Any] | None = None) -> ExecutionResult
Execute a single step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step
|
Step to execute |
required | |
inputs
|
dict[str, Any]
|
Input data for the step |
required |
context_params
|
dict[str, Any]
|
Parameters from context |
required |
cache_store
|
Any | None
|
Cache store for caching |
None
|
artifact_store
|
Any | None
|
Artifact store for logging results |
None
|
run_id
|
str | None
|
Unique ID for this pipeline run |
None
|
project_name
|
str
|
Name of the project |
'default'
|
all_outputs
|
dict[str, Any] | None
|
Collection of all step outputs for conditional evaluation |
None
|
Returns:
| Type | Description |
|---|---|
ExecutionResult
|
ExecutionResult with output or error |
Source code in flowyml/core/executor.py
execute_step_group(step_group, inputs: dict[str, Any], context: Any | None = None, context_params: dict[str, Any] | None = None, cache_store: Any | None = None, artifact_store: Any | None = None, run_id: str | None = None, project_name: str = 'default') -> list[ExecutionResult]
Execute a group of steps together.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_group
|
StepGroup to execute |
required | |
inputs
|
dict[str, Any]
|
Input data available to the group |
required |
context
|
Any | None
|
Context object for per-step parameter injection (preferred) |
None
|
context_params
|
dict[str, Any] | None
|
Parameters from context (deprecated, use context instead) |
None
|
cache_store
|
Any | None
|
Cache store for caching |
None
|
artifact_store
|
Any | None
|
Artifact store for materialization |
None
|
run_id
|
str | None
|
Run identifier |
None
|
project_name
|
str
|
Project name |
'default'
|
Returns:
| Type | Description |
|---|---|
list[ExecutionResult]
|
List of ExecutionResult (one per step) |
Source code in flowyml/core/executor.py
Local Executor
Bases: Executor
Local executor - runs steps in the current process.
Functions
execute_step(step, inputs: dict[str, Any], context_params: dict[str, Any], cache_store: Any | None = None, artifact_store: Any | None = None, run_id: str | None = None, project_name: str = 'default', all_outputs: dict[str, Any] | None = None) -> ExecutionResult
Execute step locally with retry, caching, and materialization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step
|
Step to execute |
required | |
inputs
|
dict[str, Any]
|
Input data for the step |
required |
context_params
|
dict[str, Any]
|
Parameters from context |
required |
cache_store
|
Any | None
|
Cache store for caching |
None
|
artifact_store
|
Any | None
|
Artifact store for logging results |
None
|
run_id
|
str | None
|
Unique ID for this pipeline run |
None
|
project_name
|
str
|
Name of the project |
'default'
|
all_outputs
|
dict[str, Any] | None
|
Collection of all step outputs for conditional evaluation |
None
|
Returns:
| Type | Description |
|---|---|
ExecutionResult
|
ExecutionResult with output or error |
Source code in flowyml/core/executor.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | |
execute_step_group(step_group, inputs: dict[str, Any], context: Any | None = None, context_params: dict[str, Any] | None = None, cache_store: Any | None = None, artifact_store: Any | None = None, run_id: str | None = None, project_name: str = 'default') -> list[ExecutionResult]
Execute a group of steps together in the same environment.
For local execution, steps execute sequentially but share the same process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_group
|
StepGroup containing steps to execute |
required | |
inputs
|
dict[str, Any]
|
Input data available to the group |
required |
context
|
Any | None
|
Context object for per-step parameter injection (preferred) |
None
|
context_params
|
dict[str, Any] | None
|
Parameters from context (deprecated, use context instead) |
None
|
cache_store
|
Any | None
|
Cache store for caching |
None
|
artifact_store
|
Any | None
|
Artifact store for materialization |
None
|
run_id
|
str | None
|
Run identifier |
None
|
project_name
|
str
|
Project name |
'default'
|
Returns:
| Type | Description |
|---|---|
list[ExecutionResult]
|
List of ExecutionResult (one per step in execution order) |
Source code in flowyml/core/executor.py
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 | |
Vertex AI Orchestrator
Bases: RemoteOrchestrator
Vertex AI orchestrator for running pipelines on Google Cloud.
This orchestrator submits pipeline jobs to Vertex AI Pipelines, allowing for scalable, managed execution in the cloud.
Example
Initialize Vertex AI orchestrator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the orchestrator |
'vertex_ai'
|
project_id
|
str | None
|
GCP project ID |
None
|
region
|
str
|
GCP region for Vertex AI |
'europe-west1'
|
service_account
|
str | None
|
Service account email for job execution |
None
|
network
|
str | None
|
VPC network for jobs |
None
|
encryption_key
|
str | None
|
Customer-managed encryption key |
None
|
staging_bucket
|
str | None
|
GCS staging bucket for job artifacts |
None
|
Source code in flowyml/stacks/gcp.py
Functions
get_run_details(job_id: str) -> dict
Get full details of a Vertex AI job.
Returns comprehensive job metadata including timing, resource usage, and error information for the FlowyML dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
The job resource name. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary with job details. |
Source code in flowyml/stacks/gcp.py
get_run_logs(job_id: str, max_entries: int = 200) -> str
Get logs for a Vertex AI job from Cloud Logging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
The job resource name. |
required |
max_entries
|
int
|
Maximum number of log entries to fetch. |
200
|
Returns:
| Type | Description |
|---|---|
str
|
String containing the logs. |
Source code in flowyml/stacks/gcp.py
get_run_status(job_id: str) -> ExecutionStatus
Get status of a Vertex AI job.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
The job resource name. |
required |
Returns:
| Type | Description |
|---|---|
ExecutionStatus
|
ExecutionStatus enum value. |
Source code in flowyml/stacks/gcp.py
run_pipeline(pipeline: Any, run_id: str, resources: ResourceConfig | None = None, docker_config: DockerConfig | None = None, inputs: dict[str, Any] | None = None, context: dict[str, Any] | None = None, **kwargs: Any) -> SubmissionResult
Run pipeline on Vertex AI with per-group orchestration.
This is the core ZenML-parity feature: run a local command, and
FlowyML automatically:
1. Analyzes the pipeline DAG into execution groups
2. Builds a Docker image for linux/amd64 (if needed)
3. Pushes it to Artifact Registry
4. Submits each group as a separate Vertex AI CustomJob
5. Each container runs flowyml step-runner --steps ...
6. Waits for each group before submitting the next
7. Streams logs back to the local console
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline
|
Any
|
Pipeline to run |
required |
run_id
|
str
|
Run identifier |
required |
resources
|
ResourceConfig | None
|
Default resource configuration (overridden per-group) |
None
|
docker_config
|
DockerConfig | None
|
Docker configuration (image, env vars) |
None
|
inputs
|
dict[str, Any] | None
|
Input data |
None
|
context
|
dict[str, Any] | None
|
Context variables |
None
|
**kwargs
|
Any
|
Additional arguments |
{}
|
Returns:
| Type | Description |
|---|---|
SubmissionResult
|
SubmissionResult with job metadata for all groups |
Source code in flowyml/stacks/gcp.py
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 | |
stop_run(job_id: str, graceful: bool = True) -> None
Cancel a Vertex AI job.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
The job resource name. |
required |
graceful
|
bool
|
Whether to wait for graceful shutdown. |
True
|
Source code in flowyml/stacks/gcp.py
stream_logs(job_id: str, poll_interval: float = 5.0)
Stream logs from a Vertex AI job in real-time.
Yields log lines as they become available, suitable for driving the FlowyML GUI's live log viewer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
The job resource name. |
required |
poll_interval
|
float
|
Seconds between polling for new log entries. |
5.0
|
Yields:
| Type | Description |
|---|---|
|
dict with keys: timestamp, severity, message, is_finished |
Source code in flowyml/stacks/gcp.py
to_dict() -> dict[str, Any]
Convert to dictionary.
Source code in flowyml/stacks/gcp.py
validate() -> bool
Validate Vertex AI configuration.
Source code in flowyml/stacks/gcp.py
See Also
- Plugins Overview β how orchestrator backends are registered as plugins
- Deployment Guide β end-to-end guide for deploying pipelines to production