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

run/repro/stage add: regroup options/flags #7524

Merged
merged 1 commit into from May 5, 2022
Merged

Conversation

jorgeorpinel
Copy link
Contributor

@jorgeorpinel jorgeorpinel commented Mar 31, 2022

Matching iterative/dvc.org#3345

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

.pre-commit-config.yaml Outdated Show resolved Hide resolved
dvc/commands/remote.py Outdated Show resolved Hide resolved
@dberenbaum
Copy link
Contributor

Thanks for making this PR @jorgeorpinel! Besides the comment above, it looks like there are still some other arguments that don't match iterative/dvc.org#3345. Could you take a look? I'm also happy to take this one over if you want.

@jorgeorpinel
Copy link
Contributor Author

Sure, I'll take a look.

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Apr 8, 2022

@dberenbaum UPDATE: I'm actually trying to focus on other things. I don't mean to abandon this: I still plan to address the feedback ASAP. But feel free to take it over as well. I'll resolve the current merge conflict for now...

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Apr 11, 2022

Answer to #7524 (comment):

we should also have updated exp run in iterative/dvc.org#3345 for consistency

Do we mean the options after the { repro options ... } line?

image

Is that missing -n/--name BTW?

We can update it here first and then make a follow-up to docs PR (maybe necessary anyway if the repro output is re-ordered again in this PR). Here's my suggestion:

usage: dvc exp run [-h] [-q | -v] [-f]
               { repro options ... } [-n <name>]  # adds --name
               [-S [<filename>:]<params_list>]  # on-the-fly params
               [--queue] [--run-all] [-j <number>] [--temp]  # parallel
               [-r <experiment_rev>] [--reset]  # for checkpoints
               [targets [targets ...]]

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Apr 11, 2022

there are still some other arguments that don't match iterative/dvc.org#3345

I can't find any missing arguments in docs other than the ones surpassed in code @dberenbaum .

Comment on lines +73 to +78
"--single-stage",
action="store_true",
default=False,
help="Only create dvc.yaml without actually running it.",
help=argparse.SUPPRESS,
)
_add_common_args(run_parser)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW shouldn't -n|--name be added in _add_common_args()? It's a common arg both in stage add and run. Cc @karajan1001

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also (πŸ’…πŸΌ) should add_arguments() in repro/exp run use a similar private method name instead? _add_common_args() as well, even

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can

BTW shouldn't -n|--name be added in _add_common_args()? It's a common arg both in stage add and run. Cc @karajan1001

I think we can do that.

Also (πŸ’…πŸΌ) should add_arguments() in repro/exp run use a similar private method name instead? _add_common_args() as well, even

I'm not quite understand here why this method to be a private method as it is used outside its file's scope.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW shouldn't -n|--name be added in _add_common_args()? It's a common arg both in stage add and run. Cc @karajan1001

Resolved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, rolling this change back. It breaks a bunch of tests. I think they were intentionally left separate to support some behavior that was deprecated but not actually removed (like dvc run --single-stage), where --name was not required in dvc run. Let's stick with the UI changes.

@dberenbaum
Copy link
Contributor

@jorgeorpinel @karajan1001 Could you please review the latest updates?

Copy link
Contributor Author

@jorgeorpinel jorgeorpinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, run is not exactly like in docs because of the way it's coded but I think we agreed to let that go. Everything else does match iterative/dvc.org#3345 so please merge!

@karajan1001 karajan1001 merged commit 35d2963 into main May 5, 2022
@karajan1001 karajan1001 deleted the stage/options branch May 5, 2022 08:42
@dberenbaum
Copy link
Contributor

Well, run is not exactly like in docs because of the way it's coded but I think we agreed to let that go. Everything else does match iterative/dvc.org#3345 so please merge!

Thanks, @jorgeorpinel! Based on the comments in this PR, we updated the docs in iterative/dvc.org#3435, and they should all match now AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances DVC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants