Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Marker Inc Korea AutoRAG Runner From Yaml

From Leeroopedia


Knowledge Sources
Domains Deployment, Pipeline_Orchestration
Last Updated 2026-02-08 06:00 GMT

Overview

Concrete tool for initializing RAG pipeline runners from YAML configs or trial folders provided by AutoRAG's deploy module.

Description

BaseRunner.__init__ reads a config dict with node_lines, instantiates each node's single module using the support module registry, and stores module_instances and module_params. Runner.from_yaml loads from a YAML file. Runner.from_trial_folder auto-extracts the best config from a trial directory and initializes from it.

Usage

Use Runner.from_yaml with a pre-saved best config YAML, or Runner.from_trial_folder to initialize directly from an evaluated trial. Both produce a Runner ready for inference.

Code Reference

Source Location

  • Repository: AutoRAG
  • File: autorag/deploy/base.py
  • Lines: L148-200

Signature

class BaseRunner:
    def __init__(self, config: Dict, project_dir: Optional[str] = None):
        """
        Initialize runner from config dict.

        Args:
            config: Dict with node_lines key (one module per node).
            project_dir: Project directory with resources/ (default: cwd).
        """

class Runner(BaseRunner):
    @classmethod
    def from_yaml(cls, yaml_path: str, project_dir: Optional[str] = None):
        """Load Runner from extracted best config YAML file."""

    @classmethod
    def from_trial_folder(cls, trial_path: str):
        """Load Runner directly from evaluated trial folder."""

Import

from autorag.deploy.base import Runner

I/O Contract

Inputs

Name Type Required Description
yaml_path str Yes (from_yaml) Path to extracted best config YAML
trial_path str Yes (from_trial_folder) Path to evaluated trial directory
project_dir Optional[str] No Project directory with resources/

Outputs

Name Type Description
Runner instance Runner Ready for inference with module_instances and module_params

Usage Examples

Initialize from YAML

from autorag.deploy.base import Runner

# From extracted YAML config
runner = Runner.from_yaml(
    yaml_path="./best_config.yaml",
    project_dir="./my_project"
)

# Or directly from trial folder
runner = Runner.from_trial_folder(trial_path="./my_project/0")

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment