Skip to content

Commit

Permalink
update toolkit (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKURA-CAT authored Jun 19, 2024
1 parent e48391b commit 62c26d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# for swanlab
swankit==0.1.0b5
swankit==0.1.0b7
swanboard==0.1.2b3

# data process
Expand Down
2 changes: 0 additions & 2 deletions swanlab/log/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from datetime import datetime
from ..utils import FONT
from swanlab.utils import create_time
from swanlab.utils.judgment import in_jupyter
from abc import ABC, abstractmethod


# 检查当前日期是否和控制台日志文件名一致
Expand Down
8 changes: 4 additions & 4 deletions test/unit/log/pytest_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def test_write_logging_to_file(self):
assert len(files) == 1
with open(os.path.join(console_dir, files[0]), "r") as f:
content = f.readlines()
assert content[-2] == swanlog.prefix + " " + a + "\n"
assert content[-1] == swanlog.prefix + " " + b + "\n"
assert content[-2] == "swanlab:" + " " + a + "\n"
assert content[-1] == "swanlab:" + " " + b + "\n"

def test_can_write_logging(self):
swanlog.install(console_dir)
Expand All @@ -117,5 +117,5 @@ def test_can_write_logging(self):
assert len(files) == 1
with open(os.path.join(console_dir, files[0]), "r") as f:
content = f.readlines()
assert content[-2] != swanlog.prefix + " " + a + "\n"
assert content[-1] == swanlog.prefix + " " + b + "\n"
assert content[-2] != "swanlab:" + " " + a + "\n"
assert content[-1] == "swanlab:" + " " + b + "\n"

0 comments on commit 62c26d9

Please sign in to comment.