aimhubio / aim

Aim 💫 — An easy-to-use & supercharged open-source experiment tracker.
https://aimstack.io
Apache License 2.0
4.94k stars 299 forks source link

--no Option for Aim Init, Do not Clear Existing Repo if it Exists #3177

Open stevenjlm opened 2 days ago

stevenjlm commented 2 days ago

Happy to write a PR for this if we agree it helps.

🚀 Feature

An "-n" or "--no" option for aim init, so that it only creates a new repo if one does not already exist.

Motivation

While running Aim in Kubernetes, I need to run aim init --repo /aim to make sure there is a repo for aim; however, since I have persistent storage, I would rather the --init option leave the repo intact if it already exists. Since this is happening in a container, I cannot answer "no" to the prompt.

Pitch

There is already a "-y" or "--yes" option, I'm thinking of just adding "-n" or "--no" option.

Alternatives

  1. init's default could be set to initialize the repo only if it is not present.
  2. There could be an entirely different command "soft-init" or maybe a option "--soft" to achieve the same effect. I'm sure there are other alternatives that I have not thought of..
alberttorosyan commented 2 days ago

@stevenjlm fair point. w.r.t. naming of the new option; I think -s/--skip-if-exists describes the purpose of the flag better.

alberttorosyan commented 2 days ago

On a separate note, @stevenjlm, would you be interested in contributing the fix to this issue?

stevenjlm commented 1 day ago

Yes, I'm happy to do so. I'll work on a PR soon.