@@ -49,15 +49,13 @@ export enum ExperimentType {
4949 WORKSPACE = 'workspace' ,
5050 COMMIT = 'commit' ,
5151 EXPERIMENT = 'experiment' ,
52- CHECKPOINT = 'checkpoint' ,
5352 QUEUED = 'queued'
5453}
5554
5655export class ExperimentsModel extends ModelWithPersistence {
5756 private workspace = { } as Experiment
5857 private commits : Experiment [ ] = [ ]
5958 private experimentsByCommit : Map < string , Experiment [ ] > = new Map ( )
60- private checkpointsByTip : Map < string , Experiment [ ] > = new Map ( )
6159 private availableColors : Color [ ]
6260 private coloredStatus : ColoredStatus
6361 private starredExperiments : StarredExperiments
@@ -113,18 +111,12 @@ export class ExperimentsModel extends ModelWithPersistence {
113111 dvcLiveOnly : boolean ,
114112 commitsOutput : string
115113 ) {
116- const {
117- workspace,
118- commits,
119- experimentsByCommit,
120- checkpointsByTip,
121- runningExperiments
122- } = collectExperiments ( data , dvcLiveOnly , commitsOutput )
114+ const { workspace, commits, experimentsByCommit, runningExperiments } =
115+ collectExperiments ( data , dvcLiveOnly , commitsOutput )
123116
124117 this . workspace = workspace
125118 this . commits = commits
126119 this . experimentsByCommit = experimentsByCommit
127- this . checkpointsByTip = checkpointsByTip
128120
129121 this . setColoredStatus ( runningExperiments )
130122 }
@@ -243,6 +235,10 @@ export class ExperimentsModel extends ModelWithPersistence {
243235 return this . commits . map ( ( { id, sha } ) => ( { id, sha } ) )
244236 }
245237
238+ public getExperimentRevisions ( ) {
239+ return this . getExperiments ( ) . map ( ( { id, label } ) => ( { id, label } ) )
240+ }
241+
246242 public getRevisions ( ) {
247243 return this . getCombinedList ( ) . map ( ( { label } ) => label )
248244 }
@@ -262,7 +258,7 @@ export class ExperimentsModel extends ModelWithPersistence {
262258
263259 const { availableColors, coloredStatus } = collectSelected (
264260 selectedExperiments . filter ( ( { status } ) => ! isQueued ( status ) ) ,
265- this . getCombinedList ( ) ,
261+ this . getWorkspaceCommitsAndExperiments ( ) ,
266262 this . coloredStatus ,
267263 this . availableColors
268264 )
@@ -299,10 +295,6 @@ export class ExperimentsModel extends ModelWithPersistence {
299295 ]
300296 }
301297
302- public getAllRecords ( ) {
303- return [ ...this . getWorkspaceAndCommits ( ) , ...this . getExperimentsAndQueued ( ) ]
304- }
305-
306298 public getWorkspaceCommitsAndExperiments ( ) {
307299 return [ ...this . getWorkspaceAndCommits ( ) , ...this . getExperiments ( ) ]
308300 }
@@ -316,7 +308,7 @@ export class ExperimentsModel extends ModelWithPersistence {
316308 }
317309
318310 public getExperimentParams ( id : string ) {
319- const params = this . getAllRecords ( ) . find (
311+ const params = this . getCombinedList ( ) . find (
320312 experiment => experiment . id === id
321313 ) ?. params
322314
@@ -341,15 +333,6 @@ export class ExperimentsModel extends ModelWithPersistence {
341333 )
342334 }
343335
344- public getCheckpointsWithType (
345- id : string
346- ) : ( Experiment & { type : ExperimentType } ) [ ] | undefined {
347- return this . checkpointsByTip . get ( id ) ?. map ( checkpoint => ( {
348- ...this . addDetails ( checkpoint ) ,
349- type : ExperimentType . CHECKPOINT
350- } ) )
351- }
352-
353336 public getRowData ( ) {
354337 return [
355338 this . addDetails ( this . workspace ) ,
@@ -390,12 +373,7 @@ export class ExperimentsModel extends ModelWithPersistence {
390373 }
391374
392375 public getCombinedList ( ) {
393- return [
394- this . workspace ,
395- ...this . commits ,
396- ...this . getExperimentsAndQueued ( ) ,
397- ...this . getFlattenedCheckpoints ( )
398- ]
376+ return [ this . workspace , ...this . commits , ...this . getExperimentsAndQueued ( ) ]
399377 }
400378
401379 public getExperimentsByCommitForTree ( commit : Experiment ) {
@@ -455,12 +433,6 @@ export class ExperimentsModel extends ModelWithPersistence {
455433 return sortExperiments ( this . getSorts ( ) , experiments )
456434 }
457435
458- private getFlattenedCheckpoints ( ) {
459- return flattenMapValues ( this . checkpointsByTip ) . map ( checkpoint =>
460- this . addDetails ( checkpoint )
461- )
462- }
463-
464436 private setColoredStatus ( runningExperiments : RunningExperiment [ ] ) {
465437 this . setRunning ( runningExperiments )
466438
0 commit comments