diff --git a/extension/src/cli/dvc/contract.ts b/extension/src/cli/dvc/contract.ts index c6fb5d4693..cd878d0b94 100644 --- a/extension/src/cli/dvc/contract.ts +++ b/extension/src/cli/dvc/contract.ts @@ -84,7 +84,7 @@ export type ExpData = { metrics: MetricsOrParams | null deps: Deps | null outs: Outs | null - meta: { has_checkpoints: boolean } + meta: { has_checkpoints?: boolean } } export enum Executor { diff --git a/extension/src/experiments/columns/collect/index.test.ts b/extension/src/experiments/columns/collect/index.test.ts index d5403c2a10..77992423ca 100644 --- a/extension/src/experiments/columns/collect/index.test.ts +++ b/extension/src/experiments/columns/collect/index.test.ts @@ -182,6 +182,91 @@ describe('collectColumns', () => { ) ]) }) + + it('should collect columns from experiments with a broken baseline', async () => { + const missingParamsYaml = [ + { + error: { + msg: "failed to parse 'stages.main.cmd' in 'dvc.yaml': Could not find 'parameters.parameter_name'", + type: 'ResolveError' + }, + experiments: null, + rev: 'workspace' + }, + { + error: { + msg: "failed to parse 'stages.main.cmd' in 'dvc.yaml': Could not find 'parameters.parameter_name'", + type: 'ResolveError' + }, + experiments: [ + { + executor: null, + name: 'exp1', + revs: [ + { + data: { + deps: {}, + meta: {}, + params: { + 'dvclive/params.yaml': { + data: { + result: 0.6936822634315442 + } + }, + 'params.yaml': { + data: { + parameters: { + parameter_name: 'parameter_value' + } + } + } + }, + metrics: {}, + rev: 'ee23879da223ff9d5bd906bdd8969cc0ea90344f', + outs: {}, + timestamp: '2023-11-28T16:07:17' + }, + experiments: null, + name: 'exp1', + rev: 'ee23879da223ff9d5bd906bdd8969cc0ea90344f' + } + ] + } + ], + name: 'master', + rev: '616500724541bcd2f7f89584187b00f838ecf9a9' + }, + { + data: { + deps: {}, + meta: {}, + metrics: {}, + outs: {}, + params: {}, + rev: '7d527bc6ae94befdc9352e59d80b133cdb0a1e7a', + timestamp: '2023-11-28T15:57:50' + }, + experiments: null, + rev: '7d527bc6ae94befdc9352e59d80b133cdb0a1e7a' + }, + { + data: { + deps: {}, + meta: {}, + metrics: {}, + outs: {}, + params: {}, + rev: '19825884a7acacc3177716c8fd7b2502ed129c59', + timestamp: '2023-11-28T13:09:17' + }, + experiments: null, + rev: '19825884a7acacc3177716c8fd7b2502ed129c59' + } + ] + + const columns = await collectColumns(missingParamsYaml) + expect(columns).toHaveLength(6) + }) }) describe('collectChanges', () => { diff --git a/extension/src/experiments/columns/collect/index.ts b/extension/src/experiments/columns/collect/index.ts index cd80d14fc6..7e083f3a3b 100644 --- a/extension/src/experiments/columns/collect/index.ts +++ b/extension/src/experiments/columns/collect/index.ts @@ -63,14 +63,11 @@ export const collectColumns = async ( const promises = [] for (const expState of output) { - if (experimentHasError(expState)) { - continue + if (!experimentHasError(expState)) { + promises.push(collectFromExperiment(acc, expState)) } - promises.push( - collectFromExperiment(acc, expState), - collectFromExperiments(acc, expState.experiments) - ) + promises.push(collectFromExperiments(acc, expState.experiments)) } await Promise.all(promises)