gto icon indicating copy to clipboard operation
gto copied to clipboard

Monorepo support [design suggestion]

Open Suor opened this issue 3 years ago • 0 comments

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 name and path to a-model and data/model.pkl before 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.

Suor avatar Jun 28 '22 10:06 Suor