Skip to content

Commit

Permalink
Hyper parameters (#960)
Browse files Browse the repository at this point in the history
* feat: hyper-parameters

* feat: hyper-parameters

* feat: hyper-parameters

* feat: hyper-parameters

* feat: hyper-parameters

* feat: hyper-parameters

* feat: hyper-parameters

* feat: hyper-parameters

* feat: hyper-parameters
  • Loading branch information
PeterPanZH authored May 19, 2021
1 parent e2d15e9 commit 3699edf
Show file tree
Hide file tree
Showing 103 changed files with 5,938 additions and 560 deletions.
9 changes: 7 additions & 2 deletions frontend/packages/core/builder/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ const middleware = () => {
return async (req, res) => {
const file = path.join(root, req.path.replace(/\.js$/, '.svg'));
if ((await fs.stat(file)).isFile()) {
res.type('js');
res.send(await transform(file, false));
if (req.path.endsWith('.js')) {
res.type('js');
res.send(await transform(file, false));
} else {
res.type(req.path.split('.').pop());
res.send(await fs.readFile(file));
}
}
};
};
Expand Down
6 changes: 6 additions & 0 deletions frontend/packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@visualdl/netron": "2.1.5",
"@visualdl/wasm": "2.1.5",
"bignumber.js": "9.0.1",
"classnames": "2.3.1",
"d3": "6.6.2",
"d3-format": "2.0.0",
"echarts": "4.9.0",
Expand All @@ -57,6 +58,8 @@
"query-string": "7.0.0",
"react": "17.0.2",
"react-content-loader": "6.0.3",
"react-dnd": "14.0.2",
"react-dnd-html5-backend": "14.0.0",
"react-dom": "17.0.2",
"react-helmet": "6.1.0",
"react-i18next": "11.8.12",
Expand All @@ -66,6 +69,8 @@
"react-redux": "7.2.3",
"react-router-dom": "5.2.0",
"react-spinners": "0.10.6",
"react-table": "7.6.3",
"react-table-sticky": "1.1.3",
"react-toastify": "7.0.3",
"redux": "4.0.5",
"styled-components": "5.2.3",
Expand Down Expand Up @@ -104,6 +109,7 @@
"@types/react-rangeslider": "2.2.3",
"@types/react-redux": "7.1.16",
"@types/react-router-dom": "5.1.7",
"@types/react-table": "7.0.29",
"@types/snowpack-env": "2.3.3",
"@types/styled-components": "5.1.9",
"@types/three": "0.127.0",
Expand Down
4 changes: 2 additions & 2 deletions frontend/packages/core/public/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions frontend/packages/core/public/icons/dragger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions frontend/packages/core/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"close": "Close",
"colon": ": ",
"confirm": "Confirm",
"download-data": "Download data",
"download-data-format": "In {{format}}",
"download-image": "Download image",
"empty": "Nothing to display",
"error": "Error occurred",
"graph": "Graphs",
Expand All @@ -13,16 +16,20 @@
"image": "Image",
"inactive": "Inactive",
"loading": "Please wait while loading data",
"maximize": "Maximize",
"minimize": "Minimize",
"more": "More",
"next-page": "Next Page",
"pr-curve": "PR Curve",
"previous-page": "Prev Page",
"restore": "Selection restore",
"roc-curve": "ROC Curve",
"run": "Run",
"running": "Running",
"runs": "Runs",
"sample": "Samples",
"scalar": "Scalars",
"scalar-value": "Value",
"search": "Search",
"search-empty": "Nothing found. Please try again with another word. <1/>Or you can <3>see all charts</3>.",
"search-result": "Search Result",
Expand All @@ -46,6 +53,7 @@
"step": "Step",
"wall": "Wall Time"
},
"toggle-log-axis": "Logarithmic axis",
"total-page": "{{count}} page, jump to",
"total-page_plural": "{{count}} pages, jump to",
"unselected-empty": "Nothing selected. <1/>Please select display data from right side."
Expand Down
4 changes: 0 additions & 4 deletions frontend/packages/core/public/locales/en/curves.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"download-image": "Download image",
"false-negatives": "FN",
"false-positives": "FP",
"maximize": "Maximize",
"minimize": "Minimize",
"precision": "Precision",
"recall": "Recall",
"restore": "Selection restore",
"threshold": "Threshold",
"time-display-type": "Time Display Type",
"true-negatives": "TN",
Expand Down
3 changes: 0 additions & 3 deletions frontend/packages/core/public/locales/en/histogram.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"download-image": "Download image",
"maximize": "Maximize",
"minimize": "Minimize",
"mode": "Mode",
"mode-value": {
"offset": "Offset",
Expand Down
34 changes: 34 additions & 0 deletions frontend/packages/core/public/locales/en/hyper-parameter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"data-type-value": {
"hparams": "Hyper Parameters",
"metrics": "Metrics"
},
"hyper-parameter": {
"order-default": "Default"
},
"max": "Max",
"metric-graphs-empty": "<0>No metrics selected</0><1>Please select some metrics to view graphs here.</1>",
"min": "Min",
"negative-infinity": "-Infinity",
"order-by": "Sort by",
"order-direction": "Direction",
"order-direction-value": {
"asc": "Ascending",
"desc": "Descending"
},
"parameter-importance": "Hyper Parameters Importance",
"positive-infinity": "+Infinity",
"scale-method": {
"linear": "Linear",
"logarithmic": "Logarithmic",
"quantile": "Quantile"
},
"session-table-empty": "<0>Click or hover over a line to display its values here</0><1><0>Hover to display values;</0><0>Click to display metrics graph.</0><1>",
"show-parameter-importance": "Show HParams Importance",
"trial-id": "Trial ID",
"views": {
"parallel-coordinates": "Parallel Coordinates View",
"scatter-plot-matrix": "Scatter Plot Matrix View",
"table": "Table View"
}
}
1 change: 0 additions & 1 deletion frontend/packages/core/public/locales/en/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"sample": "Sample",
"sample-rate": "Sample Rate",
"show-actual-size": "Show Actual Image Size",
"step": "Step",
"step-tip": "You can change step by pressing up & donw on your keyboard",
"text": "text"
}
8 changes: 0 additions & 8 deletions frontend/packages/core/public/locales/en/scalar.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
{
"download-data": "Download data",
"download-data-format": "In {{format}}",
"download-image": "Download image",
"ignore-outliers": "Ignore outliers in chart scaling",
"max": "Max.",
"maximize": "Maximize",
"min": "Min.",
"minimize": "Minimize",
"restore": "Selection restore",
"show-most-value": "Show global extrema",
"smoothed": "Smoothed",
"smoothed-data-only": "Smoothed Data Only",
"smoothing": "Smoothing",
"toggle-log-axis": "Logarithmic axis",
"tooltip-sorting": "Tooltip Sorting",
"tooltip-sorting-value": {
"ascending": "Ascending",
"default": "Default",
"descending": "Descending",
"nearest": "Nearest"
},
"value": "Value",
"x-axis": "X-Axis"
}
8 changes: 8 additions & 0 deletions frontend/packages/core/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"close": "关闭",
"colon": "",
"confirm": "确定",
"download-data": "下载数据",
"download-data-format": "{{format}} 格式",
"download-image": "下载图片",
"empty": "暂无数据",
"error": "发生错误",
"graph": "网络结构",
Expand All @@ -13,16 +16,20 @@
"image": "图像",
"inactive": "待使用",
"loading": "数据载入中,请稍等",
"maximize": "最大化",
"minimize": "最小化",
"more": "更多",
"next-page": "下一页",
"pr-curve": "PR曲线",
"previous-page": "上一页",
"restore": "还原图表框选",
"roc-curve": "ROC曲线",
"run": "运行",
"running": "运行中",
"runs": "数据流",
"sample": "样本数据",
"scalar": "标量数据",
"scalar-value": "Value",
"search": "搜索",
"search-empty": "没有找到您期望的内容,你可以尝试其他搜索词<1/>或者点击<3>查看全部图表</3>",
"search-result": "搜索结果",
Expand All @@ -46,6 +53,7 @@
"step": "Step",
"wall": "Wall Time"
},
"toggle-log-axis": "切换对数坐标轴",
"total-page": "共 {{count}} 页,跳转至",
"total-page_plural": "共 {{count}} 页,跳转至",
"unselected-empty": "未选中任何数据<1/>请在右侧操作栏选择要展示的数据"
Expand Down
4 changes: 0 additions & 4 deletions frontend/packages/core/public/locales/zh/curves.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"download-image": "下载图片",
"false-negatives": "FN",
"false-positives": "FP",
"maximize": "最大化",
"minimize": "最小化",
"precision": "Precision",
"recall": "Recall",
"restore": "还原图表框选",
"threshold": "Threshold",
"time-display-type": "时间显示类型",
"true-negatives": "TN",
Expand Down
3 changes: 0 additions & 3 deletions frontend/packages/core/public/locales/zh/histogram.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"download-image": "下载图片",
"maximize": "最大化",
"minimize": "最小化",
"mode": "直方图模式",
"mode-value": {
"offset": "Offset",
Expand Down
34 changes: 34 additions & 0 deletions frontend/packages/core/public/locales/zh/hyper-parameter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"data-type-value": {
"hparams": "超参数",
"metrics": "度量指标"
},
"hyper-parameter": {
"order-default": "默认"
},
"max": "最大值",
"metric-graphs-empty": "<0>无度量指标启用</0><1>请启用一些指标以在此处查看内容</1>",
"min": "最小值",
"negative-infinity": "负无穷",
"order-by": "排序方式",
"order-direction": "排序方向",
"order-direction-value": {
"asc": "升序",
"desc": "降序"
},
"parameter-importance": "超参重要性排序",
"positive-infinity": "正无穷",
"scale-method": {
"linear": "Linear",
"logarithmic": "Logarithmic",
"quantile": "Quantile"
},
"session-table-empty": "<0>请悬停或点击某条折线查看数据</0><1><0>悬停查看该训练轮次的具体数据;</0><0>点击查看选中的训练轮次模型指标图。</0><1>",
"show-parameter-importance": "查看超参重要性排序",
"trial-id": "Trial ID",
"views": {
"parallel-coordinates": "平行坐标图",
"scatter-plot-matrix": "散点图",
"table": "表格视图"
}
}
1 change: 0 additions & 1 deletion frontend/packages/core/public/locales/zh/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"sample": "样本",
"sample-rate": "采样率",
"show-actual-size": "按真实大小展示",
"step": "Step",
"step-tip": "您还可以通过键盘 ↑ ↓ 键,快速调节step哦~",
"text": "文本"
}
8 changes: 0 additions & 8 deletions frontend/packages/core/public/locales/zh/scalar.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
{
"download-data": "下载数据",
"download-data-format": "{{format}} 格式",
"download-image": "下载图片",
"ignore-outliers": "图表缩放时忽略极端值",
"max": "最大值",
"maximize": "最大化",
"min": "最小值",
"minimize": "最小化",
"restore": "还原图表框选",
"show-most-value": "显示最值",
"smoothed": "Smoothed",
"smoothed-data-only": "仅显示平滑后数据",
"smoothing": "平滑度",
"toggle-log-axis": "切换对数坐标轴",
"tooltip-sorting": "详情数据排序",
"tooltip-sorting-value": {
"ascending": "升序",
"default": "默认",
"descending": "降序",
"nearest": "最近"
},
"value": "Value",
"x-axis": "X轴"
}
20 changes: 19 additions & 1 deletion frontend/packages/core/src/components/Aside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export const AsideSection = styled.section`
margin-bottom: 0;
${transitionProps('border-color')}
}
& > & {
margin-left: 0;
margin-right: 0;
}
`;

const Wrapper = styled.div.attrs<{width: string | number}>(({width}) => ({
Expand Down Expand Up @@ -59,6 +64,19 @@ const Wrapper = styled.div.attrs<{width: string | number}>(({width}) => ({
flex: none;
box-shadow: 0 -${rem(5)} ${rem(16)} 0 rgba(0, 0, 0, 0.03);
padding: ${rem(20)};
> ${AsideSection} {
margin-left: 0;
margin-right: 0;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
}
> .aside-resize-bar-left,
Expand All @@ -68,7 +86,7 @@ const Wrapper = styled.div.attrs<{width: string | number}>(({width}) => ({
height: 100%;
top: 0;
cursor: col-resize;
user-select: none;
touch-action: none;
&.aside-resize-bar-left {
left: 0;
Expand Down
Loading

0 comments on commit 3699edf

Please sign in to comment.