Skip to content

Aborting dvc exp run using CTRL-c can lead to apparent loss of recent script edits #10655

Open
@billtubbs

Description

@billtubbs

Had a somewhat scary thing happen last night where I was editing and testing a dvc pipeline stage manually (python stages/my_stage.py) and then accidentally ran dvc exp run which I did not want to do, so I quickly pressed CTRL-c (possibly more than once).

Once it exited I realised my code was back to the state it was in at the previous git commit and I thought I had lost all my changes. Fortunately, I found them all in the stash

For other users having this problem here are the recovery steps:

git stash show
git stash pop

I tried googling this and couldn't find any other reports of this problem or the recovery steps.

My immediate problem is solved but my questions are

  • How can this be avoided?
  • Is there a better/safer way to abort a dvc run?
  • Is the recovery step well known and if not can we make it easier to find, (e.g. in the documentation)?

Bill.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A: experimentsRelated to dvc expp2-mediumMedium priority, should be done, but less importantuiuser interface / interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions