iterative / vscode-dvc

Machine learning experiment tracking and data versioning with DVC extension for VS Code
https://marketplace.visualstudio.com/items?itemName=Iterative.dvc
Apache License 2.0
187 stars 28 forks source link

Extension Left Panel `Experiments` view prints error #4705

Closed thisiswhereitype closed 11 months ago

thisiswhereitype commented 12 months ago

Extension version: v1.0.57

...bin/python -m dvc exp show --rev 8f12f0abe78e691bcb32ecd9c81ef7df20677fe3 --rev 89568df4560dc051c8c34572c1f59ea4e90115ab --rev f85d20ff8b8037c480c2c2e7504eca1ee9de7677 --json - FAILED with code 255 (23855ms)
ERROR: unexpected error - EncodingError.__init__() missing 1 required positional argument: 'encoding'
Version: 1.82.2 (user setup)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:55:25.390Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045
$ dvc doctor
DVC version: 3.21.1 (conda)
---------------------------
Platform: Python 3.10.11 on Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Subprojects:
        dvc_data = 2.16.1
        dvc_objects = 1.0.1
        dvc_render = 0.6.0
        dvc_task = 0.3.0
        scmrepo = 1.3.1
Supports:
        http (aiohttp = 3.8.5, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.8.5, aiohttp-retry = 2.8.3)
Config:
        Global: /home/jscott/.config/dvc
        System: /etc/xdg/dvc
Cache types: hardlink, symlink
Cache directory: 9p on D:\
Caches: local
Remotes: local
Workspace directory: 9p on D:\
Repo: dvc, git
Repo.site_cache_dir: /var/tmp/dvc/repo/67fd25afd1fa61427a2bdd62d95fe362
thisiswhereitype commented 12 months ago

Whilst looking into https://github.com/iterative/dvclive/issues/657

julieg18 commented 12 months ago

The experiments panel and table rely on the results of a dvc exp show call. If the exp show call fails with an error it will show that error in the experiments panel.

Looks like the extension tried to run dvc exp show --rev 8f12f0abe78e691bcb32ecd9c81ef7df20677fe3 --rev 89568df4560dc051c8c34572c1f59ea4e90115ab --rev f85d20ff8b8037c480c2c2e7504eca1ee9de7677 --json but it failed with an error.

Can you try running ...bin/python -m dvc exp show --rev 8f12f0abe78e691bcb32ecd9c81ef7df20677fe3 --rev 89568df4560dc051c8c34572c1f59ea4e90115ab --rev f85d20ff8b8037c480c2c2e7504eca1ee9de7677 --json, replacing ...bin/python with the full path of your chosen python environment?

thisiswhereitype commented 11 months ago

Sorry just looked over this, the command I have censored is the conda DVC reported by dvc doctor running between the HEAD and HEAD~1

I have no experiments showing without revisions (I think unless the DVCLive scripts are doing something)

thisiswhereitype commented 11 months ago

I noticed when running dvc queue logs has an encoding arg, is it possible this is related to something amiss on my WSL distro?

mattseddon commented 11 months ago

Sorry just looked over this, the command I have censored is the conda DVC reported by dvc doctor running between the HEAD and HEAD~1

I have no experiments showing without revisions (I think unless the DVCLive scripts are doing something)

@thisiswhereitype does this mean that you can run dvc exp show --rev 8f12f0abe78e691bcb32ecd9c81ef7df20677fe3 --rev 89568df4560dc051c8c34572c1f59ea4e90115ab --rev f85d20ff8b8037c480c2c2e7504eca1ee9de7677 --json in a terminal with the correct virtual environment activated?

thisiswhereitype commented 11 months ago

No the result is the same except, I can get the stack using -vv, all python interpreters are from the conda environment set in the vscode workspace and terminals

