Skip to content

Conversation

@karajan1001
Copy link
Contributor

@karajan1001 karajan1001 commented Dec 28, 2021

fix #7196
New feature: now dvc exp push/pull can accept a list of experiment names as input.

  1. add support to list input for the exp push/pull
  2. add function tests for the multi exp push/pull
  3. add unit test for the arg parse

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

wait #7205

@karajan1001 karajan1001 requested a review from pmrowla December 28, 2021 07:54
@karajan1001 karajan1001 requested a review from a team as a code owner December 28, 2021 07:54
@karajan1001 karajan1001 marked this pull request as draft December 28, 2021 07:54
@karajan1001 karajan1001 changed the title exp pull/push: add multi exp name arg support [WIP] exp pull/push: add multi exp name arg support Dec 28, 2021
@karajan1001 karajan1001 marked this pull request as ready for review January 7, 2022 10:34
@karajan1001 karajan1001 changed the title [WIP] exp pull/push: add multi exp name arg support exp pull/push: add multi exp name arg support Jan 7, 2022
@karajan1001 karajan1001 force-pushed the fix7196 branch 2 times, most recently from 9d5df3c to d480ad5 Compare January 10, 2022 08:36
pmrowla
pmrowla previously approved these changes Jan 11, 2022
Copy link
Contributor

@pmrowla pmrowla left a comment

Choose a reason for hiding this comment

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

A couple of minor comments regarding typing but overall this LGTM and I don't have a problem with merging as-is

@pmrowla
Copy link
Contributor

pmrowla commented Jan 11, 2022

@karajan1001 maybe rebase this before merging to double check that the linter step failure is fixed

fix: treeverse#7196

New feature: now `dvc exp push` can accept a list of experiment names as input.

1. refactor of experiment push
2. add support to list input for the `exp push`
3. add function tests for the multi exp push
4. add unit test for the arg parse
pmrowla
pmrowla previously approved these changes Jan 17, 2022
Copy link
Contributor

@pmrowla pmrowla left a comment

Choose a reason for hiding this comment

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

This will need a docs PR

fix: treeverse#7196

New feature: now `dvc exp pull` can accept a list of experiment names as input.

2. add support to list input for the `exp pull`
3. add function tests for the multi exp pull
4. add unit test for the arg parse
@karajan1001 karajan1001 enabled auto-merge (rebase) January 18, 2022 07:32
@karajan1001 karajan1001 merged commit 57263f1 into treeverse:main Jan 18, 2022
@karajan1001 karajan1001 deleted the fix7196 branch January 18, 2022 12:11
@jorgeorpinel
Copy link
Contributor

Looks like this is missing a docs update cc @dberenbaum 🙂

You guys can take care of https://dvc.org/doc/command-reference/exp/push and pull (and any other refs. affected) but please create an issue still so we can check whether other docs need updates too.

Thanks

Comment on lines 89 to +93
experiments_pull_parser.add_argument(
"experiment", help="Experiment to pull.", metavar="<experiment>"
"experiment",
nargs="+",
help="Experiments to pull.",
metavar="<experiment>",
Copy link
Contributor

Choose a reason for hiding this comment

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

Question. Is it normal that the help output now uses <metavars> ? I.e. is it necessary here?

positional arguments:
  <git_remote>          Git remote name or Git URL.
  <experiment>          Experiments to pull.

Most argument lists don't use <> last time I checked.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, both the arg and metavar are in singular ("experiment") but the help text uses plural ("Experiments").

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jorgeorpinel , I tried to removed line metavar="<experiment>", the output will be

$ dvc exp pull --help
usage: dvc experiments pull [-h] [-q | -v] [-A] [--rev <commit>] [-n <num>] [-f] [--no-cache] [-r <name>] [-j <number>] [--run-cache] git_remote [experiment [experiment ...]]
positional arguments:
  git_remote            Git remote name or Git URL.
  experiment            Experiments to pull.
...

By comparison the current version is:

$ dvc exp pull --help
usage: dvc experiments pull [-h] [-q | -v] [-A] [--rev <commit>] [-n <num>] [-f] [--no-cache] [-r <name>] [-j <number>] [--run-cache] <git_remote> [<experiment> [<experiment> ...]]

positional arguments:
  <git_remote>          Git remote name or Git URL.
  <experiment>          Experiments to pull.

Similiar for the exp push

Copy link
Contributor

Choose a reason for hiding this comment

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

Up to you guys, I was just pointing it out as it seems a little inconsistent with other commands' help output.

snorkelopstesting4-web pushed a commit to snorkel-marlin-repos/iterative_dvc_pr_7206_42e9ba2d-0d32-4655-878f-f3ea3d816411 that referenced this pull request Oct 22, 2025
Original PR #7206 by karajan1001
Original: treeverse/dvc#7206
snorkelopsstgtesting1-spec added a commit to snorkel-marlin-repos/iterative_dvc_pr_7206_42e9ba2d-0d32-4655-878f-f3ea3d816411 that referenced this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: experiments Related to dvc exp enhancement Enhances DVC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exp pull/push: add multi exp name arg support

3 participants