未验证 提交 51776d26 编写于 作者: P Peter Pan 提交者: GitHub

fix: fix typo (#856)

上级 1050e287
#!/usr/bin/env node #!/usr/bin/env node
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-console */ /* eslint-disable no-console */
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words esmodules
module.exports = { module.exports = {
extends: '@snowpack/app-scripts-react/babel.config.json', extends: '@snowpack/app-scripts-react/babel.config.json',
presets: [ presets: [
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words pageview inited
import React, {FunctionComponent, Suspense, useCallback, useEffect, useMemo, useState} from 'react'; import React, {FunctionComponent, Suspense, useCallback, useEffect, useMemo, useState} from 'react';
import {Redirect, Route, BrowserRouter as Router, Switch, useLocation} from 'react-router-dom'; import {Redirect, Route, BrowserRouter as Router, Switch, useLocation} from 'react-router-dom';
import {THEME, matchMedia} from '~/utils/theme'; import {THEME, matchMedia} from '~/utils/theme';
......
...@@ -45,7 +45,7 @@ type ChartProps = { ...@@ -45,7 +45,7 @@ type ChartProps = {
const Chart: FunctionComponent<ChartProps & WithStyled> = ({cid, width, height, className, children}) => { const Chart: FunctionComponent<ChartProps & WithStyled> = ({cid, width, height, className, children}) => {
const [maximized, setMaximized] = useState(false); const [maximized, setMaximized] = useState(false);
const toggleMaximze = useCallback( const toggleMaximize = useCallback(
(id: symbol, value: boolean) => { (id: symbol, value: boolean) => {
if (id === cid) { if (id === cid) {
setMaximized(value); setMaximized(value);
...@@ -54,11 +54,11 @@ const Chart: FunctionComponent<ChartProps & WithStyled> = ({cid, width, height, ...@@ -54,11 +54,11 @@ const Chart: FunctionComponent<ChartProps & WithStyled> = ({cid, width, height,
[cid] [cid]
); );
useEffect(() => { useEffect(() => {
ee.on('toggle-chart-size', toggleMaximze); ee.on('toggle-chart-size', toggleMaximize);
return () => { return () => {
ee.off('toggle-chart-size', toggleMaximze); ee.off('toggle-chart-size', toggleMaximize);
}; };
}, [toggleMaximze]); }, [toggleMaximize]);
return ( return (
<Div <Div
......
...@@ -65,10 +65,10 @@ type ToggleChartToolboxItem = { ...@@ -65,10 +65,10 @@ type ToggleChartToolboxItem = {
onClick?: (value: boolean) => unknown; onClick?: (value: boolean) => unknown;
} & BaseChartToolboxItem; } & BaseChartToolboxItem;
export type ChartTooboxItem = NormalChartToolboxItem | ToggleChartToolboxItem; export type ChartToolboxItem = NormalChartToolboxItem | ToggleChartToolboxItem;
type ChartToolboxProps = { type ChartToolboxProps = {
items: ChartTooboxItem[]; items: ChartToolboxItem[];
reversed?: boolean; reversed?: boolean;
tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right'; tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
}; };
...@@ -98,7 +98,7 @@ const ChartToolbox: FunctionComponent<ChartToolboxProps & WithStyled> = ({ ...@@ -98,7 +98,7 @@ const ChartToolbox: FunctionComponent<ChartToolboxProps & WithStyled> = ({
); );
const getToolboxItem = useCallback( const getToolboxItem = useCallback(
(item: ChartTooboxItem, index: number) => ( (item: ChartToolboxItem, index: number) => (
<ToolboxItem <ToolboxItem
key={index} key={index}
active={item.toggle && !item.activeIcon && activeStatus[index]} active={item.toggle && !item.activeIcon && activeStatus[index]}
......
...@@ -76,10 +76,10 @@ const Wrapper = styled.div` ...@@ -76,10 +76,10 @@ const Wrapper = styled.div`
type ArgumentProps = { type ArgumentProps = {
value: ArgumentType | PropertyType; value: ArgumentType | PropertyType;
expand?: boolean; expand?: boolean;
showNodeDodumentation?: () => unknown; showNodeDocumentation?: () => unknown;
}; };
const Argument: FunctionComponent<ArgumentProps> = ({value, expand, showNodeDodumentation}) => { const Argument: FunctionComponent<ArgumentProps> = ({value, expand, showNodeDocumentation}) => {
const [expanded, setExpanded] = useState(expand ?? false); const [expanded, setExpanded] = useState(expand ?? false);
const expandable = useMemo(() => { const expandable = useMemo(() => {
...@@ -105,7 +105,7 @@ const Argument: FunctionComponent<ArgumentProps> = ({value, expand, showNodeDodu ...@@ -105,7 +105,7 @@ const Argument: FunctionComponent<ArgumentProps> = ({value, expand, showNodeDodu
)} )}
</span> </span>
{(value as PropertyType).documentation && ( {(value as PropertyType).documentation && (
<a className="argument-operation" onClick={() => showNodeDodumentation?.()}> <a className="argument-operation" onClick={() => showNodeDocumentation?.()}>
<Icon type="question-circle" /> <Icon type="question-circle" />
</a> </a>
)} )}
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words strs
import React, {FunctionComponent, useCallback} from 'react'; import React, {FunctionComponent, useCallback} from 'react';
import {Trans, useTranslation} from 'react-i18next'; import {Trans, useTranslation} from 'react-i18next';
import {borderRadius, em, transitionProps} from '~/utils/style'; import {borderRadius, em, transitionProps} from '~/utils/style';
......
...@@ -24,19 +24,19 @@ import {useTranslation} from 'react-i18next'; ...@@ -24,19 +24,19 @@ import {useTranslation} from 'react-i18next';
type NodePropertiesSidebarProps = { type NodePropertiesSidebarProps = {
data?: PropertiesType | null; data?: PropertiesType | null;
onClose?: () => unknown; onClose?: () => unknown;
showNodeDodumentation?: () => unknown; showNodeDocumentation?: () => unknown;
}; };
const NodePropertiesSidebar: FunctionComponent<NodePropertiesSidebarProps> = ({ const NodePropertiesSidebar: FunctionComponent<NodePropertiesSidebarProps> = ({
data, data,
onClose, onClose,
showNodeDodumentation showNodeDocumentation
}) => { }) => {
const {t} = useTranslation('graph'); const {t} = useTranslation('graph');
return ( return (
<GraphSidebar title={t('graph:node-properties')} onClose={onClose}> <GraphSidebar title={t('graph:node-properties')} onClose={onClose}>
<Properties {...data} showNodeDodumentation={showNodeDodumentation} /> <Properties {...data} showNodeDocumentation={showNodeDocumentation} />
</GraphSidebar> </GraphSidebar>
); );
}; };
......
...@@ -30,10 +30,10 @@ const Header = styled.div` ...@@ -30,10 +30,10 @@ const Header = styled.div`
type PropertiesProps = PropertiesType & { type PropertiesProps = PropertiesType & {
expand?: boolean; expand?: boolean;
showNodeDodumentation?: () => unknown; showNodeDocumentation?: () => unknown;
}; };
const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, expand, showNodeDodumentation}) => { const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, expand, showNodeDocumentation}) => {
const {t} = useTranslation('graph'); const {t} = useTranslation('graph');
return ( return (
...@@ -43,7 +43,7 @@ const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, exp ...@@ -43,7 +43,7 @@ const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, exp
name={t(`graph:properties.${property.name}`)} name={t(`graph:properties.${property.name}`)}
values={property.values} values={property.values}
key={index} key={index}
showNodeDodumentation={showNodeDodumentation} showNodeDocumentation={showNodeDocumentation}
/> />
))} ))}
{groups?.map((group, index) => ( {groups?.map((group, index) => (
...@@ -54,7 +54,7 @@ const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, exp ...@@ -54,7 +54,7 @@ const Properties: FunctionComponent<PropertiesProps> = ({properties, groups, exp
{...property} {...property}
key={anotherIndex} key={anotherIndex}
expand={expand} expand={expand}
showNodeDodumentation={showNodeDodumentation} showNodeDocumentation={showNodeDocumentation}
/> />
))} ))}
</React.Fragment> </React.Fragment>
......
...@@ -49,10 +49,10 @@ const Wrapper = styled.div` ...@@ -49,10 +49,10 @@ const Wrapper = styled.div`
type PropertyProps = NameValues<ArgumentType | PropertyType> & { type PropertyProps = NameValues<ArgumentType | PropertyType> & {
expand?: boolean; expand?: boolean;
showNodeDodumentation?: () => unknown; showNodeDocumentation?: () => unknown;
}; };
const Property: FunctionComponent<PropertyProps> = ({name, values, expand, showNodeDodumentation}) => { const Property: FunctionComponent<PropertyProps> = ({name, values, expand, showNodeDocumentation}) => {
return ( return (
<Wrapper> <Wrapper>
<label className="property-name" title={name}> <label className="property-name" title={name}>
...@@ -60,7 +60,7 @@ const Property: FunctionComponent<PropertyProps> = ({name, values, expand, showN ...@@ -60,7 +60,7 @@ const Property: FunctionComponent<PropertyProps> = ({name, values, expand, showN
</label> </label>
<div className="property-values"> <div className="property-values">
{values.map((value, index) => ( {values.map((value, index) => (
<Argument key={index} value={value} expand={expand} showNodeDodumentation={showNodeDodumentation} /> <Argument key={index} value={value} expand={expand} showNodeDocumentation={showNodeDocumentation} />
))} ))}
</div> </div>
</Wrapper> </Wrapper>
......
...@@ -22,16 +22,16 @@ import Icon from '~/components/Icon'; ...@@ -22,16 +22,16 @@ import Icon from '~/components/Icon';
import styled from 'styled-components'; import styled from 'styled-components';
import {useTranslation} from 'react-i18next'; import {useTranslation} from 'react-i18next';
const DropZone = styled.div<{actived: boolean}>` const DropZone = styled.div<{active: boolean}>`
${props => ${props =>
sameBorder({ sameBorder({
width: '1px', width: '1px',
type: 'dashed', type: 'dashed',
radius: em(16), radius: em(16),
color: props.actived ? 'var(--primary-color)' : undefined color: props.active ? 'var(--primary-color)' : undefined
})} })}
background-color: ${props => background-color: ${props =>
props.actived ? 'var(--graph-uploader-active-background-color)' : 'var(--graph-uploader-background-color)'}; props.active ? 'var(--graph-uploader-active-background-color)' : 'var(--graph-uploader-background-color)'};
${size('43.2%', '68%')} ${size('43.2%', '68%')}
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -82,12 +82,12 @@ type UploaderProps = { ...@@ -82,12 +82,12 @@ type UploaderProps = {
const Uploader: FunctionComponent<UploaderProps> = ({onClickUpload, onDropFiles}) => { const Uploader: FunctionComponent<UploaderProps> = ({onClickUpload, onDropFiles}) => {
const {t} = useTranslation('graph'); const {t} = useTranslation('graph');
const [actived, setActived] = useState(false); const [active, setActive] = useState(false);
const onClick = useCallback(() => onClickUpload?.(), [onClickUpload]); const onClick = useCallback(() => onClickUpload?.(), [onClickUpload]);
const onDrop = useCallback( const onDrop = useCallback(
(e: React.DragEvent<HTMLDivElement>) => { (e: React.DragEvent<HTMLDivElement>) => {
e.preventDefault(); e.preventDefault();
setActived(false); setActive(false);
if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length) { if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length) {
onDropFiles?.(e.dataTransfer.files); onDropFiles?.(e.dataTransfer.files);
} }
...@@ -99,16 +99,16 @@ const Uploader: FunctionComponent<UploaderProps> = ({onClickUpload, onDropFiles} ...@@ -99,16 +99,16 @@ const Uploader: FunctionComponent<UploaderProps> = ({onClickUpload, onDropFiles}
if (e.currentTarget.contains(e.relatedTarget as Node | null)) { if (e.currentTarget.contains(e.relatedTarget as Node | null)) {
return; return;
} }
setActived(false); setActive(false);
}, []); }, []);
return ( return (
<> <>
<DropZone <DropZone
actived={actived} active={active}
onDrop={onDrop} onDrop={onDrop}
onDragOver={e => e.preventDefault()} onDragOver={e => e.preventDefault()}
onDragEnter={() => setActived(true)} onDragEnter={() => setActive(true)}
onDragLeave={onDragLeave} onDragLeave={onDragLeave}
> >
<Icon type="upload" className="upload-icon" /> <Icon type="upload" className="upload-icon" />
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words npts
import type {EChartOption, ECharts, EChartsConvertFinder} from 'echarts'; import type {EChartOption, ECharts, EChartsConvertFinder} from 'echarts';
import type {HistogramData, OffsetData, OverlayData, OverlayDataItem} from '~/resource/histogram'; import type {HistogramData, OffsetData, OverlayData, OverlayDataItem} from '~/resource/histogram';
import LineChart, {LineChartRef} from '~/components/LineChart'; import LineChart, {LineChartRef} from '~/components/LineChart';
......
...@@ -45,14 +45,14 @@ const StyledInput = styled.input<{rounded?: boolean}>` ...@@ -45,14 +45,14 @@ const StyledInput = styled.input<{rounded?: boolean}>`
} }
`; `;
type CustomeInputProps = { type CustomInputProps = {
rounded?: boolean; rounded?: boolean;
value?: string; value?: string;
onChange?: (value: string) => unknown; onChange?: (value: string) => unknown;
}; };
export type InputProps = Omit<React.ComponentPropsWithoutRef<'input'>, keyof CustomeInputProps | 'type' | 'className'> & export type InputProps = Omit<React.ComponentPropsWithoutRef<'input'>, keyof CustomInputProps | 'type' | 'className'> &
CustomeInputProps; CustomInputProps;
const Input = React.forwardRef<HTMLInputElement, InputProps & WithStyled>( const Input = React.forwardRef<HTMLInputElement, InputProps & WithStyled>(
({rounded, value, onChange, className, ...props}, ref) => ( ({rounded, value, onChange, className, ...props}, ref) => (
......
...@@ -61,7 +61,7 @@ const Header = styled.div` ...@@ -61,7 +61,7 @@ const Header = styled.div`
font-size: ${em(10)}; font-size: ${em(10)};
> a { > a {
display: inline-blcok; display: inline-block;
line-height: 1; line-height: 1;
height: ${em(14)}; height: ${em(14)};
......
...@@ -301,7 +301,7 @@ const SampleChart: FunctionComponent<SampleChartProps> = ({ ...@@ -301,7 +301,7 @@ const SampleChart: FunctionComponent<SampleChartProps> = ({
return null; return null;
}, [viewed, loading, error, data, step, entityProps, t, content]); }, [viewed, loading, error, data, step, entityProps, t, content]);
const Previewer = useMemo(() => { const Previewer = useMemo<React.ReactNode>(() => {
if (!previewer) { if (!previewer) {
return null; return null;
} }
......
...@@ -47,7 +47,8 @@ const Label = styled.div` ...@@ -47,7 +47,8 @@ const Label = styled.div`
font-size: ${em(10)}; font-size: ${em(10)};
> a { > a {
display: inline-blcok; display: inline-block;
cursor: pointer;
line-height: 1; line-height: 1;
height: ${em(14)}; height: ${em(14)};
...@@ -112,10 +113,10 @@ const StepSlider: FunctionComponent<StepSliderProps> = ({onChange, onChangeCompl ...@@ -112,10 +113,10 @@ const StepSlider: FunctionComponent<StepSliderProps> = ({onChange, onChangeCompl
<div>{`${t('sample:step')}: ${steps[step] ?? '...'}`}</div> <div>{`${t('sample:step')}: ${steps[step] ?? '...'}`}</div>
<Tippy placement="right" theme="tooltip" content={t('sample:step-tip')}> <Tippy placement="right" theme="tooltip" content={t('sample:step-tip')}>
<div className="step-buttons"> <div className="step-buttons">
<a href="javascript:void(0)" onClick={prevStep}> <a onClick={prevStep}>
<Icon type="chevron-up" /> <Icon type="chevron-up" />
</a> </a>
<a href="javascript:void(0)" onClick={nextStep}> <a onClick={nextStep}>
<Icon type="chevron-down" /> <Icon type="chevron-down" />
</a> </a>
</div> </div>
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words coord zlevel
import * as chart from '~/utils/chart'; import * as chart from '~/utils/chart';
import type {EChartOption, ECharts, EChartsConvertFinder} from 'echarts'; import type {EChartOption, ECharts, EChartsConvertFinder} from 'echarts';
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words zlevel
import {MutableRefObject, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react'; import {MutableRefObject, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react';
import {position, primaryColor, size} from '~/utils/style'; import {position, primaryColor, size} from '~/utils/style';
......
...@@ -115,7 +115,7 @@ const Graph: FunctionComponent = () => { ...@@ -115,7 +115,7 @@ const Graph: FunctionComponent = () => {
useEffect(() => { useEffect(() => {
if (data?.data.size) { if (data?.data.size) {
setFiles([new File([data.data], data.filename || 'unknwon_model')]); setFiles([new File([data.data], data.filename || 'unknown_model')]);
} }
}, [data]); }, [data]);
...@@ -185,7 +185,7 @@ const Graph: FunctionComponent = () => { ...@@ -185,7 +185,7 @@ const Graph: FunctionComponent = () => {
<NodePropertiesSidebar <NodePropertiesSidebar
data={nodeData} data={nodeData}
onClose={() => setNodeData(null)} onClose={() => setNodeData(null)}
showNodeDodumentation={() => graph.current?.showNodeDocumentation(nodeData)} showNodeDocumentation={() => graph.current?.showNodeDocumentation(nodeData)}
/> />
</Aside> </Aside>
); );
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words strs
export type Property = { export type Property = {
name?: string; name?: string;
value: string; value: string;
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, {FunctionComponent, LazyExoticComponent} from 'react'; import React, {FunctionComponent, LazyExoticComponent} from 'react';
export enum Pages { export enum Pages {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {ActionTypes} from './types'; import {ActionTypes} from './types';
import type {Model} from './types'; import type {Model} from './types';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {GraphActionTypes, GraphState} from './types'; import type {GraphActionTypes, GraphState} from './types';
import {ActionTypes} from './types'; import {ActionTypes} from './types';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {RootState} from '../index'; import type {RootState} from '../index';
export const model = (state: RootState) => state.graph.model; export const model = (state: RootState) => state.graph.model;
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export type Model = FileList | File[] | null; export type Model = FileList | File[] | null;
export enum ActionTypes { export enum ActionTypes {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as graphActions from './graph/actions'; import * as graphActions from './graph/actions';
import * as graphSelectors from './graph/selectors'; import * as graphSelectors from './graph/selectors';
import * as runsActions from './runs/actions'; import * as runsActions from './runs/actions';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Page, Runs} from './types'; import type {Page, Runs} from './types';
import {ActionTypes} from './types'; import {ActionTypes} from './types';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {RunsActionTypes, RunsState} from './types'; import type {RunsActionTypes, RunsState} from './types';
import {ActionTypes} from './types'; import {ActionTypes} from './types';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Page} from './types'; import type {Page} from './types';
import type {RootState} from '../index'; import type {RootState} from '../index';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export type Runs = string[]; export type Runs = string[];
export enum ActionTypes { export enum ActionTypes {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {ActionTypes} from './types'; import {ActionTypes} from './types';
import type {Theme} from './types'; import type {Theme} from './types';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {THEME, autoTheme} from '~/utils/theme'; import {THEME, autoTheme} from '~/utils/theme';
import type {ThemeActionTypes, ThemeState} from './types'; import type {ThemeActionTypes, ThemeState} from './types';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {RootState} from '../index'; import type {RootState} from '../index';
export const theme = (state: RootState) => state.theme.theme; export const theme = (state: RootState) => state.theme.theme;
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Theme} from '~/utils/theme'; import type {Theme} from '~/utils/theme';
export type {Theme} from '~/utils/theme'; export type {Theme} from '~/utils/theme';
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words mpga
interface AudioPlayerOptions { interface AudioPlayerOptions {
context?: AudioContext; context?: AudioContext;
volume?: number; volume?: number;
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:words unobserves
/** /**
* The **ResizeObserver** interface reports changes to the dimensions of an * The **ResizeObserver** interface reports changes to the dimensions of an
* [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)'s content * [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)'s content
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare module 'echarts-gl'; declare module 'echarts-gl';
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare global { declare global {
interface Window { interface Window {
webkitAudioContext: AudioContext; webkitAudioContext: AudioContext;
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Use this file to declare any custom file extensions for importing */ /* Use this file to declare any custom file extensions for importing */
/* Use this folder to also add/extend a package d.ts file, if needed. */ /* Use this folder to also add/extend a package d.ts file, if needed. */
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Data, Worker} from './types'; import type {Data, Worker} from './types';
interface Audio { interface Audio {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Worker} from './types'; import type {Worker} from './types';
const worker: Worker = async io => { const worker: Worker = async io => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Worker} from './types'; import type {Worker} from './types';
const worker: Worker = async io => { const worker: Worker = async io => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Worker} from './types'; import type {Worker} from './types';
const worker: Worker = async io => { const worker: Worker = async io => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Data, Worker} from './types'; import type {Data, Worker} from './types';
const worker: Worker = async io => { const worker: Worker = async io => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Data, Worker} from './types'; import type {Data, Worker} from './types';
interface Image { interface Image {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */ /* eslint-disable no-console */
import IO from './io'; import IO from './io';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */ /* eslint-disable no-console */
import crypto, {BinaryLike} from 'crypto'; import crypto, {BinaryLike} from 'crypto';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Data, Worker} from './types'; import type {Data, Worker} from './types';
const worker: Worker = async io => { const worker: Worker = async io => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {Data, Worker} from './types'; import type {Data, Worker} from './types';
const worker: Worker = async io => { const worker: Worker = async io => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type IO from './io'; import type IO from './io';
export type Worker = (io: IO) => Promise<void>; export type Worker = (io: IO) => Promise<void>;
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Request, Response} from 'express'; import {Request, Response} from 'express';
import IO from './builder/io'; import IO from './builder/io';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Request, Response} from 'express'; import {Request, Response} from 'express';
import fs from 'fs/promises'; import fs from 'fs/promises';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default [ export default [
{ {
wallTime: 1512549785061.623, wallTime: 1512549785061.623,
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:disable
export default { export default {
runs: ['train', 'test'], runs: ['train', 'test'],
tags: [ tags: [
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default ['embeddings', 'scalar', 'image', 'audio', 'graph', 'histogram', 'pr_curve']; export default ['embeddings', 'scalar', 'image', 'audio', 'graph', 'histogram', 'pr_curve'];
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Request} from 'express'; import {Request} from 'express';
export default (req: Request) => { export default (req: Request) => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default { export default {
runs: ['train', 'test'], runs: ['train', 'test'],
tags: [ tags: [
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:disable
import {Request, Response} from 'express'; import {Request, Response} from 'express';
import fetch from 'isomorphic-unfetch'; import fetch from 'isomorphic-unfetch';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default [ export default [
[ [
1515224840945.252, 1515224840945.252,
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default { export default {
runs: ['train', 'test'], runs: ['train', 'test'],
tags: [ tags: [
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Request, Response} from 'express'; import {Request, Response} from 'express';
import fs from 'fs/promises'; import fs from 'fs/promises';
import mime from 'mime-types'; import mime from 'mime-types';
import path from 'path'; import path from 'path';
const images = ['1.jpeg', '2.jpeg', '3.jpeg', '4.jpeg', '5.gif', '6.gif', '7.gif']; const images = ['1.jpeg', '2.jpeg', '3.jpeg', '4.jpeg', '5.gif', '6.gif', '7.gif', '8.jpeg'];
export default async (req: Request, res: Response) => { export default async (req: Request, res: Response) => {
const index = (+req.query.index ?? 0) % images.length; const index = (+req.query.index ?? 0) % images.length;
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default [ export default [
{ {
wallTime: 1512549785061.623, wallTime: 1512549785061.623,
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:disable
export default { export default {
runs: ['train', 'test'], runs: ['train', 'test'],
tags: [ tags: [
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Request} from 'express'; import {Request} from 'express';
export default (request: Request) => { export default (request: Request) => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Request} from 'express'; import {Request} from 'express';
export default (request: Request) => { export default (request: Request) => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default { export default {
runs: ['train', 'test'], runs: ['train', 'test'],
tags: [ tags: [
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Request} from 'express'; import {Request} from 'express';
export default (request: Request) => { export default (request: Request) => {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default { export default {
runs: ['train', 'test'], runs: ['train', 'test'],
tags: [ tags: [
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */ /* eslint-disable no-console */
import express from 'express'; import express from 'express';
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Request, Response} from 'express'; import {Request, Response} from 'express';
import faker from 'faker'; import faker from 'faker';
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words actived nextcode
const view = require('./view'); const view = require('./view');
const host = {}; const host = {};
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
// cSpell:words grapher selectall nodesep ranksep rankdir pbtxt
const zip = require('netron/src/zip'); const zip = require('netron/src/zip');
const gzip = require('netron/src/gzip'); const gzip = require('netron/src/gzip');
const tar = require('netron/src/tar'); const tar = require('netron/src/tar');
...@@ -1337,7 +1339,7 @@ view.ModelFactoryService = class { ...@@ -1337,7 +1339,7 @@ view.ModelFactoryService = class {
_filter(context) { _filter(context) {
const identifier = context.identifier.toLowerCase(); const identifier = context.identifier.toLowerCase();
const list = this._extensions.filter(entry => identifier.endsWith(entry.extension)).map(extry => extry.id); const list = this._extensions.filter(entry => identifier.endsWith(entry.extension)).map(entry => entry.id);
return Array.from(new Set(list)); return Array.from(new Set(list));
} }
...@@ -1347,6 +1349,7 @@ view.ModelFactoryService = class { ...@@ -1347,6 +1349,7 @@ view.ModelFactoryService = class {
return Promise.reject(new ModelError('File has no content.', true)); return Promise.reject(new ModelError('File has no content.', true));
} }
const list = [ const list = [
// cSpell:disable
{name: 'ELF executable', value: /^\x7FELF/}, {name: 'ELF executable', value: /^\x7FELF/},
{name: 'Git LFS header', value: /^version https:\/\/git-lfs.github.com\/spec\/v1\n/}, {name: 'Git LFS header', value: /^version https:\/\/git-lfs.github.com\/spec\/v1\n/},
{name: 'Git LFS header', value: /^oid sha256:/}, {name: 'Git LFS header', value: /^oid sha256:/},
...@@ -1358,6 +1361,7 @@ view.ModelFactoryService = class { ...@@ -1358,6 +1361,7 @@ view.ModelFactoryService = class {
{name: 'StringIntLabelMapProto data', value: /^item\s*{\r?\n\s*id:/}, {name: 'StringIntLabelMapProto data', value: /^item\s*{\r?\n\s*id:/},
{name: 'StringIntLabelMapProto data', value: /^item\s*{\r?\n\s*name:/}, {name: 'StringIntLabelMapProto data', value: /^item\s*{\r?\n\s*name:/},
{name: 'Python source code', value: /^\s*import sys, types, os;/} {name: 'Python source code', value: /^\s*import sys, types, os;/}
// cSpell:enable
]; ];
const text = new TextDecoder().decode(buffer.subarray(0, Math.min(1024, buffer.length))); const text = new TextDecoder().decode(buffer.subarray(0, Math.min(1024, buffer.length)));
for (const item of list) { for (const item of list) {
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// cSpell:words autorestart
declare type App = { declare type App = {
name: string; name: string;
script: string; script: string;
......
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare module '@visualdl/core/builder/environment'; declare module '@visualdl/core/builder/environment';
/**
* Copyright 2020 Baidu Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */ /* eslint-disable no-console */
import {config} from 'dotenv'; import {config} from 'dotenv';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册