Renaming a stage

Consider the following stage:

stages:
  stage_1:
    cmd: python train.py
    deps:
    - train.py
    params:
    - stage_1.dropout

What steps must I follow to safely rename the stage and its dependency names? For example, stage_1 to new_stage and train.py to new_train.py.

NOTE: I have run a few experiments already with this stage.

For future experiments, you can update dvc.yaml to point to the new paths and names. You may also want to delete the old entry from dvc.lock.

The past experiments will still show up with the old names. The best you could do would be to save new experiments with the same info using the new paths.