feat: support self-hosted (#843) #862
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
本次 Pull Request 包含对 SwanLab 项目多个文件的修改,旨在提升功能性和文档质量。最重要的变化包括新增了一个依赖文件、更新了文档,以及对云存储和认证模块的重大重构。
文档更新:
• 新增了文档
docs/插件化设计.md
,详细解释了插件设计,包括如何创建自定义插件以及自 issue #780 以来的改动。• 更新了
docs/登录认证.md
,删除了关于获取 API 密钥的冗余信息。依赖管理:
• 在依赖文件列表中添加了
requirements-dashboard.txt
,并将其包含在包配置(pyproject.toml
)中。[1] [2] [3]• 创建了新的
requirements-dashboard.txt
文件,指定了swanboard
依赖。代码重构:
• 重构了
swanlab/api/cos.py
,将腾讯云 COS SDK 替换为 Boto3 库用于云对象存储,简化了上传流程并移除了不必要的导入。[1] [2] [3]• 将
swanlab/data/callback_cloud.py
重命名并重构为swanlab/data/callbacker/cloud.py
,更新了导入路径和类继承关系,以提升代码组织性和可读性。[1] [2] [3] [4] [5]认证功能增强:
• 修改了
swanlab/api/auth/login.py
中的code_login
和terminal_login
函数,增加了可选的save_key
参数,允许用户选择是否在本地保存 API 密钥。[1] [2] [3]这些改动共同提升了 SwanLab 项目的功能性、文档质量和代码可维护性。
Co-authored-by: ZeYi Lin [email protected]