-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathprofile.ts
58 lines (48 loc) · 1.17 KB
/
profile.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { SubmitOptions, submitRun } from "./runs";
import { DataFrame } from "./types";
export interface ProfileDiffParams {
model: string;
columns?: string[];
}
export interface ProfileDiffResult {
base?: DataFrame;
current?: DataFrame;
}
export interface ProfileDiffViewOptions {
pinned_columns?: string[];
display_mode?: "side_by_side" | "inline";
}
export async function submitProfileDiff(params: ProfileDiffParams, options?: SubmitOptions) {
return await submitRun<ProfileDiffParams, ProfileDiffResult>("profile_diff", params, options);
}
export interface TopKDiffParams {
model: string;
column_name: string;
k: number;
}
export interface TopKResult {
values: (string | number | undefined)[];
counts: number[];
valids: number;
}
export interface TopKDiffResult {
base: TopKResult;
current: TopKResult;
}
export interface HistogramDiffParams {
model: string;
column_name: string;
column_type: string;
}
export interface HistogramResult {
counts: number[];
total: number;
}
export interface HistogramDiffResult {
base: HistogramResult;
current: HistogramResult;
min: number;
max: number;
bin_edges: number[];
labels?: string[];
}