The -v output ``` 2023-10-04 12:13:30,425 DEBUG: v3.22.1 (conda), CPython 3.10.11 on Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 2023-10-04 12:13:30,426 DEBUG: command: exp show --rev e04c910dc424acc9a367834bf90c93f4b0a2b77c --rev adea92c22470bfa0fa819e1c5a6df88824f0d7d0 --rev 73e061863529f5f8f803bcfaea40bf6c3eb12fb1 --json -v 2023-10-04 12:13:39,226 DEBUG: unable to read: '../../../../../dvclive/VAE/artifacts/epoch=0-step=3672.ckpt', is not valid utf-8 2023-10-04 12:13:39,252 DEBUG: Could not parse 'body_dims' metric from '/dvclive/VAE/params.yaml' due to its unsupported type: 'list' 2023-10-04 12:13:39,750 DEBUG: unable to read: '../../../../../dvclive/VAE/artifacts/epoch=0-step=3672.ckpt', is not valid utf-8 2023-10-04 12:13:39,780 DEBUG: Could not parse 'body_dims' metric from '/dvclive/VAE/params.yaml' due to its unsupported type: 'list' 2023-10-04 12:13:40,089 DEBUG: link type reflink is not available ([Errno 95] no more link types left to try out) 2023-10-04 12:13:40,090 DEBUG: Removing '/mnt/d/jscott/tmp/.SEYzvCYWfxzuqGzbV3v3Bd.tmp' 2023-10-04 12:13:40,108 DEBUG: Removing '/mnt/d/jscott/tmp/.SEYzvCYWfxzuqGzbV3v3Bd.tmp' 2023-10-04 12:13:40,112 DEBUG: Removing '/mnt/d/jscott/tmp/.SEYzvCYWfxzuqGzbV3v3Bd.tmp' 2023-10-04 12:13:40,120 DEBUG: Removing '/mnt/d/jscott/tmp/iiiphd-eqwt-energy_ts/.dvc/cache/files/md5/.mnPsVGunepMsLuSMdCnCDp.tmp' 2023-10-04 12:13:40,162 DEBUG: Version info for developers: DVC version: 3.22.1 (conda) --------------------------- Platform: Python 3.10.11 on Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 Subprojects: dvc_data = 2.16.4 dvc_objects = 1.0.1 dvc_render = 0.6.0 dvc_task = 0.3.0 scmrepo = 1.3.1 Supports: http (aiohttp = 3.8.5, aiohttp-retry = 2.8.3), https (aiohttp = 3.8.5, aiohttp-retry = 2.8.3) Config: Global: /home/jscott/.config/dvc System: /etc/xdg/dvc Cache types: hardlink, symlink Cache directory: 9p on D:\ Caches: local Remotes: local Workspace directory: 9p on D:\ Repo: dvc, git Repo.site_cache_dir: /var/tmp/dvc/repo/67fd25afd1fa61427a2bdd62d95fe362 2023-10-04 12:13:40,171 DEBUG: Analytics is enabled. 2023-10-04 12:13:40,232 DEBUG: Trying to spawn '['daemon', '-q', 'analytics', '/tmp/tmpbxhqwhc8']' 2023-10-04 12:13:40,234 DEBUG: Spawned '['daemon', '-q', 'analytics', '/tmp/tmpbxhqwhc8']' ```
mattseddon commented 11 months ago

Thanks @thisiswhereitype.

@dberenbaum are we able to move this upstream into DVC? Not much we can do on the extension side. Reminds me a bit of https://github.com/iterative/dvc/issues/9565

shcheklein commented 11 months ago

@thisiswhereitype hey, could you please give us a way to reproduce this? share the repo? Or at least describe the steps it took you to get the params files that you have. Could you share it with us btw?

thisiswhereitype commented 11 months ago

My development of the params files is in here: https://github.com/iterative/dvclive/issues/657

Once I got params and experiments to run I promoted one to a branch (as I couldn't see the output due to this issue) (although maybe the successfull experiments supressed/fixed this but I didn't check) and found that this appeared to resolve the problems.

I am not sure I can send or share the repo due to NDA, I am really at a loss to help but I appreciate your collective effort and love using DVC. I had concluded eventually the source of the error was on an older experiment committed but mislabelled in the yaml as a metric maybe? - DVC and vsocde-dvc both got minor patches in this time.

I am happy to try the help but I am not sure I can repro the issue anymore.

mattseddon commented 11 months ago

Thanks @thisiswhereitype. Closing now. Please reopen if the issue occurs again.