- CLI/orchestration only
- reusable business/domain logic
- should not depend on pipelines
- declarative YAML only
- no executable code
- no imports
- f.x. use
from ml.registries.catalogs import FEATURE_OPERATORSinstead offrom ml.registries.catalogs.feature_operators_catalog import FEATURE_OPERATORS - all catalogs should be listed within
ml.registries.catalogs.__init__.py, and then imported from there - this keeps the code cleaner and safer
- catalogs should not import factories and vice versa
- f.x., a module within
ml.registries.catalogsshould not have this import line:from ml.registries.factories import {something} - likewise, a module within
ml.registries.factoriesshould not have this import line:from ml.registries.catalogs import {something}
- avoid placing shared code in
ml.utils - place it where it logically belongs, e.g. in
ml.runners,ml.modeling,ml.promotion, etc. ml.utilsshould only contain code that is genuinely reusable across multiple different domains- for instance, loading json and yaml files, getting the current git commit, and setting up a pipeline runner belong to
ml.utils get_trainer.pyis only used by trainer, so it does not belong inml.utils; instead it belongs toml.runners.training.utils- feature lineage validation is useful across runners and search, but not data and feature freezing, so it belongs to
ml.modeling.validation, rather thanml.utils