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
项目引入了多项更改,主要集中在添加对捕获和处理 Conda 环境信息的支持。这些更改涉及多个文件,包括模型更新、元数据处理以及单元测试。主要更改包括:
模型和元数据更新:
swanlab/api/upload/model.py
中的FileModel
类中添加了一个新的conda
属性,并更新了create
方法以处理这个新属性。[1] [2]swanlab/data/callback_cloud.py
中的on_runtime_info_update
方法,使其在创建FileModel
实例时包含 Conda 信息。swanlab/data/run/main.py
,以导入并使用新的get_conda
函数来获取 Conda 信息。[1] [2]swanlab/data/run/metadata/__init__.py
,以包含新的get_conda
函数,并相应地调整了__all__
列表。[1] [2]新增功能:
swanlab/data/run/metadata/conda.py
文件,其中定义了get_conda
函数,该函数通过子进程和 YAML 解析来收集 Conda 环境信息。单元测试:
test/unit/api/upload/test_model.py
中的单元测试,以测试FileModel
类中的新conda
属性。[1] [2] [3]test/unit/data/run/metadata/hardware/test_conda.py
测试文件,用于测试get_conda
函数,确保其正确获取并解析 Conda 环境信息。close #827