Skip to main content

An open-source NLP framework that offers high-level wrappers designed for effortless launch, enhanced reproducibility, superior control, and unmatched flexibility for your experiments.

Project description

PyPI - Package Version PyPI - Python Version GitHub - License

Urartu

Urartu is an ML workflow runner built around Pipelines (orchestrators) and Actions (reusable steps) with automatic caching and dependency injection.

Installation

pip install urartu

From source:

git clone git@github.com:tamohannes/urartu.git
cd urartu
pip install -e .

Project layout (recommended)

Run the CLI from a project root that contains:

my_project/
├── __init__.py
├── actions/
│   ├── __init__.py
│   └── my_action.py
├── pipelines/
│   ├── __init__.py
│   └── my_pipeline.py
└── configs/
    └── pipeline/
        └── my_pipeline.yaml

Optional (per-user configs):

my_project/
└── configs_<username>/
    ├── aim/
    ├── machine/
    └── slurm/

Quickstart

Create a pipeline config:

# configs/pipeline/my_pipeline.yaml
pipeline_name: my_pipeline
debug: false

pipeline:
  experiment_name: "My pipeline"
  device: auto
  seed: 42

  # Pipeline-level cache policy (propagates to actions)
  cache_enabled: true
  force_rerun: false
  cache_max_age_days: 7

  actions:
    - action_name: my_action
      # Action-specific config (merged with pipeline-level common settings)
      some_param: 123

Create the pipeline file:

from aim import Run
from omegaconf import DictConfig
from urartu.common import Pipeline


class MyPipeline(Pipeline):
    pass


def main(cfg: DictConfig, aim_run: Run):
    MyPipeline(cfg, aim_run).main()

Create an action:

from omegaconf import DictConfig
from aim import Run
from urartu.common import Action


class MyAction(Action):
    def run(self):
        cache_dir = self.get_cache_entry_dir()
        run_dir = self.get_run_dir()
        # ... compute, write machine-readable artifacts to cache_dir ...
        # ... write plots/reports to run_dir ...

    def get_outputs(self):
        return {
            "cache_dir": str(self.get_cache_entry_dir()),
            "run_dir": str(self.get_run_dir()),
        }

Run it:

urartu my_pipeline

CLI overrides and config groups

  • Overrides: pipeline.seed=123, pipeline.device=cuda, descr="my run".
  • Config-group selectors (unquoted) load *.yaml files from:
    • configs_<username>/<group>/<selector>.yaml
    • configs/<group>/<selector>.yaml
    • built-in defaults in the Urartu package

Examples:

# Select config files (unquoted values)
urartu my_pipeline machine=local slurm=no_slurm aim=no_aim

# Set literal strings (quoted values)
urartu my_pipeline descr="experiment 001" machine="local"

Notes on outputs and caching

  • Cached, machine-readable artifacts: write under self.get_cache_entry_dir(...) (shared across runs).
  • Run artifacts (plots/reports/logs): write under self.get_run_dir(...) (unique per run).

Citation

If you find Urartu helpful in your research, please cite it:

@software{Tamoyan_Urartu_2023,
  author = {Hovhannes Tamoyan},
  license = {Apache-2.0},
  month = {8},
  title = {{Urartu}},
  url = {https://github.com/tamohannes/urartu},
  year = {2023}
}

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

urartu-5.0.3.tar.gz (140.9 kB view details)

Uploaded Source

Built Distribution

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

urartu-5.0.3-py3-none-any.whl (164.0 kB view details)

Uploaded Python 3

File details

Details for the file urartu-5.0.3.tar.gz.

File metadata

  • Download URL: urartu-5.0.3.tar.gz
  • Upload date:
  • Size: 140.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for urartu-5.0.3.tar.gz
Algorithm Hash digest
SHA256 2cf0c7411dcbc449fdfefcedcf8aff56546a4b1f0a80e4944d3a56beca289159
MD5 59b58e58cc42c492cd71005507e59adb
BLAKE2b-256 529c292f0dc52e0bbf59b35614babecea34804f0882e55f5d599bdd4591e4fcf

See more details on using hashes here.

File details

Details for the file urartu-5.0.3-py3-none-any.whl.

File metadata

  • Download URL: urartu-5.0.3-py3-none-any.whl
  • Upload date:
  • Size: 164.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for urartu-5.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 52616bca575f4f2067a20a47eb114d66d0c6f1fe27d97d78e4b4ba3ad0924bad
MD5 a46bb4a29a60b5a2900c02af9aa45b2f
BLAKE2b-256 bfcbec1841970f1a306b89a54766b48732ca7c978799d22dc4557a64f333e834

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