From a52669be75fcc8e7d301e0c0284530cdd7052aa9 Mon Sep 17 00:00:00 2001 From: Zirui Cai <74649535+Feudalman@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:54:37 +0800 Subject: [PATCH] Refactor/log page (#361) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: create text tag * feat: init * feat: text data * feat: zoom * feat: text detail * feat: step * style * fix: width * fix: change * fix: change * feat: modal title * fix: line clamp * test: text log * Squashed commit of the following: commit 6ec7f6d1397fb54ed418ce538fc3427a51793f2c Author: KAAANG <79990647+SAKURA-CAT@users.noreply.github.com> Date: Thu Feb 22 16:13:17 2024 +0800 record max step and min step (#341) commit ce48cd8a73308af615ade4d7b181199a3da8f93f Author: KAAANG Date: Thu Feb 22 15:51:42 2024 +0800 delete Video commit a11a7ed337a1cc6c9109e983bf4d366fbece086c Author: Bote Huang <106975133+KashiwaByte@users.noreply.github.com> Date: Thu Feb 22 15:36:32 2024 +0800 Feat/video chart (#338) * feat:create class Video * feat:add __init__,add video chart * feat:add function for saving video * feat:add function for getting list of video * feat:add function get_data * feat:add function __save and __prepare_video * feat:add function load_from_str and load_from_BytesIO * bugfix: fix __save function * del test file commit 6b5b9c3e570ce9ce4be7afdc8e80feb3e73ec103 Author: KAAANG <79990647+SAKURA-CAT@users.noreply.github.com> Date: Wed Feb 21 15:25:33 2024 +0800 Feat/new line chart (#334) * add type——linear * label formatter * update tick commit 788d8c14200f4b29e86b740c84b3e7aececce66e Author: Ze-Yi LIN <58305964+xiaolin199912@users.noreply.github.com> Date: Tue Feb 20 21:07:39 2024 +0800 Feat/image-add-parameters-boxes-masks (#329) * add BoundingBoxes class * update something * Update transfer_logfile_0.1.4.py * add ImageMask class * bugfix commit 65a63784b66a504b8a0928c00605afa437b5bd1e Author: Ze-Yi LIN <58305964+xiaolin199912@users.noreply.github.com> Date: Mon Feb 19 18:42:11 2024 +0800 Readme v0.2.0 (#326) commit 7b964e9a295782f89f391ed9b7afe6dcf370f549 Author: Zirui Cai <74649535+Feudalman@users.noreply.github.com> Date: Mon Feb 19 18:29:05 2024 +0800 Fixbug/tag sort (#327) * use hash name to filename * feat: get text * feat: get text * feat: caption * fix: log page layout * ui: color * feat: skeleton * fix: detail caption * fix: length * feat: log height * feat: page index * fix: flash * fix: skeleton * fix: flash * fix: some bug * fix:wrap * ui: color * Squashed commit of the following: commit b32847862f014345c38c2c8888663a124cbec0be Author: KAAANG <79990647+SAKURA-CAT@users.noreply.github.com> Date: Mon Feb 26 22:12:23 2024 +0800 Update/line chart styles (#351) * hover active * hover top * optimize hover top * Update LineChart.vue * update hover * allow hover while running * Limit height when zooming in * fix slidebar bug * thickenByTag * Logic to distinguish between multiple data charts and single data charts * allow config crosshair * update crosshairsColor * update doc * update thickerLineWidth --------- Co-authored-by: ZeYi Lin <944270057@qq.com> * refactor: click to turn page * feat: enter and blur * doc: comments * fix: bg height * fix: csv runtime * fix: column * feat: compute * feat: render * fix: text wrap * fix: error logs * fix: error log * Squashed commit of the following: commit bb6d5950fe0690de0fc91c61f979646ec71e3b64 Author: Zirui Cai <74649535+Feudalman@users.noreply.github.com> Date: Wed Feb 28 21:25:42 2024 +0800 Feature/text chart (#337) * feat: create text tag * feat: init * feat: text data * feat: zoom * feat: text detail * feat: step * style * fix: width * fix: change * fix: change * feat: modal title * fix: line clamp * test: text log * Squashed commit of the following: commit 6ec7f6d1397fb54ed418ce538fc3427a51793f2c Author: KAAANG <79990647+SAKURA-CAT@users.noreply.github.com> Date: Thu Feb 22 16:13:17 2024 +0800 record max step and min step (#341) commit ce48cd8a73308af615ade4d7b181199a3da8f93f Author: KAAANG Date: Thu Feb 22 15:51:42 2024 +0800 delete Video commit a11a7ed337a1cc6c9109e983bf4d366fbece086c Author: Bote Huang <106975133+KashiwaByte@users.noreply.github.com> Date: Thu Feb 22 15:36:32 2024 +0800 Feat/video chart (#338) * feat:create class Video * feat:add __init__,add video chart * feat:add function for saving video * feat:add function for getting list of video * feat:add function get_data * feat:add function __save and __prepare_video * feat:add function load_from_str and load_from_BytesIO * bugfix: fix __save function * del test file commit 6b5b9c3e570ce9ce4be7afdc8e80feb3e73ec103 Author: KAAANG <79990647+SAKURA-CAT@users.noreply.github.com> Date: Wed Feb 21 15:25:33 2024 +0800 Feat/new line chart (#334) * add type——linear * label formatter * update tick commit 788d8c14200f4b29e86b740c84b3e7aececce66e Author: Ze-Yi LIN <58305964+xiaolin199912@users.noreply.github.com> Date: Tue Feb 20 21:07:39 2024 +0800 Feat/image-add-parameters-boxes-masks (#329) * add BoundingBoxes class * update something * Update transfer_logfile_0.1.4.py * add ImageMask class * bugfix commit 65a63784b66a504b8a0928c00605afa437b5bd1e Author: Ze-Yi LIN <58305964+xiaolin199912@users.noreply.github.com> Date: Mon Feb 19 18:42:11 2024 +0800 Readme v0.2.0 (#326) commit 7b964e9a295782f89f391ed9b7afe6dcf370f549 Author: Zirui Cai <74649535+Feudalman@users.noreply.github.com> Date: Mon Feb 19 18:29:05 2024 +0800 Fixbug/tag sort (#327) * use hash name to filename * feat: get text * feat: get text * feat: caption * fix: log page layout * ui: color * feat: skeleton * fix: detail caption * fix: length * feat: log height * feat: page index * fix: flash * fix: skeleton * fix: flash * fix: some bug * fix:wrap * ui: color * Squashed commit of the following: commit b32847862f014345c38c2c8888663a124cbec0be Author: KAAANG <79990647+SAKURA-CAT@users.noreply.github.com> Date: Mon Feb 26 22:12:23 2024 +0800 Update/line chart styles (#351) * hover active * hover top * optimize hover top * Update LineChart.vue * update hover * allow hover while running * Limit height when zooming in * fix slidebar bug * thickenByTag * Logic to distinguish between multiple data charts and single data charts * allow config crosshair * update crosshairsColor * update doc * update thickerLineWidth --------- Co-authored-by: ZeYi Lin <944270057@qq.com> * refactor: click to turn page * feat: enter and blur * doc: comments * fix: bg height * Update launch.json * refactor: get texts * refactor: script to create experiment --------- Co-authored-by: ZeYi Lin <944270057@qq.com> Co-authored-by: KAAANG commit 113d4bc2464b541c29cb4bf9ad75bb5cf7369199 Author: KAAANG <79990647+SAKURA-CAT@users.noreply.github.com> Date: Wed Feb 28 00:01:25 2024 +0800 legend component (#354) commit b32847862f014345c38c2c8888663a124cbec0be Author: KAAANG <79990647+SAKURA-CAT@users.noreply.github.com> Date: Mon Feb 26 22:12:23 2024 +0800 Update/line chart styles (#351) * hover active * hover top * optimize hover top * Update LineChart.vue * update hover * allow hover while running * Limit height when zooming in * fix slidebar bug * thickenByTag * Logic to distinguish between multiple data charts and single data charts * allow config crosshair * update crosshairsColor * update doc * update thickerLineWidth --------- Co-authored-by: ZeYi Lin <944270057@qq.com> * fix * ui: optimize * ui: optimize --------- Co-authored-by: ZeYi Lin <944270057@qq.com> --- swanlab/server/controller/experiment.py | 8 +- .../views/experiment/components/FuncBar.vue | 39 +++- .../views/experiment/pages/log/LogPage.vue | 218 +++++++++++++----- vue/src/views/home/components/TableBar.vue | 7 +- 4 files changed, 212 insertions(+), 60 deletions(-) diff --git a/swanlab/server/controller/experiment.py b/swanlab/server/controller/experiment.py index 768fe4ad..9195c530 100644 --- a/swanlab/server/controller/experiment.py +++ b/swanlab/server/controller/experiment.py @@ -426,14 +426,14 @@ def get_recent_logs(experiment_id): with open(os.path.join(console_path, f), mode="r", encoding="utf-8") as log: logs = log.read().split("\n") + logs # 如果当前收集到的数据超过限制,退出循环 - if len(logs) >= MAX_NUM: - # current_page = index - break + # if len(logs) >= MAX_NUM: + # # current_page = index + # break # 如果 logs 内容为空 if logs[0] == "": return NOT_FOUND_404("No Logs Found") - logs = logs[:MAX_NUM] + # logs = logs[:MAX_NUM] end = (logs[-1] if not logs[-1] == "" else logs[-2]).split(" ")[0] data = { "recent": [logs[0].split(" ")[0], end], diff --git a/vue/src/views/experiment/components/FuncBar.vue b/vue/src/views/experiment/components/FuncBar.vue index ecfc59f3..8a06b700 100644 --- a/vue/src/views/experiment/components/FuncBar.vue +++ b/vue/src/views/experiment/components/FuncBar.vue @@ -1,6 +1,15 @@