iterative / setup-cml

GitHub Action for CML setup
25 stars 12 forks source link

deprecate `setup-dvc` and make DVC installation an optional part of `setup-cml` #92

Closed pmrowla closed 1 year ago

pmrowla commented 1 year ago

Using DVC in CI essentially requires the use of cml ci before you can use any DVC commands. Currently CML and DVC installation are separated into the iterative/setup-cml and iterative/setup-dvc actions, but there's really no way for a user to actually do anything with DVC without the use of both actions together in their workflow (meaning for all practical scenarios setup-dvc depends on setup-cml).

I was looking into making the setup-dvc action just install CML and run cml ci, but this will require adding cml_version, cml_sudo, cml_force inputs to setup-dvc, all of which may conflict with whatever the user set if they also use setup-cml in their workflow. I also considered making setup-dvc a composite action that uses: iterative/setup-cml, but this again has the same problem where the user may want a specific version of CML that ends up being stomped by the setup-dvc installation instead.

Rather than require the current state of

- uses: iterative/setup-cml
- uses: iterative/setup-dvc
- run: |
    cml ci
    # rest of my workflow

it seems to me that we should really have a single action (setup-cml) that has an optional dvc: or dvc_version: input that defaults to false-y (meaning DVC is not installed and cml ci is not run by default). If the option is set to latest or any other valid DVC version, DVC will be installed and cml ci would be run by default as a part of the setup-cml action.

related: https://github.com/iterative/dvc/issues/9612


This is semi related, but I also think cml ci (with no additional arguments) should always be run by default in iterative/setup-cml (regardless of whether or not they are using the proposed dvc_version: input). This would also cover the scenarios where the user installs DVC themselves (either because they need a pip installation to use the python api or because they are using one of the CML runner images that already includes DVC)

pmrowla commented 1 year ago

@iterative/cml I pushed an initial PR for this but it would be good to get input on this from the CML side

cc @dberenbaum

dberenbaum commented 1 year ago

Related: https://github.com/iterative/scmrepo/issues/262

pmrowla commented 1 year ago

closing in favor of https://github.com/iterative/setup-dvc/pull/55