Skip to content

Commit

Permalink
Feat/improve-print-color (#608)
Browse files Browse the repository at this point in the history
优化了一些打印的颜色
  • Loading branch information
Zeyi-Lin authored Jun 8, 2024
1 parent 98f12f1 commit 8020583
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions swanlab/api/auth/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@

def login_request(api_key: str, timeout: int = 20) -> requests.Response:
"""用户登录,请求后端接口完成验证"""
resp = requests.post(
url=f"{get_host_api()}/login/api_key", headers={"authorization": api_key}, timeout=timeout
)
resp = requests.post(url=f"{get_host_api()}/login/api_key", headers={"authorization": api_key}, timeout=timeout)
return resp


Expand Down Expand Up @@ -65,7 +63,7 @@ def input_api_key(
sys.excepthook = _abort_tip
if not again:
print(FONT.swanlab("Logging into swanlab cloud."))
print(FONT.swanlab("You can find your API key at: " + get_user_setting_path()))
print(FONT.swanlab("You can find your API key at: " + FONT.yellow(get_user_setting_path())))

tip = FONT.swanlab(tip)
ij = in_jupyter()
Expand Down
4 changes: 2 additions & 2 deletions swanlab/db/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def before_init_experiment(
description: str,
num: int,
suffix: str,
setter: Callable[[str, str, str, str], None]
setter: Callable[[str, str, str, str], None],
):
# ---------------------------------- 实验描述校验 ----------------------------------
description = description if description is not None else ""
Expand Down Expand Up @@ -185,7 +185,7 @@ def on_column_create(self, column_info: ColumnInfo):
try:
add_multi_chart(tag_id=tag.id, chart_id=chart.id)
except ChartTypeError:
swanlog.warning("In the multi-experiment chart, the current type of tag is not as expected.")
swanlog.debug("In the multi-experiment chart (Local), the current type of tag is not as expected.")

def on_stop(self, error: str = None):
# 更新数据库中的实验状态
Expand Down

0 comments on commit 8020583

Please sign in to comment.