53 lines
1.5 KiB
Python
Executable File
53 lines
1.5 KiB
Python
Executable File
from tests.LightGBM_GPU_Test import test_lightgbm_gpu
|
||
from tests.pgmpy_comprehensive_test import test_pgmpy_ordered_comprehensive
|
||
from tests.pytorch_gpu_test import test_pytorch_gpu
|
||
from tests.xgboost_gpu_test import test_xgboost_gpu
|
||
|
||
def main():
|
||
"""
|
||
主函数:执行所有GPU测试
|
||
|
||
该函数按顺序执行以下测试:
|
||
1. PyTorch GPU测试
|
||
2. LightGBM GPU测试
|
||
3. XGBoost GPU测试
|
||
4. pgmpy综合测试
|
||
|
||
每个测试都在独立的try-except块中执行,确保一个测试的失败不会影响其他测试的执行。
|
||
"""
|
||
print("开始执行所有GPU测试...")
|
||
print("=" * 50)
|
||
|
||
# PyTorch GPU测试
|
||
try:
|
||
print("\n1. 执行PyTorch GPU测试")
|
||
test_pytorch_gpu()
|
||
except Exception as e:
|
||
print(f"PyTorch GPU测试执行出错: {e}")
|
||
|
||
# LightGBM GPU测试
|
||
try:
|
||
print("\n2. 执行LightGBM GPU测试")
|
||
test_lightgbm_gpu()
|
||
except Exception as e:
|
||
print(f"LightGBM GPU测试执行出错: {e}")
|
||
|
||
# XGBoost GPU测试
|
||
try:
|
||
print("\n3. 执行XGBoost GPU测试")
|
||
test_xgboost_gpu()
|
||
except Exception as e:
|
||
print(f"XGBoost GPU测试执行出错: {e}")
|
||
|
||
# pgmpy综合测试
|
||
try:
|
||
print("\n4. 执行pgmpy综合测试")
|
||
test_pgmpy_ordered_comprehensive()
|
||
except Exception as e:
|
||
print(f"pgmpy综合测试执行出错: {e}")
|
||
|
||
print("\n" + "=" * 50)
|
||
print("所有测试执行完成!")
|
||
|
||
if __name__ == "__main__":
|
||
main() |