Skip to content

Commit 098f7ec

Browse files
authored
update demo to latest (#970)
* chore: update demo * chore: update demo * bump fe to 2.2.0 * bump fe to 2.2.0-1 * fix: docker runtime error
1 parent 0151d78 commit 098f7ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1237
-12118
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FROM python:3-alpine
1212
WORKDIR /home/visualdl
1313
COPY --from=builder /home/visualdl/dist/* dist/
1414

15-
RUN apk add --no-cache jpeg-dev && \
15+
RUN apk add --no-cache jpeg-dev libstdc++ && \
1616
apk add --no-cache --virtual .build-deps build-base linux-headers zlib-dev && \
1717
pip install --disable-pip-version-check --find-links=dist visualdl && \
1818
apk del --no-network .build-deps && \

frontend/lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "2.1.5",
5+
"version": "2.2.0-1",
66
"npmClient": "yarn",
77
"useWorkspaces": true,
88
"command": {

frontend/packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visualdl/cli",
3-
"version": "2.1.5",
3+
"version": "2.2.0-1",
44
"description": "A platform to visualize the deep learning process and result.",
55
"keywords": [
66
"visualdl",
@@ -34,7 +34,7 @@
3434
"dist"
3535
],
3636
"dependencies": {
37-
"@visualdl/server": "2.1.5",
37+
"@visualdl/server": "2.2.0-1",
3838
"open": "8.0.9",
3939
"ora": "5.4.0",
4040
"pm2": "4.5.6",

frontend/packages/core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visualdl/core",
3-
"version": "2.1.5",
3+
"version": "2.2.0-1",
44
"description": "A platform to visualize the deep learning process and result.",
55
"keywords": [
66
"visualdl",
@@ -35,8 +35,8 @@
3535
],
3636
"dependencies": {
3737
"@tippyjs/react": "4.2.5",
38-
"@visualdl/netron": "2.1.5",
39-
"@visualdl/wasm": "2.1.5",
38+
"@visualdl/netron": "2.2.0-1",
39+
"@visualdl/wasm": "2.2.0-1",
4040
"bignumber.js": "9.0.1",
4141
"classnames": "2.3.1",
4242
"d3": "6.7.0",
@@ -113,7 +113,7 @@
113113
"@types/snowpack-env": "2.3.3",
114114
"@types/styled-components": "5.1.9",
115115
"@types/three": "0.128.0",
116-
"@visualdl/mock": "2.1.5",
116+
"@visualdl/mock": "2.2.0-1",
117117
"babel-plugin-styled-components": "1.12.0",
118118
"dotenv": "9.0.2",
119119
"enhanced-resolve": "5.8.2",

frontend/packages/core/src/hooks/useECharts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const useECharts = <T extends HTMLElement, W extends HTMLElement = HTMLDivElemen
6363
await import('echarts-gl');
6464
}
6565

66-
const echartInstance = echarts.init((ref.current as unknown) as HTMLDivElement);
66+
const echartInstance = echarts.init(ref.current as unknown as HTMLDivElement);
6767

6868
ref.current.addEventListener('mouseleave', hideTip);
6969

frontend/packages/core/src/hooks/useTagFilter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ const useTagFilter = (type: Page, running: boolean) => {
251251
[state.tags]
252252
);
253253

254-
const runsInTags = useMemo(() => state.selectedRuns.filter(run => !!tags?.[run.label]?.length), [
255-
state.selectedRuns,
256-
tags
257-
]);
254+
const runsInTags = useMemo(
255+
() => state.selectedRuns.filter(run => !!tags?.[run.label]?.length),
256+
[state.selectedRuns, tags]
257+
);
258258

259259
return {
260260
...state,

frontend/packages/core/src/hooks/useThrottleFn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function useThrottleFn<T extends Fn>(fn: T, options?: ThrottleOptions): ReturnVa
5151
);
5252

5353
return {
54-
run: (throttled as any) as T,
54+
run: throttled as any as T,
5555
cancel: throttled.cancel
5656
};
5757
}

frontend/packages/core/src/resource/histogram/chart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ export const options: Record<Modes, EChartOption> = {
4545
},
4646
offset: {
4747
...baseOptions,
48-
visualMap: ({
48+
visualMap: {
4949
type: 'continuous',
5050
show: false,
5151
dimension: 1,
5252
inRange: {
5353
colorLightness: [0.5, 0.8],
5454
colorSaturation: [0.5, 0.8]
5555
}
56-
} as unknown) as VisualMap.Continuous[], // Fix echarts type bug
56+
} as unknown as VisualMap.Continuous[], // Fix echarts type bug
5757
xAxis: {
5858
axisLine: {
5959
onZero: false

frontend/packages/core/src/utils/fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export type BlobResponse = {
6868
function getT(): Promise<TFunction> {
6969
return new Promise(resolve => {
7070
// Bug of i18next
71-
i18next.changeLanguage((undefined as unknown) as string).then(t => resolve(t));
71+
i18next.changeLanguage(undefined as unknown as string).then(t => resolve(t));
7272
});
7373
}
7474

frontend/packages/demo/builder/audio.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,18 @@
1414
* limitations under the License.
1515
*/
1616

17-
import type {Data, Worker} from './types';
18-
19-
interface Audio {
20-
step: number;
21-
wallTime: number;
22-
}
17+
import type {Sample, TagData, Worker} from './types';
2318

2419
const worker: Worker = async io => {
2520
const components = await io.getData<string[]>('/components');
2621
if (!components.includes('audio')) {
2722
return;
2823
}
2924

30-
const {runs, tags} = await io.save<Data>('/audio/tags');
25+
const {runs, tags} = await io.save<TagData>('/audio/tags');
3126
for (const [index, run] of runs.entries()) {
3227
for (const tag of tags[index]) {
33-
const list = (await io.save<Audio[]>('/audio/list', {run, tag})) ?? [];
28+
const list = (await io.save<Sample[]>('/audio/list', {run, tag})) ?? [];
3429
for (const [index, audio] of list.entries()) {
3530
await io.saveBinary('/audio/audio', {run, tag, index, ts: audio.wallTime});
3631
}

0 commit comments

Comments
 (0)