@@ -112,9 +112,10 @@ const getCheckpointTipId = (
112112
113113const transformColumns = (
114114 experiment : Experiment ,
115- experimentFields : ExperimentFields
115+ experimentFields : ExperimentFields ,
116+ branch ?: Experiment
116117) => {
117- const { metrics, params, deps } = extractColumns ( experimentFields )
118+ const { metrics, params, deps } = extractColumns ( experimentFields , branch )
118119
119120 if ( metrics ) {
120121 experiment . metrics = metrics
@@ -133,7 +134,8 @@ const transformExperimentData = (
133134 label : string | undefined ,
134135 sha ?: string ,
135136 displayNameOrParent ?: string ,
136- logicalGroupName ?: string
137+ logicalGroupName ?: string ,
138+ branch ?: Experiment
137139) : Experiment => {
138140 const experiment = {
139141 id,
@@ -153,7 +155,7 @@ const transformExperimentData = (
153155 experiment . sha = sha
154156 }
155157
156- transformColumns ( experiment , experimentFields )
158+ transformColumns ( experiment , experimentFields , branch )
157159
158160 return experiment
159161}
@@ -162,7 +164,8 @@ const transformExperimentOrCheckpointData = (
162164 sha : string ,
163165 experimentData : ExperimentFieldsOrError ,
164166 experimentsObject : ExperimentsObject ,
165- branchSha : string
167+ branchSha : string ,
168+ branch : Experiment
166169) : {
167170 checkpointTipId ?: string
168171 experiment : Experiment | undefined
@@ -187,7 +190,8 @@ const transformExperimentOrCheckpointData = (
187190 shortenForLabel ( sha ) ,
188191 sha ,
189192 getDisplayNameOrParent ( sha , branchSha , experimentsObject ) ,
190- getLogicalGroupName ( sha , branchSha , experimentsObject )
193+ getLogicalGroupName ( sha , branchSha , experimentsObject ) ,
194+ branch
191195 )
192196 }
193197}
@@ -222,14 +226,17 @@ const collectFromExperimentsObject = (
222226 acc : ExperimentsAccumulator ,
223227 experimentsObject : ExperimentsObject ,
224228 branchSha : string ,
225- branchName : string
229+ branch : Experiment
226230) => {
231+ const branchName = branch . label
232+
227233 for ( const [ sha , experimentData ] of Object . entries ( experimentsObject ) ) {
228234 const { checkpointTipId, experiment } = transformExperimentOrCheckpointData (
229235 sha ,
230236 experimentData ,
231237 experimentsObject ,
232- branchSha
238+ branchSha ,
239+ branch
233240 )
234241 if ( ! experiment ) {
235242 continue
@@ -257,7 +264,7 @@ const collectFromBranchesObject = (
257264 const branch = transformExperimentData ( name , experimentFields , name , sha )
258265
259266 if ( branch ) {
260- collectFromExperimentsObject ( acc , experimentsObject , sha , branch . label )
267+ collectFromExperimentsObject ( acc , experimentsObject , sha , branch )
261268 collectHasRunningExperiment ( acc , branch )
262269
263270 acc . branches . push ( branch )
0 commit comments