Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README/ReleaseNotes/v642/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The following people have contributed to this new version:
* The Keras and PyTorch parsers for SOFIE (`TMVA::Experimental::SOFIE::PyKeras` and `PyTorch`) are now removed, so `RSofieReader` only accepts ONNX files.
These parsers relied on private implementation details of Keras and PyTorch, which change faster than is appropriate for ROOT's stability standards.
Users are encouraged to export their models to ONNX and use the retained ONNX parser instead.
* **PyMVA**, the TMVA interface to Python machine-learning libraries (the `PyKeras`, `PyTorch`, `PyRandomForest`, `PyGTB` and `PyAdaBoost` methods), and the corresponding `tmva-pymva` build option are deprecated and will be removed in ROOT 6.44. Like the SOFIE Keras and PyTorch parsers, PyMVA relies on implementation details of the underlying Python libraries that change faster than is appropriate for ROOT's stability standards. Users are encouraged to train and evaluate their models directly with the Python machine-learning libraries, which integrate well with ROOT via the `ROOT::Experimental::ML::DataLoader`. For high-performance inference in C++, models can be exported to ONNX and evaluated with SOFIE (see `RSofieReader`).
* The ROOT IO capability for the `TMVA::Experimental::RBDT` class has been removed, along with the `TMVA.Experimental.SaveXGBoost` Python function. Experimental classes should not be persistified since their on-disk layout is not guaranteed to be stable. An `RBDT` is now built directly from an XGBoost model in its native JSON serialization with the new `TMVA::Experimental::RBDT::LoadXGBoost(jsonPath)`, which works both from C++ and Python. To convert a trained model, save it first with XGBoost's `Booster.save_model("model.json")` and then load it with `LoadXGBoost`.
* The **JsMVA** feature for interactive TMVA training in Jupyter notebooks is now removed. It was not functional for years and was therefore already excluded from ROOT 6.38. This also removes the `TMVA::IPythonInteractive` class and the related interactive-training interfaces from the TMVA method and fitter classes, such as `MethodBase::ExitFromTraining()` or `FitterBase::SetIPythonInteractive()`.
* The **RooStats::DebuggingSampler** and **RooStats::DebuggingTestStat** classes are removed. They were mock implementations of the `TestStatSampler` and `TestStatistic` interfaces that returned uniform random numbers independent of the data, only meant for debugging the RooStats framework itself during its initial development.
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ foreach(opt afdsmgrd afs alien bonjour builtin_afterimage builtin_davix builtin_
endforeach()

#---Deprecated options------------------------------------------------------------------------
foreach(opt mpi r)
foreach(opt mpi r tmva-pymva)
if(${opt})
message(DEPRECATION ">>> Option '${opt}' is deprecated and will be removed in the next release of ROOT. Please contact root-dev@cern.ch should you still need it.")
endif()
Expand Down
2 changes: 2 additions & 0 deletions tmva/pymva/inc/TMVA/PyMethodBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ namespace TMVA {
void PyRunString(TString code, TString errorMessage="Failed to run python code", int start=256 /* Py_single_input */); // runs python code from string in local namespace with error handling

private:
void PrintDeprecationWarning();

static PyObject *fModuleBuiltin;
static PyObject *fEval; // eval funtion from python
static PyObject *fOpen; // open function for files
Expand Down
16 changes: 16 additions & 0 deletions tmva/pymva/src/PyMethodBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ PyMethodBase::PyMethodBase(const TString &jobName, Types::EMVA methodType, const
: MethodBase(jobName, methodType, methodTitle, dsi, theOption),
fClassifier(NULL)
{
PrintDeprecationWarning();

if (!PyIsInitialized()) {
PyInitialize();
}
Expand All @@ -103,6 +105,8 @@ PyMethodBase::PyMethodBase(Types::EMVA methodType,
const TString &weightFile): MethodBase(methodType, dsi, weightFile),
fClassifier(NULL)
{
PrintDeprecationWarning();

if (!PyIsInitialized()) {
PyInitialize();
}
Expand All @@ -114,6 +118,18 @@ PyMethodBase::PyMethodBase(Types::EMVA methodType,
}
}

///////////////////////////////////////////////////////////////////////////////
/// Warn that PyMVA is deprecated and scheduled for removal in ROOT 6.44.

void PyMethodBase::PrintDeprecationWarning()
{
Log() << kWARNING
<< "PyMVA is deprecated and will be removed in ROOT 6.44. Please use the underlying Python "
"machine-learning packages directly, or export your model to ONNX and evaluate it with SOFIE "
"(see the RSofieReader class)."
<< Endl;
}

///////////////////////////////////////////////////////////////////////////////

PyMethodBase::~PyMethodBase()
Expand Down
Loading