jozu-ai / kitops

Tools for easing the handoff between AI/ML and App/SRE teams.
https://KitOps.ml
Apache License 2.0
266 stars 26 forks source link

Fix issue when using relative paths for KITOPS_HOME #382

Closed amisevsk closed 2 days ago

amisevsk commented 3 days ago

Description

Since kit sometimes changes directory while packing/unpacking, using a relative path for KITOPS_HOME (or the --config parameter) would lead to the CLI using an unexpected location -- for example, running

  KITOPS_HOME=./my-kitops-storage
  kit pack -t my-model ./my-model-path

would lead to kit storing the model in ./my-model-path/my-kitops-storage instead of the expected ./my-kitops-storage.

Instead, we take the absolute path for the parameter at the beginning and use that.

Linked issues

Closes https://github.com/jozu-ai/kitops/issues/381