-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bump min DVC version to 2.55.0 (live metrics for experiments running outside the workspace) #3665
Merged
Merged
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
61bed4c
duplicate transform and set function with new data
mattseddon e8415a0
duplicate functions out to reader (tests will break)
mattseddon 351e42a
fix all integration tests
mattseddon 2bbe80f
update all remaining test fixtures
mattseddon 6b77df0
fix all test data and deduplicate functions
mattseddon 4be5754
Merge branch 'main' into integrate-exp-show
mattseddon 679c7ce
remove some code climate duplication
mattseddon 336d737
Merge branch 'main' into integrate-exp-show
mattseddon 9c5f59c
wrap all loose test data in generator
mattseddon b198d11
use breaking change version of dvc
mattseddon 8340d74
fix experiment status in dvc contract
mattseddon 54eedd9
self review
mattseddon ead10f9
Merge branch 'main' into integrate-exp-show
mattseddon 269840a
Remove checkpoints model and file system watcher (#3684)
mattseddon ce57701
Merge branch 'main' into integrate-exp-show
mattseddon a9f5ee5
update demo project
mattseddon 932951b
Merge branch 'main' into integrate-exp-show
mattseddon 5804573
Extend timeout of run experiment test (e2e) (#3713)
mattseddon ef25c85
Prevent plotting of running experiments (#3712)
mattseddon 8fee434
Merge branch 'main' into integrate-exp-show
mattseddon 6f3fd93
Trigger plot updates whenever commit data changes (#3715)
mattseddon d275ab0
Merge branch 'main' into integrate-exp-show
mattseddon cb72502
update demo project and min required version of DVC
mattseddon ccdfc04
Fix experiment id for commits (shown in plots) (#3724)
mattseddon b2c2835
Merge branch 'main' into integrate-exp-show
mattseddon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,76 +26,92 @@ export type DataStatusOutput = { | |
type SingleValue = string | number | boolean | null | ||
export type Value = SingleValue | SingleValue[] | ||
|
||
export interface ValueTreeOrError { | ||
data?: ValueTree | ||
error?: ErrorContents | ||
} | ||
|
||
type RelPathObject<T> = { | ||
[relPath: string]: T | ||
} | ||
|
||
export type ValueTreeRoot = RelPathObject<ValueTreeOrError> | ||
|
||
export interface ValueTreeNode { | ||
export type ValueTree = { | ||
[key: string]: Value | ValueTree | ||
} | ||
|
||
export type ValueTree = ValueTreeRoot | ValueTreeNode | ||
|
||
export const isValueTree = ( | ||
value: Value | ValueTree | ||
): value is NonNullable<ValueTree> => | ||
!!(value && !Array.isArray(value) && typeof value === 'object') | ||
|
||
export enum ExperimentStatus { | ||
FAILED = 'Failed', | ||
QUEUED = 'Queued', | ||
RUNNING = 'Running', | ||
SUCCESS = 'Success' | ||
FAILED = 'failed', | ||
QUEUED = 'queued', | ||
RUNNING = 'running', | ||
SUCCESS = 'success' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [F] These changed on the DVC side. |
||
} | ||
|
||
export const EXPERIMENT_WORKSPACE_ID = 'workspace' | ||
|
||
export interface BaseExperimentFields { | ||
name?: string | ||
timestamp?: string | null | ||
status?: ExperimentStatus | ||
executor?: string | null | ||
checkpoint_tip?: string | ||
checkpoint_parent?: string | ||
} | ||
export const EXPERIMENT_WORKSPACE_ID = 'workspace' as const | ||
|
||
type Dep = { hash: null | string; size: null | number; nfiles: null | number } | ||
type Out = Dep & { use_cache: boolean; is_data_source: boolean } | ||
|
||
type Outs = RelPathObject<Out> | ||
export type Deps = RelPathObject<Dep> | ||
|
||
export interface ExperimentFields extends BaseExperimentFields { | ||
params?: ValueTreeRoot | ||
metrics?: ValueTreeRoot | ||
deps?: Deps | ||
outs?: RelPathObject<Out> | ||
error?: ErrorContents | ||
export type FileDataOrError = { data: ValueTree } | DvcError | ||
export type MetricsOrParams = RelPathObject<FileDataOrError> | ||
|
||
export const fileHasError = (file: FileDataOrError): file is DvcError => | ||
!!(file as DvcError).error | ||
|
||
export type ExpData = { | ||
rev: string | ||
timestamp: string | null | ||
params: MetricsOrParams | null | ||
metrics: MetricsOrParams | null | ||
deps: Deps | null | ||
outs: Outs | null | ||
meta: { has_checkpoints: boolean } | ||
} | ||
|
||
export interface ExperimentFieldsOrError { | ||
data?: ExperimentFields | ||
error?: ErrorContents | ||
export enum Executor { | ||
DVC_TASK = 'dvc-task', | ||
WORKSPACE = 'workspace' | ||
} | ||
|
||
export interface ExperimentsCommitOutput { | ||
[sha: string]: ExperimentFieldsOrError | ||
baseline: ExperimentFieldsOrError | ||
export type ExecutorState = { | ||
state: ExperimentStatus | ||
name: Executor | null | ||
local: { | ||
root: string | null | ||
log: string | null | ||
pid: number | null | ||
task_id?: string | ||
returncode: null | number | ||
} | null | ||
} | null | ||
|
||
export type ExpWithError = { | ||
rev: string | ||
name?: string | ||
} & DvcError | ||
|
||
type ExpWithData = { | ||
rev: string | ||
name?: string | ||
data: ExpData | ||
} | ||
|
||
export interface ExperimentsOutput { | ||
[name: string]: ExperimentsCommitOutput | ||
[EXPERIMENT_WORKSPACE_ID]: { | ||
baseline: ExperimentFieldsOrError | ||
} | ||
export type ExpState = ExpWithData | ExpWithError | ||
|
||
export type ExpRange = { | ||
revs: ExpState[] | ||
name?: string | ||
executor: ExecutorState | ||
} | ||
|
||
export const experimentHasError = ( | ||
expState: ExpState | ||
): expState is ExpWithError => !!(expState as { error?: unknown }).error | ||
|
||
export type ExpShowOutput = (ExpState & { experiments?: ExpRange[] | null })[] | ||
|
||
export interface PlotsData { | ||
[path: string]: Plot[] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] I think that having this in the recursive type was actually a bug