Source code for mosaic_orchestrator.config

"""This module contains the configuration base class for the mosaic-orchestrator."""
from pathlib import Path
from typing import Dict, List, Union, Type, Optional

from mosaic_orchestrator.tool import Tool
from mosaic_orchestrator.pdk import PDK


[docs]class Config: """helper class to hold a configuration for a task hierarchy. Subclass this class to set up a configuration. """
[docs] def get_pdk(self) -> Optional[PDK]: """Optional override this methode and return your PDK here.""" return None
[docs] def get_inputs(self) -> Dict[str, object]: """Optional override this methode and return your Inputs here.""" return {}
[docs] def get_tools(self) -> List[Tool]: """Optional override this methode and return your Tools here.""" return []
[docs] def get_objects_to_register(self) -> Dict[Union[Type, str], object]: """Optional override this methode and return your objects to register for injection here.""" return {}
[docs] def get_cache_directory(self) -> Optional[Path]: """Optional override this methode and return your custom cache directory here.""" return None
[docs] def get_run_directory(self) -> Optional[Path]: """Optional override this methode and return your custom run directory here.""" return None