From 4691d0632581c8ddbacae6e030daf5941851a203 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Fri, 21 Nov 2025 11:10:00 +0100 Subject: [PATCH] [tmva][sofie] Run Keras tests for any Keras version --- tmva/sofie/test/CMakeLists.txt | 36 ++++++++++++---------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/tmva/sofie/test/CMakeLists.txt b/tmva/sofie/test/CMakeLists.txt index 50915da185643..5bf887b760475 100644 --- a/tmva/sofie/test/CMakeLists.txt +++ b/tmva/sofie/test/CMakeLists.txt @@ -153,29 +153,19 @@ endif() # Any reatures that link against libpython are disabled if built with tpython=OFF if (tpython AND ROOT_KERAS_FOUND AND BLAS_FOUND) - - set(unsupported_keras_version "3.10.0") - - # TODO: make sure we also support the newest Keras - if (NOT DEFINED ROOT_KERAS_VERSION) - message(WARNING "Keras found, but version unknown — cannot verify compatibility.") - elseif (ROOT_KERAS_VERSION VERSION_LESS ${unsupported_keras_version}) - configure_file(generateKerasModels.py generateKerasModels.py COPYONLY) - configure_file(scale_by_2_op.hxx scale_by_2_op.hxx COPYONLY) - - ROOT_ADD_GTEST(TestRModelParserKeras TestRModelParserKeras.C - LIBRARIES - ROOTTMVASofie - Python3::NumPy - Python3::Python - BLAS::BLAS - INCLUDE_DIRS - SYSTEM - ${CMAKE_CURRENT_BINARY_DIR} - ) - else() - message(WARNING "Keras version ${ROOT_KERAS_VERSION} is too new for the SOFIE Keras parser (only supports < ${unsupported_keras_version})") - endif() + configure_file(generateKerasModels.py generateKerasModels.py COPYONLY) + configure_file(scale_by_2_op.hxx scale_by_2_op.hxx COPYONLY) + + ROOT_ADD_GTEST(TestRModelParserKeras TestRModelParserKeras.C + LIBRARIES + ROOTTMVASofie + Python3::NumPy + Python3::Python + BLAS::BLAS + INCLUDE_DIRS + SYSTEM + ${CMAKE_CURRENT_BINARY_DIR} + ) endif()