metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

conda list and clean commands

Open mt-ob opened this issue 1 year ago • 6 comments

TODOs:

  • [x] How to associate step names with environment IDs?
  • [x] Where are dependency lock files located? Since we need to delete those as well..

mt-ob avatar Apr 16 '24 11:04 mt-ob

LGTM.. just not sure how easy or hard it is to add tests.

iamsgarg-ob avatar Apr 24 '24 19:04 iamsgarg-ob

haven't looked yet in detail but I think we should name it environment to keep consistency with the extension.

romain-intel avatar Apr 24 '24 22:04 romain-intel

@romain-intel, this is more of a hidden utility to clean out the underlying conda environments than providing a top-level environment manipulation command. there is a good reason that we may want to have environment as yet another command in the near future.

savingoyal avatar Apr 24 '24 22:04 savingoyal

I mean, it would be exposed to the user and there is similarity with this: https://github.com/Netflix/metaflow-nflx-extensions/blob/main/metaflow_extensions/netflix_ext/plugins/environment_cli.py so I wanted to try to minimize (more) divergence. There is also an argument for doing this in metaflow environment as opposed to myflow.py --environment=conda environment but that may be a larger conversation. If this is just something hidden, we should hide it better or provide a utility. Also, we could start by providing these commands and then expand to others. I just feel a bit uncomfortable providing a user-visible "hidden utility" like this I guess.

romain-intel avatar Apr 25 '24 01:04 romain-intel

I remember asking @savingoyal if we wanna add this at the metaflow conda level or perhaps python flow.py conda level. The latter was probably chosen because we kind of operate on a per flow basis i.e. conda environments for each step etc. and we want the ability to list them + clean them etc.

At the metaflow conda level, it would be a bit difficult to get the ctx.obj I guess -- which allows all that functionality. I could be wrong though.

mt-ob avatar Apr 25 '24 01:04 mt-ob

I remember asking @savingoyal if we wanna add this at the metaflow conda level or perhaps python flow.py conda level. The latter was probably chosen because we kind of operate on a per flow basis i.e. conda environments for each step etc. and we want the ability to list them + clean them etc.

At the metaflow conda level, it would be a bit difficult to get the ctx.obj I guess -- which allows all that functionality. I could be wrong though.

Totally agree that it doesn't necessarily have to be at the metaflow level. However, I would prefer it be named environment to be more compatible with the CLI in the extension (it's one or the other which makes more sense).

romain-intel avatar Apr 30 '24 07:04 romain-intel