Usage ===== This guide covers the basics of using IceGraph end to end: how a run is structured, how configuration works, how to write the small driver scripts for each workflow, and how to run distributed and extend the framework. Introduction ------------ Every workflow follows the same shape. A short Python script builds one top-level object from a YAML configuration and calls a single method to run it: * :doc:`Processing ` builds a ``Pipeline`` and calls ``execute``. * :doc:`Training ` builds a ``Trainer`` engine and calls ``execute``. * :doc:`Inference ` builds a ``BatchInference`` engine and calls ``execute``. The configuration does the heavy lifting: it names which plugins fill each slot and supplies their options. The script only wires together the source data, the configuration, and the output location. Because the objects are context managers, run them inside a ``with`` block to guarantee resource cleanup. Running under IceTray --------------------- Any workflow that reads I3 files (the standard :doc:`I3 extractor `) depends on IceCube's IceTray and must be launched through the provided shim, ``initicetray.sh``, in place of ``python3``: .. code-block:: bash initicetray.sh process.py --source /path/to/i3 --config config/data-proc.yaml Training and batch inference run on processed datasets and do not require the shim; ordinary ``python`` from within the virtual environment is sufficient. Configuration ------------- Configuration is YAML, but both JSON and TOML are supported as alternatives. Wherever the framework offers a choice, the config selects a plugin by name and passes its options as ``kwargs``: .. code-block:: yaml : name: kwargs: {