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

exp init: nested parameters #6751

Closed
dberenbaum opened this issue Oct 6, 2021 · 1 comment
Closed

exp init: nested parameters #6751

dberenbaum opened this issue Oct 6, 2021 · 1 comment
Assignees
Labels
A: experiments Related to dvc exp

Comments

@dberenbaum
Copy link
Collaborator

Bug Report

Description

dvc exp init does not read nested parameters.

Reproduce

$ echo "foo: \n  bar: 1" > params.yaml
$ dvc exp init python train.py
Created default stage in dvc.yaml.

To run default stage, use "dvc exp run".
$ cat dvc.yaml
stages:
  default:
    cmd: python train.py
    deps:
    - data
    - src
    params:
    - foo
    outs:
    - models
    metrics:
    - metrics.json:
        cache: false
    plots:
    - plots:
        cache: false

Expected

$ cat dvc.yaml
stages:
  default:
    cmd: python train.py
    deps:
    - data
    - src
    params:
    - foo.bar
    outs:
    - models
    metrics:
    - metrics.json:
        cache: false
    plots:
    - plots:
        cache: false

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.7.4+38d758.mod
---------------------------------
Platform: Python 3.9.5 on macOS-11.5.2-arm64-arm-64bit
Supports:
        http (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.5),
        https (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.5),
        s3 (s3fs = 2021.8.0, boto3 = 1.17.5)
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: local
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git
@dberenbaum dberenbaum added the A: experiments Related to dvc exp label Oct 6, 2021
@skshetry
Copy link
Member

skshetry commented Oct 7, 2021

This feels like correct behaviour to me. The child values of foo will be still get tracked.

Instead of depending on leaf values, it uses root values.
Whenever foo is changed (if a new child value is added for example), it'll get tracked.

This is closer to #6605.

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
Projects
None yet
Development

No branches or pull requests

2 participants