question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

exp show: using wrong results for display

See original GitHub issue
DVC version: 2.1.0+fc4e31 (osxpkg)
---------------------------------
Platform: Python 3.8.2 on macOS-11.3.1-x86_64-i386-64bit
Supports: All remotes
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk1s1s1
Caches: local
Remotes: https
Workspace directory: apfs on /dev/disk1s1s1
Repo: dvc, git

Seems like #5880 introduced some bug: Given experiments runs:

def test_something(tmp_dir, scm, dvc, exp_stage):
    baseline_rev = scm.get_rev()
    exp1 = dvc.experiments.run(exp_stage.addressing, params=["foo=2"])
    exp2 = dvc.experiments.run(exp_stage.addressing, params=["foo=3"])

    result = dvc.experiments.show()
    rev1 = first(exp1)
    rev2 = first(exp2)

    assert result[baseline_rev][rev1]["params"]["params.yaml"] == {"foo": 2}
    assert result[baseline_rev][rev2]["params"]["params.yaml"] == {"foo": 3}

Note that the asserts seem to verify that internals work correctly if we go to the test directory and run dvc exp show, we will get:

┏━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━┳━━━━━┓
┃ Experiment    ┃ Created  ┃ foo ┃ foo ┃
┑━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━╇━━━━━┩
β”‚ workspace     β”‚ -        β”‚   3 β”‚ 3   β”‚
β”‚ master        β”‚ 04:54 PM β”‚   3 β”‚ 3   β”‚
β”‚ β”œβ”€β”€ exp-e0d04 β”‚ 04:54 PM β”‚   1 β”‚ 1   β”‚
β”‚ └── exp-42ced β”‚ 04:54 PM β”‚   1 β”‚ 1   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”˜

while it should more like:

┏━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━┳━━━━━┓
┃ Experiment    ┃ Created  ┃ foo ┃ foo ┃
┑━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━╇━━━━━┩
β”‚ workspace     β”‚ -        β”‚   3 β”‚ 3   β”‚
β”‚ master        β”‚ 04:54 PM β”‚   1 β”‚ 1   β”‚
β”‚ β”œβ”€β”€ exp-42ced β”‚ 04:54 PM β”‚   2 β”‚ 2   β”‚
β”‚ └── exp-e0d04 β”‚ 04:54 PM β”‚   3 β”‚ 3   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”˜

cc @skshetry

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
skshetrycommented, May 11, 2021

The issue here is related to the columns having the same name. It’s quite interesting.

So, what we do in the table is that we keep each column in a buffer/list. So, when we are adding a row of data here, it’s pushing data twice for those columns, and at the end, we get a buffer overrun beyond it’s position.

So, when you are adding rows [(3,3), (1, 1), (2, 2), (3,3)], it is being added to the foo column as [3, 3, 1, 1, 2, 2, 3, 3]. And you’ll get a truncated version [3, 3, 1, 1, 2, 2] during the rendering. And, since it’s the same column, you get the same data in both of the columns.

There are two issues:

  1. Garbled/garbage data in the columns.
  2. Styling of the column is affected.

The easiest way might be to not normalize headers for metrics (or take both into account). Alternatively, we could also fix this by adding support for the same column names, but then we’ll need to address them by index.

1reaction
paredcommented, May 11, 2021

The problem in this issue is that we are seeing foo=1 for both experiments, while for exp-42ced it should be 2 and for exp-e0d04 it should be 3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dvc exp show: experiment not showing / wrong position
Hi there, I am trying out dvc for a few days now and have a question regarding dvc exp show. My setup is:...
Read more >
VIP Display Rate show wrong calculation for base EXP
Description of Issue: using base EXP 1000 and 50% bonus EXP for base EXP it 's show 1050 not 1500 using command @rates...
Read more >
React Native - xhr.upload.onprogress showing inaccurate ...
I am using xhr to upload images and videos in a React Native mobile app (currently only tested on Android). The actual upload...
Read more >
What does the error message on my Accu-Chek product ...
"Err" in the display with the words "code exp" means the code key is incorrect or your test strips have expired. Make sure...
Read more >
How to correct a #NUM! error
Excel shows this error when a formula or function contains numeric values that aren't valid. This often happens when you've entered a numeric...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found