WaleedEsmail:

undefined reference to `ROOT::RDataFrame::RDataFrame(std::experimental::__ROOT::basic_string_view<char, std::char_traits >, std::experimental::__ROOT::basic_string_view<char, std::char_traits >, std::vector<std::string, std::allocatorstd::string > const&)’ collect2: error: ld returned 1 exit status


This says that the linker does not find the reference for RDataFrame this is probably an issue with the ROOT libraries and has nothing to do with libtorch. Try rebuilding ROOT from sources.