测试并修复api导入路径错误
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
from api_ex.pipeline_health_analyzer import PipelineHealthAnalyzer
|
||||
"""
|
||||
tests.unit.test_pipeline_health_analyzer 的 Docstring
|
||||
"""
|
||||
|
||||
|
||||
def test_pipeline_health_analyzer():
|
||||
from app.algorithms.api_ex.pipeline_health_analyzer import PipelineHealthAnalyzer
|
||||
|
||||
# 初始化分析器,假设模型文件路径为'models/rsf_model.joblib'
|
||||
analyzer = PipelineHealthAnalyzer()
|
||||
# 创建示例输入数据(9个样本)
|
||||
@@ -51,7 +55,7 @@ def test_pipeline_health_analyzer():
|
||||
), "每个生存函数应包含x和y属性"
|
||||
|
||||
# 可选:测试绘图功能(不显示图表)
|
||||
analyzer.plot_survival(survival_functions, show_plot=True)
|
||||
analyzer.plot_survival(survival_functions, show_plot=False)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user