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 show: --json does not respect the --only-changed flag #9544

Closed
mattseddon opened this issue Jun 6, 2023 · 5 comments
Closed

exp show: --json does not respect the --only-changed flag #9544

mattseddon opened this issue Jun 6, 2023 · 5 comments
Labels
feature request Requesting a new feature product: VSCode Integration with VSCode extension

Comments

@mattseddon
Copy link
Member

Bug Report

Description

Passing the --only-changed flag to exp show has no effect when provided in conjunction with --json .

Example:

params.yaml:

lr: 0.003
weight_decay: 0
epochs: 15

dvc exp show --only-changed yields (unchanged parameters weight_decay & epochs excluded):

image

and dvc exp show --only-changed --json (unchanged parameters weight_decay & epochs included for all records):

[{
    "rev": "workspace",
    "name": null,
    "data": {
      "rev": "workspace",
      "timestamp": null,
      "params": {
        "params.yaml": {
          "data": { "lr": 0.003, "weight_decay": 0, "epochs": 15 }
        }
      },
      ....

Reproduce

  1. run dvc exp show --only-changed (get expected results)
  2. run dvc exp show --only-changed --json (get all unchanged columns)

Expected

Same behaviour with and without the --json flag.

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.58.1 (pip)
-------------------------
Platform: Python 3.10.6 on macOS-13.3.1-arm64-arm-64bit
Subprojects:
        dvc_data = 0.51.0
        dvc_objects = 0.22.0
        dvc_render = 0.5.0
        dvc_task = 0.2.1
        scmrepo = 1.0.3
Supports:
        http (aiohttp = 3.8.4, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.8.4, aiohttp-retry = 2.8.3),
        s3 (s3fs = 2023.5.0, boto3 = 1.26.76)
Config:
        Global: /Users/mattseddon/Library/Application Support/dvc
        System: /Library/Application Support/dvc
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: s3
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git
Repo.site_cache_dir: /Library/Caches/dvc/repo/9b2d1355ef26cb2a38a704c54d1f3710

Additional Information (if any):

This is relevant for iterative/vscode-dvc#1994 which should be straightforward to implement (in time for 3.0) if this bug gets fixed.

@mattseddon mattseddon added bug Did we break something? product: VSCode Integration with VSCode extension labels Jun 6, 2023
@mattseddon
Copy link
Member Author

Might not be a priority but thought that I would raise it in case we wanted a version of iterative/vscode-dvc#1994 implemented in time for 3.0.

@daavoo
Copy link
Contributor

daavoo commented Jun 6, 2023

This is expected behavior but I guess it was not clear enough.

The logic is applied once the raw results (internal repo.experiments.show()) have been converted to a table, similar to other flags like --drop, --kep, --sort.

@daavoo daavoo added feature request Requesting a new feature and removed bug Did we break something? labels Jun 6, 2023
@dberenbaum
Copy link
Collaborator

Agreed it seems like it would be nice @mattseddon.

For whatever flags we ignore, let's mention that in the --json docs.

@dberenbaum
Copy link
Collaborator

@mattseddon Let's discuss next meeting whether we want to prioritize showing only changed columns.

A quick look tells me that it's unfortunately not straightforward to do ☹️

@mattseddon
Copy link
Member Author

mattseddon commented Aug 2, 2023

Turns out this isn't that difficult to do in the extension (iterative/vscode-dvc#4402).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requesting a new feature product: VSCode Integration with VSCode extension
Projects
None yet
Development

No branches or pull requests

3 participants