Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] SwanLab按照CONTRIBUTE文档配置后,运行调试出现缺少ujson的bug #648

Closed
ShaohonChen opened this issue Jul 19, 2024 · 3 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@ShaohonChen
Copy link
Contributor

🐛 Bug description [Please make everyone to understand it]

在按照贡献文档完成环境配置后,出现缺少ujson的问题

在windows电脑上出现的问题,python版本是3.12

🧑‍💻 Step to reproduce

按照贡献文档中的过程安装依赖包

pip install -r requirements.txt
pip install -r requirements-media.txt
pip install -r requirements-dev.txt

然后使用调试按钮进行所有单元测试,发现错误

image

报错信息如下:

ImportError while loading conftest 'C:\Users\61169\projects\SwanLab\test\unit\conftest.py'.
test\unit\conftest.py:11: in <module>
    from tutils import TEMP_PATH, reset_some_env
tutils\__init__.py:10: in <module>
    from swanlab.env import SwanLabEnv
swanlab\__init__.py:2: in <module>
    from .data import (
swanlab\data\__init__.py:16: in <module>
    from .sdk import (
swanlab\data\sdk.py:27: in <module>
    from swanboard import SwanBoardCallback
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\__init__.py:1: in <module>
    from .callback import SwanBoardCallback
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\callback.py:2: in <module>
    from .db.models import *
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\db\__init__.py:11: in <module>
    from .models import (
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\db\models\__init__.py:10: in <module>
    from .charts import Chart
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\db\models\charts.py:13: in <module>
    from .experiments import Experiment
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\db\models\experiments.py:22: in <module>
    from .projects import Project
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\db\models\projects.py:12: in <module>
    from swanboard.utils import get_package_version
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\utils\__init__.py:6: in <module>
    from .file import check_exp_name_format, check_desc_format
..\..\miniconda3\envs\swanlab\Lib\site-packages\swanboard\utils\file.py:12: in <module>
    import ujson
E   ModuleNotFoundError: No module named 'ujson'

似乎是安装swanboard时没有正确安装ujson的原因。

🚑 Any additional [like screenshots]

  • main分支:
  • win11:
  • python3.12
@ShaohonChen ShaohonChen added the 🐛 bug Something isn't working label Jul 19, 2024
@ShaohonChen
Copy link
Contributor Author

经过测试,手动安装ujson可修复此bug

pip install ujson

@SAKURA-CAT
Copy link
Contributor

这是swanboard的bug:SwanHubX/SwanLab-Dashboard#45

@SAKURA-CAT
Copy link
Contributor

closed by #646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants