Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace dvc run #5846

Closed
1 task
dberenbaum opened this issue Apr 19, 2021 · 7 comments · Fixed by #9508
Closed
1 task

replace dvc run #5846

dberenbaum opened this issue Apr 19, 2021 · 7 comments · Fixed by #9508
Labels
A: pipelines Related to the pipelines feature feature is a feature p1-important Important, aka current backlog of things to do

Comments

@dberenbaum
Copy link
Collaborator

dberenbaum commented Apr 19, 2021

Add dvc stage add --run option that mimics dvc run (adds a stage and reproduces it). See #5819.

  • Decide how to update docs due to this. Probably phase out all run examples and redirect its ref to stage add.
@dberenbaum dberenbaum added the p2-medium Medium priority, should be done, but less important label Apr 19, 2021
@skshetry
Copy link
Member

There's a small difference between current behaviour of dvc stage add and dvc run --no-exec, that the former tries not to check too many things and not fail as much as possible as a result of that. dvc run validates of a lot of things and runs the script. If the script fails or the validation fails, it won't dump that stage to dvc.yaml.

What should the behaviour of dvc stage add --run be in that case? Should it also not dump those stages (similar to dvc run)? Or, should it dump anyway even if it fails (i.e. how stage add works)?

@dberenbaum
Copy link
Collaborator Author

Good question! IMO let's keep it consistent with dvc stage add and keep it in dvc.yaml if it would have succeeded without --run. Thoughts @jorgeorpinel @shcheklein ?

@efiop efiop added the feature is a feature label Apr 20, 2021
@shcheklein
Copy link
Member

Agreed. It sound simpler and users would add force if they need to fix and run it again.

@jorgeorpinel
Copy link
Contributor

let's keep it consistent with dvc stage add and keep it in dvc.yaml if it would have succeeded without --run

@jorgeorpinel
Copy link
Contributor

Q. Will run get deprecated eventually or turned into an alias of stage add --run? The latter sounds nicer but the former may be less problematic (support-wise).

@daavoo daavoo added the A: pipelines Related to the pipelines feature label Oct 20, 2021
@dberenbaum dberenbaum mentioned this issue Sep 29, 2022
4 tasks
@skshetry skshetry changed the title dvc stage add --run replace dvc run May 4, 2023
@skshetry skshetry changed the title replace dvc run replace dvc run May 4, 2023
@dberenbaum dberenbaum added p1-important Important, aka current backlog of things to do and removed p2-medium Medium priority, should be done, but less important labels May 5, 2023
@skshetry
Copy link
Member

What about existing options like --no-run-cache/--no-exec and --no-commit? Do they need to be supported in dvc stage add --run?

@skshetry
Copy link
Member

I guess probably not as this is more of a helper utility than trying to be a replacement.

skshetry added a commit to skshetry/dvc that referenced this issue May 19, 2023
skshetry added a commit to skshetry/dvc that referenced this issue May 22, 2023
skshetry added a commit that referenced this issue May 22, 2023
* stage add: introduce --run option

Part of #5846.

* fix ui message
mergify bot pushed a commit that referenced this issue May 22, 2023
* stage add: introduce --run option

Part of #5846.

* fix ui message

(cherry picked from commit 1989c0f)
skshetry added a commit that referenced this issue May 22, 2023
stage add: introduce --run option (#9480)

* stage add: introduce --run option

Part of #5846.

* fix ui message

(cherry picked from commit 1989c0f)

Co-authored-by: skshetry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: pipelines Related to the pipelines feature feature is a feature p1-important Important, aka current backlog of things to do
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants