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

Move trends plots inside of "Custom" section #3404

Merged
merged 54 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
60ae393
Move trends inside of custom
julieg18 Mar 6, 2023
6dc8813
fix typo
julieg18 Mar 6, 2023
88fe26d
fix linting
julieg18 Mar 6, 2023
c325008
Fix jest tests
julieg18 Mar 7, 2023
6216af0
Fix vscode tests
julieg18 Mar 8, 2023
e505442
Fix reordering bug
julieg18 Mar 8, 2023
8ab22c4
Resolve comments
julieg18 Mar 9, 2023
64befd1
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 9, 2023
3354b3e
Fix e2e tests
julieg18 Mar 9, 2023
bd433cb
Add accidentally deleted test
julieg18 Mar 9, 2023
b4d64b3
Rename trends plot
julieg18 Mar 10, 2023
7052633
Refactor
julieg18 Mar 10, 2023
3bd3bc1
Delete unused metrics code
julieg18 Mar 10, 2023
1a6e423
Add extra quick pick tests
julieg18 Mar 10, 2023
359a20c
Update readme
julieg18 Mar 10, 2023
c9ea4fe
Add test for creating both kinds of custom plots
julieg18 Mar 11, 2023
e08e30e
Fix possibly broken old state
julieg18 Mar 11, 2023
cd626b9
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 11, 2023
e3eba7b
Improve text
julieg18 Mar 11, 2023
74bc253
Refactor
julieg18 Mar 12, 2023
5bc8625
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 13, 2023
e62452d
Delete unneeded code
julieg18 Mar 13, 2023
d75af27
Update readme
julieg18 Mar 13, 2023
64530ab
Revert "Delete unneeded code"
julieg18 Mar 13, 2023
8d6b312
Delete unneeded code
julieg18 Mar 13, 2023
141c1ea
Consolidate CustomPlotOrderValue and CustomPlot
julieg18 Mar 13, 2023
da9791c
Delete unneeded code
julieg18 Mar 13, 2023
ace4b17
Resolve most review comments
julieg18 Mar 13, 2023
0c09b21
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 13, 2023
bf5bea8
Use only one loop with `getCustomPlotsData`
julieg18 Mar 13, 2023
7b0790a
Fix typo
julieg18 Mar 13, 2023
5bfa20f
Delete duplication code
julieg18 Mar 13, 2023
244076a
Rename argument
julieg18 Mar 14, 2023
e461677
Clean up column path logic in custom state (#3460)
julieg18 Mar 14, 2023
d5d9a9e
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 14, 2023
38ab2d6
Fix quick pick
julieg18 Mar 14, 2023
a804a0c
Fix readme typo
julieg18 Mar 14, 2023
de9a78c
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 14, 2023
3f30959
Fix checkpoint spec
julieg18 Mar 14, 2023
71ed367
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 17, 2023
7ebebdf
Replace checkpoint with custom in App.test.tsx
julieg18 Mar 17, 2023
9630fdd
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 17, 2023
40d0010
Fix "plot already exists" logic
julieg18 Mar 20, 2023
9ae29fd
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 20, 2023
1ab409c
Consolidate `collectCustomPlots` (#3466)
julieg18 Mar 20, 2023
3c92cc4
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 20, 2023
a2b9c75
Add tests for custom.ts
julieg18 Mar 20, 2023
418ee53
Fix typo in tests
julieg18 Mar 20, 2023
bd305a1
Add tests for user ending early on +/- custom plots
julieg18 Mar 20, 2023
897d60c
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 20, 2023
4032f1c
Add testing for `name || label` code
julieg18 Mar 20, 2023
ea8e4b3
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 20, 2023
c3e4d6f
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 20, 2023
2945e34
Merge branch 'main' into move-trends-inside-custom
julieg18 Mar 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
8 changes: 3 additions & 5 deletions extension/resources/walkthrough/live-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ for epoch in range(NUM_EPOCHS):
`DVCLive` is _optional_, and you can just append or modify plot files using any
language and any tool.

💡 `Trends` section of the plots dashboard is being updated automatically based
on the data in the table. You don't even have to manage or write any special
plot files, but you need to enable
[checkpoints](https://dvc.org/doc/user-guide/experiment-management/checkpoints)
in the project.
💡 Plots created in the `Custom` section of the plots dashboard are being
updated automatically based on the data in the table. You don't even have to
manage or write any special plot files.
24 changes: 14 additions & 10 deletions extension/resources/walkthrough/plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,29 @@ templates], which may be predefined (e.g. confusion matrix, linear) or custom
alt="Plots: Images" />
</p>

<p align="center">
<img src="images/plots-trends.png"
alt="Plots: Trends" />
</p>

**Images** (e.g. `.jpg` or `.svg` files) can be visualized as well. They will be
rendered side by side for the selected experiments.

<p align="center">
<img src="images/plots-view-icon.png"
alt="Plots View Icon" />
<img src="images/plots-custom.png"
alt="Plots: Custom" />
Copy link
Member

Choose a reason for hiding this comment

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

[C] This will need to be updated again after #3428, #3443 and possible follow-ups get merged.


main problem with carrying static snapshot images

</p>

Automatically generated and updated **Trends** that show scalar [metrics] value
per epoch if [checkpoints] are enabled.
**Custom** plots are generated linear plots comparing metrics and params. A user
can add two types of plots, "Checkpoint Trend" and "Metric Vs Param".

"Metric Vs Param" plots compare a chosen metric and param across experiments.
"Checkpoint Trend" plots can compare a chosen [metric] value per epoch if
[checkpoints] are enabled.

[metrics]: https://dvc.org/doc/command-reference/metrics
[metric]: https://dvc.org/doc/command-reference/metrics
[checkpoints]: https://dvc.org/doc/user-guide/experiment-management/checkpoints

<p align="center">
<img src="images/plots-view-icon.png"
Copy link
Member

Choose a reason for hiding this comment

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

This picture is also outdated now (can't get to plots from the experiments tree).

alt="Plots View Icon" />
</p>

The **Plots Dashboard** can be configured and accessed from the _Plots_ and
_Experiments_ side panels in the [**DVC View**](command:views.dvc-views).

Expand Down
4 changes: 4 additions & 0 deletions extension/src/experiments/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ export class Experiments extends BaseRepository<TableData> {
return this.experiments.getExperimentCount()
}

public getExperimentsWithCheckpoints() {
return this.experiments.getExperimentsWithCheckpoints()
}

public async selectExperiments() {
const experiments = this.experiments.getExperimentsWithCheckpoints()

Expand Down
4 changes: 4 additions & 0 deletions extension/src/experiments/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export type ExperimentWithCheckpoints = Experiment & {
checkpoints?: Experiment[]
}

export type ExperimentWithDefinedCheckpoints = Experiment & {
checkpoints: Experiment[]
}

export enum ExperimentType {
WORKSPACE = 'workspace',
COMMIT = 'commit',
Expand Down
9 changes: 4 additions & 5 deletions extension/src/plots/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { Experiments } from '../experiments'
import { Resource } from '../resourceLocator'
import { InternalCommands } from '../commands/internal'
import { definedAndNonEmpty } from '../util/array'
import { ExperimentsOutput } from '../cli/dvc/contract'
import { TEMP_PLOTS_DIR } from '../cli/dvc/constants'
import { removeDir } from '../fileSystem'
import { Toast } from '../vscode/toast'
Expand Down Expand Up @@ -173,7 +172,7 @@ export class Plots extends BaseRepository<TPlotsData> {
waitForInitialExpData.dispose()
this.data.setMetricFiles(data)
this.setupExperimentsListener(experiments)
void this.initializeData(data)
void this.initializeData()
}
})
)
Expand All @@ -184,7 +183,7 @@ export class Plots extends BaseRepository<TPlotsData> {
experiments.onDidChangeExperiments(async data => {
if (data) {
await Promise.all([
this.plots.transformAndSetExperiments(data),
this.plots.transformAndSetExperiments(),
this.data.setMetricFiles(data)
])
}
Expand All @@ -200,8 +199,8 @@ export class Plots extends BaseRepository<TPlotsData> {
)
}

private async initializeData(data: ExperimentsOutput) {
await this.plots.transformAndSetExperiments(data)
private async initializeData() {
await this.plots.transformAndSetExperiments()
void this.data.managedUpdate()
await Promise.all([
this.data.isReady(),
Expand Down
Loading