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

Collect columns from experiments under baseline with error #5041

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion extension/src/cli/dvc/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
85 changes: 85 additions & 0 deletions extension/src/experiments/columns/collect/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
9 changes: 3 additions & 6 deletions extension/src/experiments/columns/collect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading