Skip to main content

Define routines as structured algorithmic workflows

Project description

routix

Routix is a lightweight Python toolkit for designing and executing structured algorithmic workflows.

It provides:

  • Subroutine-based execution control (SubroutineController)
  • Structured flow validation (SubroutineFlowValidator)
  • Dot-accessible configuration trees (DynamicDataObject)
  • Logging with routine-context traceability
  • Experiment summary and timing support
  • Abstract base classes for runners in src/routix/runner/ for extensible workflow execution patterns

Subroutine Flow Data Format

Routix executes algorithmic workflows based on a structured and validated subroutine flow. Each step in the flow is represented by a dictionary with clearly defined keys, enabling modular orchestration, logging, and reproducibility.

# my_flow.yaml
- method: initialize
- method: repeat
  params:
    n_repeats: 3
    routine_data:
      - method: sample_method
        params:
          value: 42

For more details, refer to subroutine_flow_data.md.

Abstract base classes for runners

Classes in routix.runner are extensible abstract base classes for implementing custom workflow runners. These classes provide a foundation for building repeatable, modular, and testable execution patterns for algorithmic experiments.

  • SingleInstanceRunner: An abstract base class for running a single problem instance. It provides a template for implementing the logic for one experiment, including setup, execution, and result collection.
    • Typical usage: custom solvers, single-run experiments, or as a building block for higher-level runners.
  • MultiInstanceRunner: An abstract base class for running multiple problem instances. It defines the interface and core logic for iterating over multiple instances, managing results, and integrating with experiment summaries.
    • Typical usage: batch experiments, benchmarking, or automated evaluation over a dataset.
  • MultiInstanceConcurrentRunner: An abstract base class for running multiple problem instances concurrently (in parallel). It extends the multi-instance execution pattern to support concurrent processing, enabling faster experimentation and efficient use of computational resources.
    • Typical usage: parallel batch experiments, multi-core benchmarking, or scenarios where multiple instances should be solved simultaneously.

Note: InstanceSetRunner is a deprecated name. Please use MultiInstanceRunner instead.

Both classes are designed to be subclassed and extended. You can implement your own runner by inheriting from these base classes and overriding the required methods to fit your workflow.

For implementation details, see the source files in src/routix/runner/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

routix-0.0.9.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

routix-0.0.9-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file routix-0.0.9.tar.gz.

File metadata

  • Download URL: routix-0.0.9.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for routix-0.0.9.tar.gz
Algorithm Hash digest
SHA256 553867b3df1501fb0593b2ce7906d2adc4a38c45cc7f09a65a465ca60da0ab7c
MD5 0a8b95fedd12582005c234ab23800aa7
BLAKE2b-256 d90617ffb9f2ebb990e973a67063902a7d6e803b9ea6a21fc8c2a143f27b3b50

See more details on using hashes here.

File details

Details for the file routix-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: routix-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for routix-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7bcdfdd802dc7df4b10c5619780c7c9a0603c8decfded80e3ef5a95b1267837f
MD5 e1959c48e2d8ba1586c391ab1b601f64
BLAKE2b-256 3fde700db74f62312b3fc87c65cde032626cc45d109b5027e0a417f83d8a73c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page