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

feat(templates): use lines to render smooth template #131

Merged
merged 1 commit into from
May 15, 2023

Conversation

shcheklein
Copy link
Member

Updates smooth Vega template to partially address iterative/vscode-dvc#3837 and be similar to TB:

Screen.Recording.2023-05-12.at.7.44.32.PM.mov

The thicker line should be the smooth one. Also, don't use point (looks strange after all), use a line with opacity. To solve the issue with a single dot not visible, use additional mark with aggregation that renders a circle only at the end of the plot.

Also cleanups tooltips to include only values (no rev, etc). (we need to do better tooltips, TB style - it's annoying to search for a point every time):

Screen.Recording.2023-05-12.at.7.42.32.PM.mov
Screen.Recording.2023-05-12.at.7.40.38.PM.mov

@shcheklein shcheklein added enhancement New feature or request A: vega Area: Vega plots labels May 13, 2023
@shcheklein shcheklein self-assigned this May 13, 2023
@shcheklein shcheklein requested a review from daavoo May 13, 2023 02:45
@codecov-commenter
Copy link

codecov-commenter commented May 13, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.06 🎉

Comparison is base (33eae51) 94.49% compared to head (7ee83b0) 94.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #131      +/-   ##
==========================================
+ Coverage   94.49%   94.55%   +0.06%     
==========================================
  Files          19       19              
  Lines         726      735       +9     
  Branches      113      114       +1     
==========================================
+ Hits          686      695       +9     
  Misses         27       27              
  Partials       13       13              
Impacted Files Coverage Δ
src/dvc_render/vega_templates.py 93.87% <ø> (ø)
src/dvc_render/utils.py 100.00% <100.00%> (ø)
tests/test_table.py 100.00% <100.00%> (ø)
tests/test_vega.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@dberenbaum dberenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line changes look good!

IMO keeping all the logic for the mark to avoid an empty plot isn't worth it. A linear plot with a single point is kind of meaningless no matter what we show, and TB (and mlflow and wandb AFAIR) are fine to show an empty plot at the start:

Screenshot 2023-05-15 at 12 50 53 PM

Not a blocker, just my take.

@shcheklein shcheklein merged commit a4099d3 into main May 15, 2023
@shcheklein shcheklein deleted the update-smooth-template branch May 15, 2023 17:01
@shcheklein
Copy link
Member Author

A linear plot with a single point is kind of meaningless no matter what we show, and TB (and mlflow and wandb AFAIR) are fine to show an empty plot at the start

Merging as is for now. I remember it was a bit confusing for me. Do they also show only if there are two+ epochs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: vega Area: Vega plots enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants