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

ref: exp run --set-param with templating #2313

Closed
skshetry opened this issue Mar 18, 2021 · 5 comments
Closed

ref: exp run --set-param with templating #2313

skshetry opened this issue Mar 18, 2021 · 5 comments
Labels
A: docs Area: user documentation (gatsby-theme-iterative) C: ref Content of /doc/*-reference good first issue Good for newcomers p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. type: enhancement Something is not clear, small updates, improvement suggestions

Comments

@skshetry
Copy link
Member

skshetry commented Mar 18, 2021

It'd be great to have an example of experiments coupled with the parametrization (or at least a mention that it's possible?).

# dvc.yaml
stages:
  build:
      cmd: python src/main.py ${test_size}
      deps:
        - src/main.py
      outs:
        - model.pickle
      metrics:
        - metrics.json:
            cache: false
$ dvc exp run --set-param "test_size=0.5"
@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Mar 18, 2021

So in this case, with exp run -S test_size=30, the cmd in dvc.yaml would be python src/main.py 30? @skshetry

That would def. be pretty important to mention both in https://dvc.org/doc/user-guide/project-structure/pipelines-files#templating, as well as in Exps docs (for starters in the exp run -S ref.).

But what if test_size is not in a params file, just a vars entry?

@shcheklein shcheklein changed the title exp --set-param with parametrization/templating ref exp: --set-param with parametrization/templating Apr 3, 2021
@shcheklein shcheklein added A: docs Area: user documentation (gatsby-theme-iterative) p1-important Active priorities to deal within next sprints good first issue Good for newcomers labels Apr 3, 2021
@jorgeorpinel jorgeorpinel changed the title ref exp: --set-param with parametrization/templating ref: exp run --set-param with templating Apr 27, 2021
@jorgeorpinel jorgeorpinel added type: enhancement Something is not clear, small updates, improvement suggestions and removed p1-important Active priorities to deal within next sprints labels Apr 29, 2021
@jorgeorpinel jorgeorpinel added the ⌛ status: wait-response Waiting a response from the outside of the organization label Sep 27, 2021
@skshetry
Copy link
Member Author

Sorry for the late response, @jorgeorpinel. You are right that it's not possible if the vars is locally declared or imported from other files than the params.yaml.

This is more of a coincidence in that --set-params can change params.yaml by default, and so does the templating, so it seems that they work together for that file.

For other files that are referenced, you'd need to do --set-param <filename>:<params>.
I am just assuming here that for the most part, it'll be from params.yaml file.

@jorgeorpinel jorgeorpinel added content-dvc C: guide Content of /doc/user-guide and removed A: docs Area: user documentation (gatsby-theme-iterative) ⌛ status: wait-response Waiting a response from the outside of the organization content-dvc-2.0 labels Oct 4, 2021
@jorgeorpinel
Copy link
Contributor

For other files that are referenced, you'd need to do --set-param :

Sure, as long as there's a way to generalize this "coincidence" I think we can indeed emphasize it as a feature 👍 (only with param file values though, not vars).

@jorgeorpinel jorgeorpinel added C: ref Content of /doc/*-reference and removed C: guide Content of /doc/user-guide labels Oct 4, 2021
@jorgeorpinel

This comment has been minimized.

@skshetry

This comment has been minimized.

@iesahin iesahin added A: docs Area: user documentation (gatsby-theme-iterative) and removed dvc labels Oct 14, 2021
@jorgeorpinel jorgeorpinel added hacktoberfest and removed A: docs Area: user documentation (gatsby-theme-iterative) labels Oct 21, 2021
@dberenbaum dberenbaum added A: docs Area: user documentation (gatsby-theme-iterative) p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. labels Oct 16, 2023
@dberenbaum dberenbaum closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: docs Area: user documentation (gatsby-theme-iterative) C: ref Content of /doc/*-reference good first issue Good for newcomers p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. type: enhancement Something is not clear, small updates, improvement suggestions
Projects
None yet
Development

No branches or pull requests

5 participants