iterative / gto

🏷️ Git Tag Ops. Turn your Git repository into Artifact Registry or Model Registry.
https://dvc.org/doc/gto
Apache License 2.0
142 stars 16 forks source link

Write errors to `stderr` instead of `stdout` #265

Closed aguschin closed 2 years ago

aguschin commented 2 years ago

After working on gto-action I realized that's it's inconvenient to handle this in CI. E.g. if you just want to find out the path, you do

$ export ARTIFACT_PATH=`gto describe mymodel --path`
$ echo $ARTIFACT_PATH
No path exists for artifact

which is in fact the error message and should be written to stderr.

The other question is that maybe gto describe shouldn't return exitcode 1 here at all. If the description doesn't exist, it's not an incorrect behaviour, incorrect input data or something incorrect at all. Maybe someone wants to check if annotation in artifacts.yaml exists at all? Then we may need another command to check it.

Need to check this for MLEM also.

aguschin commented 2 years ago

UPD: confirmed and created an issue for MLEM https://github.com/iterative/mlem/issues/404

aguschin commented 2 years ago

Hi @itstargetconfirmed! Wanted to bring to your attention that the GTO project have the same problem as you just solved for MLEM. Do you want to create a PR for that one as well?

itstargetconfirmed commented 2 years ago

Hi @aguschin, I'd love to take this on. I'll create a PR tomorrow for this.

aguschin commented 2 years ago

closed by #276