Skip to content

Commit

Permalink
Merge pull request #21 from SwanHubX/feature/experiment-index
Browse files Browse the repository at this point in the history
v0.0.1beta6
  • Loading branch information
Feudalman authored Dec 13, 2023
2 parents b9326fa + b285ae2 commit 79b504f
Show file tree
Hide file tree
Showing 41 changed files with 1,042 additions and 345 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"store": "database",
"help": "java",
"experiment": "benchMark",
"chart": "app"
"chart": "app",
"index": "home"
},
"material-icon-theme.files.associations": {
".env.mock": "Tune"
Expand Down Expand Up @@ -73,6 +74,7 @@
"i18n-ally.enabledParsers": ["json", "js"],
"i18n-ally.sourceLanguage": "zh-CN", // 翻译源语言 是你翻译文件的名字
"i18n-ally.displayLanguage": "zh-CN", //显示语言
"vue-i18n.i18nPaths": "vue/src/i18n",

/** tailwind */
"css.customData": [".vscode/tailwind.json"],
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swanlab-ui",
"private": true,
"version": "0.0.1beta4",
"version": "0.0.1beta6",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -11,13 +11,15 @@
},
"dependencies": {
"@antv/g2plot": "^2.4.31",
"@headlessui/vue": "^1.7.16",
"axios": "^1.6.2",
"moment": "^2.29.4",
"pinia": "^2.1.7",
"sass": "^1.69.5",
"vue": "^3.3.8",
"vue-i18n": "^9.8.0",
"vue-router": "^4.2.5"
"vue-router": "^4.2.5",
"vue-tippy": "^6.3.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion swanlab/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
from .project import PT


print("swanlab.database init")
# print("swanlab.database init")
5 changes: 4 additions & 1 deletion swanlab/database/expriment.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from ..env import SWANLAB_LOGS_FOLDER
from typing import Union
from ..utils import create_time, generate_color
from .system import get_system_info
import sys


Expand All @@ -28,7 +29,9 @@ def __init__(self, experiment_id: int, name: str, description: str, config: dict
super().__init__(path)
self.experiment_id = experiment_id
self.name = name
# tags数据不会被序列化
self.tags = []
self.system = get_system_info()
self.description = description
self.config = config
self.argv = sys.argv
Expand All @@ -52,9 +55,9 @@ def __dict__(self) -> dict:
"description": self.description,
"config": self.config,
"color": self.color,
"system": self.system,
"argv": self.argv,
"index": self.index,
"tags": self.tags,
"create_time": self.create_time,
"update_time": self.update_time,
}
Expand Down
11 changes: 11 additions & 0 deletions swanlab/database/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@
@Description:
采集系统数据,包括内存、CPU、GPU、硬盘、网络等
"""
import platform
import socket


def get_system_info():
"""获取系统信息"""
info = {}
info["hostname"] = socket.gethostname()
info["os"] = platform.platform()
info["python"] = platform.python_version()
return info
Loading

0 comments on commit 79b504f

Please sign in to comment.