Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
2d46c45a
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
大约 1 年 前同步成功
通知
88
Star
4655
Fork
642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
2d46c45a
编写于
8月 12, 2020
作者:
P
Peter Pan
提交者:
GitHub
8月 12, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: remove unused api (
#742
,
#743
) (#747)
上级
4049f980
变更
16
显示空白变更内容
内联
并排
Showing
16 changed file
with
137 addition
and
125 deletion
+137
-125
frontend/packages/core/hooks/useTagFilter.ts
frontend/packages/core/hooks/useTagFilter.ts
+20
-5
frontend/packages/core/pages/high-dimensional.tsx
frontend/packages/core/pages/high-dimensional.tsx
+7
-14
frontend/packages/core/pages/histogram.tsx
frontend/packages/core/pages/histogram.tsx
+4
-8
frontend/packages/core/pages/pr-curve.tsx
frontend/packages/core/pages/pr-curve.tsx
+4
-8
frontend/packages/core/pages/sample/audio.tsx
frontend/packages/core/pages/sample/audio.tsx
+4
-8
frontend/packages/core/pages/sample/image.tsx
frontend/packages/core/pages/sample/image.tsx
+4
-8
frontend/packages/core/pages/scalar.tsx
frontend/packages/core/pages/scalar.tsx
+4
-5
frontend/packages/core/types/index.ts
frontend/packages/core/types/index.ts
+5
-0
frontend/packages/demo/builder/common.ts
frontend/packages/demo/builder/common.ts
+0
-1
frontend/packages/mock/data/audio/tags.ts
frontend/packages/mock/data/audio/tags.ts
+25
-22
frontend/packages/mock/data/embedding/tags.ts
frontend/packages/mock/data/embedding/tags.ts
+10
-7
frontend/packages/mock/data/histogram/tags.ts
frontend/packages/mock/data/histogram/tags.ts
+5
-2
frontend/packages/mock/data/image/tags.ts
frontend/packages/mock/data/image/tags.ts
+25
-22
frontend/packages/mock/data/pr-curve/tags.ts
frontend/packages/mock/data/pr-curve/tags.ts
+10
-7
frontend/packages/mock/data/runs.ts
frontend/packages/mock/data/runs.ts
+0
-1
frontend/packages/mock/data/scalar/tags.ts
frontend/packages/mock/data/scalar/tags.ts
+10
-7
未找到文件。
frontend/packages/core/hooks/useTagFilter.ts
浏览文件 @
2d46c45a
import
{
Run
,
Tag
,
TagWithSingleRun
}
from
'
~/types
'
;
import
{
Run
,
Tag
,
TagWithSingleRun
,
TagsData
}
from
'
~/types
'
;
import
{
color
,
colorAlt
}
from
'
~/utils/chart
'
;
import
{
useCallback
,
useEffect
,
useMemo
,
useReducer
}
from
'
react
'
;
...
...
@@ -142,8 +142,23 @@ const reducer = (state: State, action: Action): State => {
const
useTagFilter
=
(
type
:
string
,
running
:
boolean
)
=>
{
const
router
=
useRouter
();
const
{
data
:
runs
,
loading
:
loadingRuns
}
=
useRunningRequest
<
string
[]
>
(
'
/runs
'
,
running
);
const
{
data
:
tags
,
loading
:
loadingTags
}
=
useRunningRequest
<
Tags
>
(
`/
${
type
}
/tags`
,
running
);
const
{
data
,
loading
,
error
}
=
useRunningRequest
<
TagsData
>
(
`/
${
type
}
/tags`
,
running
);
const
runs
:
string
[]
=
useMemo
(()
=>
data
?.
runs
??
[],
[
data
]);
const
tags
:
Tags
=
useMemo
(
()
=>
data
?
runs
.
reduce
<
Tags
>
((
m
,
run
,
i
)
=>
{
if
(
m
[
run
])
{
m
[
run
]
=
[...
m
[
run
],
...(
data
.
tags
?.[
i
]
??
[])];
}
else
{
m
[
run
]
=
data
.
tags
[
i
]
??
[];
}
return
m
;
},
{})
:
{},
[
runs
,
data
]
);
const
[
state
,
dispatch
]
=
useReducer
(
reducer
,
{
initRuns
:
[],
...
...
@@ -197,8 +212,8 @@ const useTagFilter = (type: string, running: boolean) => {
runsInTags
,
onChangeRuns
,
onChangeTags
,
loading
Runs
,
loadingTags
loading
,
error
};
};
...
...
frontend/packages/core/pages/high-dimensional.tsx
浏览文件 @
2d46c45a
...
...
@@ -16,6 +16,7 @@ import RadioButton from '~/components/RadioButton';
import
RadioGroup
from
'
~/components/RadioGroup
'
;
import
RunningToggle
from
'
~/components/RunningToggle
'
;
import
SearchInput
from
'
~/components/SearchInput
'
;
import
{
TagsData
}
from
'
~/types
'
;
import
Title
from
'
~/components/Title
'
;
import
styled
from
'
styled-components
'
;
import
{
useRouter
}
from
'
next/router
'
;
...
...
@@ -52,25 +53,17 @@ const HighDimensional: NextI18NextPage = () => {
const
[
running
,
setRunning
]
=
useState
(
true
);
const
{
data
:
runs
,
error
:
runsError
,
loading
:
runsLoading
}
=
useRunningRequest
<
string
[]
>
(
'
/runs
'
,
running
);
const
{
data
:
tags
,
error
:
tagsError
,
loading
:
tagsLoading
}
=
useRunningRequest
<
Record
<
string
,
string
[]
>>
(
'
/embedding/tags
'
,
running
);
const
error
=
useMemo
(()
=>
runsError
||
tagsError
,
[
runsError
,
tagsError
]);
const
loading
=
useMemo
(()
=>
runsLoading
||
tagsLoading
,
[
runsLoading
,
tagsLoading
]);
const
{
data
,
error
,
loading
}
=
useRunningRequest
<
TagsData
>
(
'
/embedding/tags
'
,
running
);
const
list
=
useMemo
(()
=>
{
if
(
!
runs
||
!
tags
)
{
if
(
!
data
)
{
return
[];
}
return
runs
.
reduce
<
Item
[]
>
(
(
p
,
run
)
=>
[...
p
,
...(
tags
[
run
]?.
map
(
tag
=>
({
run
,
tag
,
label
:
`
${
run
}
/
${
tag
}
`
}))
??
[])],
return
data
.
runs
.
reduce
<
Item
[]
>
(
(
p
,
run
,
i
)
=>
[...
p
,
...(
data
.
tags
[
i
]?.
map
(
tag
=>
({
run
,
tag
,
label
:
`
${
run
}
/
${
tag
}
`
}))
??
[])],
[]
);
},
[
runs
,
tags
]);
},
[
data
]);
const
labelList
=
useMemo
(()
=>
list
.
map
(
item
=>
item
.
label
),
[
list
]);
const
{
query
}
=
useRouter
();
...
...
@@ -150,7 +143,7 @@ const HighDimensional: NextI18NextPage = () => {
return
(
<>
<
Preloader
url
=
"/
run
s"
/>
<
Preloader
url
=
"/
embedding/tag
s"
/>
<
Title
>
{
t
(
'
common:high-dimensional
'
)
}
</
Title
>
<
Content
aside
=
{
aside
}
loading
=
{
loading
}
>
{
!
loading
&&
!
list
.
length
?
(
...
...
frontend/packages/core/pages/histogram.tsx
浏览文件 @
2d46c45a
...
...
@@ -21,10 +21,7 @@ const Histogram: NextI18NextPage = () => {
const
[
running
,
setRunning
]
=
useState
(
true
);
const
{
runs
,
tagsWithSingleRun
,
selectedRuns
,
onChangeRuns
,
loadingRuns
,
loadingTags
}
=
useTagFilter
(
'
histogram
'
,
running
);
const
{
runs
,
tagsWithSingleRun
,
selectedRuns
,
onChangeRuns
,
loading
}
=
useTagFilter
(
'
histogram
'
,
running
);
const
[
mode
,
setMode
]
=
useState
<
Modes
>
(
Modes
.
Offset
);
...
...
@@ -61,14 +58,13 @@ const Histogram: NextI18NextPage = () => {
return
(
<>
<
Preloader
url
=
"/runs"
/>
<
Preloader
url
=
"/histogram/tags"
/>
<
Title
>
{
t
(
'
common:histogram
'
)
}
</
Title
>
<
Content
aside
=
{
aside
}
loading
=
{
loading
Runs
}
>
{
!
loading
Runs
&&
!
runs
.
length
?
(
<
Content
aside
=
{
aside
}
loading
=
{
loading
}
>
{
!
loading
&&
!
runs
.
length
?
(
<
Error
/>
)
:
(
<
ChartPage
items
=
{
tagsWithSingleRun
}
withChart
=
{
withChart
}
loading
=
{
loading
Runs
||
loadingTags
}
/>
<
ChartPage
items
=
{
tagsWithSingleRun
}
withChart
=
{
withChart
}
loading
=
{
loading
}
/>
)
}
</
Content
>
</>
...
...
frontend/packages/core/pages/pr-curve.tsx
浏览文件 @
2d46c45a
...
...
@@ -48,10 +48,7 @@ const PRCurve: NextI18NextPage = () => {
const
[
running
,
setRunning
]
=
useState
(
true
);
const
{
runs
,
tags
,
runsInTags
,
selectedRuns
,
onChangeRuns
,
loadingRuns
,
loadingTags
}
=
useTagFilter
(
'
pr-curve
'
,
running
);
const
{
runs
,
tags
,
runsInTags
,
selectedRuns
,
onChangeRuns
,
loading
}
=
useTagFilter
(
'
pr-curve
'
,
running
);
const
[
indexes
,
setIndexes
]
=
useState
<
Record
<
string
,
number
>>
({});
const
onChangeIndexes
=
useCallback
(
...
...
@@ -148,14 +145,13 @@ const PRCurve: NextI18NextPage = () => {
return
(
<>
<
Preloader
url
=
"/runs"
/>
<
Preloader
url
=
"/pr-curve/tags"
/>
<
Title
>
{
t
(
'
common:pr-curve
'
)
}
</
Title
>
<
Content
aside
=
{
aside
}
loading
=
{
loading
Runs
}
>
{
!
loading
Runs
&&
!
runs
.
length
?
(
<
Content
aside
=
{
aside
}
loading
=
{
loading
}
>
{
!
loading
&&
!
runs
.
length
?
(
<
Error
/>
)
:
(
<
ChartPage
items
=
{
prCurveTags
}
withChart
=
{
withChart
}
loading
=
{
loading
Runs
||
loadingTags
}
/>
<
ChartPage
items
=
{
prCurveTags
}
withChart
=
{
withChart
}
loading
=
{
loading
}
/>
)
}
</
Content
>
</>
...
...
frontend/packages/core/pages/sample/audio.tsx
浏览文件 @
2d46c45a
...
...
@@ -35,10 +35,7 @@ const Audio: NextI18NextPage = () => {
const
[
running
,
setRunning
]
=
useState
(
true
);
const
{
runs
,
tagsWithSingleRun
,
selectedRuns
,
onChangeRuns
,
loadingRuns
,
loadingTags
}
=
useTagFilter
(
'
audio
'
,
running
);
const
{
runs
,
tagsWithSingleRun
,
selectedRuns
,
onChangeRuns
,
loading
}
=
useTagFilter
(
'
audio
'
,
running
);
const
aside
=
useMemo
(
()
=>
...
...
@@ -61,20 +58,19 @@ const Audio: NextI18NextPage = () => {
return
(
<>
<
Preloader
url
=
"/runs"
/>
<
Preloader
url
=
"/audio/tags"
/>
<
Title
>
{
t
(
'
common:sample
'
)
}
-
{
t
(
'
common:audio
'
)
}
</
Title
>
<
Content
aside
=
{
aside
}
loading
=
{
loading
Runs
}
>
{
!
loading
Runs
&&
!
runs
.
length
?
(
<
Content
aside
=
{
aside
}
loading
=
{
loading
}
>
{
!
loading
&&
!
runs
.
length
?
(
<
Error
/>
)
:
(
<
ChartPage
items
=
{
tagsWithSingleRun
}
chartSize
=
{
chartSize
}
withChart
=
{
withChart
}
loading
=
{
loading
Runs
||
loadingTags
}
loading
=
{
loading
}
/>
)
}
</
Content
>
...
...
frontend/packages/core/pages/sample/image.tsx
浏览文件 @
2d46c45a
...
...
@@ -26,10 +26,7 @@ const Image: NextI18NextPage = () => {
const
[
running
,
setRunning
]
=
useState
(
true
);
const
{
runs
,
tagsWithSingleRun
,
selectedRuns
,
onChangeRuns
,
loadingRuns
,
loadingTags
}
=
useTagFilter
(
'
image
'
,
running
);
const
{
runs
,
tagsWithSingleRun
,
selectedRuns
,
onChangeRuns
,
loading
}
=
useTagFilter
(
'
image
'
,
running
);
const
[
showActualSize
,
setShowActualSize
]
=
useState
(
false
);
const
[
brightness
,
setBrightness
]
=
useState
(
1
);
...
...
@@ -81,20 +78,19 @@ const Image: NextI18NextPage = () => {
return
(
<>
<
Preloader
url
=
"/runs"
/>
<
Preloader
url
=
"/image/tags"
/>
<
Title
>
{
t
(
'
common:sample
'
)
}
-
{
t
(
'
common:image
'
)
}
</
Title
>
<
Content
aside
=
{
aside
}
loading
=
{
loading
Runs
}
>
{
!
loading
Runs
&&
!
runs
.
length
?
(
<
Content
aside
=
{
aside
}
loading
=
{
loading
}
>
{
!
loading
&&
!
runs
.
length
?
(
<
Error
/>
)
:
(
<
ChartPage
items
=
{
tagsWithSingleRun
}
chartSize
=
{
chartSize
}
withChart
=
{
withChart
}
loading
=
{
loading
Runs
||
loadingTags
}
loading
=
{
loading
}
/>
)
}
</
Content
>
...
...
frontend/packages/core/pages/scalar.tsx
浏览文件 @
2d46c45a
...
...
@@ -37,7 +37,7 @@ const Scalar: NextI18NextPage = () => {
const
[
running
,
setRunning
]
=
useState
(
true
);
const
{
runs
,
tags
,
selectedRuns
,
onChangeRuns
,
loading
Runs
,
loadingTags
}
=
useTagFilter
(
'
scalar
'
,
running
);
const
{
runs
,
tags
,
selectedRuns
,
onChangeRuns
,
loading
}
=
useTagFilter
(
'
scalar
'
,
running
);
const
[
smoothing
,
setSmoothing
]
=
useState
(
0.6
);
...
...
@@ -106,14 +106,13 @@ const Scalar: NextI18NextPage = () => {
return
(
<>
<
Preloader
url
=
"/runs"
/>
<
Preloader
url
=
"/scalar/tags"
/>
<
Title
>
{
t
(
'
common:scalar
'
)
}
</
Title
>
<
Content
aside
=
{
aside
}
loading
=
{
loading
Runs
}
>
{
!
loading
Runs
&&
!
runs
.
length
?
(
<
Content
aside
=
{
aside
}
loading
=
{
loading
}
>
{
!
loading
&&
!
runs
.
length
?
(
<
Error
/>
)
:
(
<
ChartPage
items
=
{
tags
}
withChart
=
{
withChart
}
loading
=
{
loading
Runs
||
loadingTags
}
/>
<
ChartPage
items
=
{
tags
}
withChart
=
{
withChart
}
loading
=
{
loading
}
/>
)
}
</
Content
>
</>
...
...
frontend/packages/core/types/index.ts
浏览文件 @
2d46c45a
export
interface
TagsData
{
runs
:
string
[];
tags
:
string
[][];
}
export
interface
Run
{
label
:
string
;
colors
:
[
string
,
string
];
...
...
frontend/packages/demo/builder/common.ts
浏览文件 @
2d46c45a
...
...
@@ -2,7 +2,6 @@ import type {Worker} from './types';
const
worker
:
Worker
=
async
io
=>
{
await
io
.
save
<
string
[]
>
(
'
/components
'
);
await
io
.
save
<
string
[]
>
(
'
/runs
'
);
};
export
default
worker
;
frontend/packages/mock/data/audio/tags.ts
浏览文件 @
2d46c45a
export
default
{
test
:
[
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
[
'
input_reshape/input/audio/7
'
,
'
input_reshape/input/audio/4
'
,
'
input_reshape/input/audio/5
'
,
...
...
@@ -10,7 +12,7 @@ export default {
'
😼/input/audio/8
'
,
'
😼/input/audio/9
'
],
train
:
[
[
'
input_reshape/input/audio/6
'
,
'
input_reshape/input/audio/7
'
,
'
input_reshape/input/audio/4
'
,
...
...
@@ -22,4 +24,5 @@ export default {
'
😼/input/audio/8
'
,
'
😼/input/audio/9
'
]
]
};
frontend/packages/mock/data/embedding/tags.ts
浏览文件 @
2d46c45a
export
default
{
test
:
[
'
layer2/biases/summaries/mean
'
,
'
test/1234
'
,
'
another
'
],
train
:
[
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
[
'
layer2/biases/summaries/mean
'
,
'
test/1234
'
,
'
another
'
],
[
'
layer2/biases/summaries/mean
'
,
'
layer2/biases/summaries/accuracy
'
,
'
layer2/biases/summaries/cost
'
,
'
test/431
'
,
'
others
'
]
]
};
frontend/packages/mock/data/histogram/tags.ts
浏览文件 @
2d46c45a
export
default
{
test
:
[
'
layer2/biases/summaries/mean
'
],
train
:
[
'
layer2/biases/summaries/mean
'
,
'
layer2/biases/summaries/accuracy
'
,
'
layer2/biases/summaries/cost
'
]
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
[
'
layer2/biases/summaries/mean
'
],
[
'
layer2/biases/summaries/mean
'
,
'
layer2/biases/summaries/accuracy
'
,
'
layer2/biases/summaries/cost
'
]
]
};
frontend/packages/mock/data/image/tags.ts
浏览文件 @
2d46c45a
export
default
{
test
:
[
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
[
'
input_reshape/input/image/7
'
,
'
input_reshape/input/image/4
'
,
'
input_reshape/input/image/5
'
,
...
...
@@ -10,7 +12,7 @@ export default {
'
😼/input/image/8
'
,
'
😼/input/image/9
'
],
train
:
[
[
'
input_reshape/input/image/6
'
,
'
input_reshape/input/image/7
'
,
'
input_reshape/input/image/4
'
,
...
...
@@ -22,4 +24,5 @@ export default {
'
😼/input/image/8
'
,
'
😼/input/image/9
'
]
]
};
frontend/packages/mock/data/pr-curve/tags.ts
浏览文件 @
2d46c45a
export
default
{
test
:
[
'
layer2/biases/summaries/mean
'
,
'
test/1234
'
,
'
another
'
],
train
:
[
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
[
'
layer2/biases/summaries/mean
'
,
'
test/1234
'
,
'
another
'
],
[
'
layer2/biases/summaries/mean
'
,
'
layer2/biases/summaries/accuracy
'
,
'
layer2/biases/summaries/cost
'
,
'
test/431
'
,
'
others
'
]
]
};
frontend/packages/mock/data/runs.ts
已删除
100644 → 0
浏览文件 @
4049f980
export
default
[
'
train
'
,
'
test
'
];
frontend/packages/mock/data/scalar/tags.ts
浏览文件 @
2d46c45a
export
default
{
test
:
[
'
layer2/biases/summaries/mean
'
,
'
test/1234
'
,
'
another
'
],
train
:
[
runs
:
[
'
train
'
,
'
test
'
],
tags
:
[
[
'
layer2/biases/summaries/mean
'
,
'
test/1234
'
,
'
another
'
],
[
'
layer2/biases/summaries/mean
'
,
'
layer2/biases/summaries/accuracy
'
,
'
layer2/biases/summaries/cost
'
,
'
test/431
'
,
'
others
'
]
]
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录