gto
gto copied to clipboard
Monorepo support [design suggestion]
The most straightforward and probably the easiest to implement approach for monorepos is probably adding a prefix to all models in a subdir equal to that subdir, i.e.:
gto annotate foo/bar/a-model --path foo/bar/data/model.pkl
Will write the stuff to foo/bar/artifacts.yaml. Helpfully / is not an allowed symbol now, so this is not ambiguous and backwards compatible.
Design choices to make:
- may cut
nameandpathtoa-modelanddata/model.pklbefore writing to artifacts file or not - may restrict referring outside of the subdir or not, or treat it as external/whatever
- may support addressing by short name while inside dir or not, i.e.
gto register a-model --bump-major
Regardless of whether name is cut in artifacts.yaml or not the real model name will stay foo/bar/a-model, which might be used to create tags the usual way with not clashes.
P.S. I still think whether this feature should be added or not should be seriously discussed first.