Skip to content

Commit

Permalink
Fix experiment id for commits (shown in plots) (#3724)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored Apr 20, 2023
1 parent cb72502 commit ccdfc04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extension/src/experiments/model/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ const collectExpState = (
commitData: { [sha: string]: CommitData }
): Experiment | undefined => {
const { rev, name } = expState
const id = name || rev
const label =
rev === EXPERIMENT_WORKSPACE_ID
? EXPERIMENT_WORKSPACE_ID
: name || shortenForLabel(rev)
const id = name || label

const experiment: Experiment = { id, label }

Expand Down
4 changes: 2 additions & 2 deletions extension/src/test/fixtures/expShow/survival/rows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ const data: Commit[] = [
starred: false
},
{
id: 'a49e03966a1f9f1299ec222ebc4bed8625d2c54d',
id: 'a49e039',
label: 'a49e039',
sha: 'a49e03966a1f9f1299ec222ebc4bed8625d2c54d',
Created: '2021-07-16T19:50:39',
Expand Down Expand Up @@ -473,7 +473,7 @@ const data: Commit[] = [
starred: false
},
{
id: '4f7b50c3d171a11b6cfcd04416a16fc80b61018d',
id: '4f7b50c',
label: '4f7b50c',
sha: '4f7b50c3d171a11b6cfcd04416a16fc80b61018d',
Created: '2021-07-16T19:48:45',
Expand Down

0 comments on commit ccdfc04

Please sign in to comment.