by the way, something as simple as this also fails:
#include <torch/script.h>
#include <string>
#include <vector>
struct PyManager : torch::CustomClassHolder {
    PyManager(std::string model_path, std::string img_bank_folder_root, std::string cache_folder,
        std::string pnet, std::string rnet, std::string onet, bool rebuildCache) 
    {
        std::cout << "ok!";
    }

    int AddUser(std::string user_id, std::string img_fldr_path) 
    {
        std::cout << user_id << img_fldr_path;
    }
    int RemoveUser(std::string user_id) 
    {
        std::cout << user_id ;
    }
    int UpdateUser(std::string user_id, std::string new_images_folder_path)
    {
        std::cout << user_id << new_images_folder_path;
    }
    int UpdateUsersInBulk(std::vector<std::string> userIDs, std::string ID_folders_path, bool is_delete_granted = true, bool show_dbg_info = true)
    {
        std::cout << userIDs.size() << ID_folders_path;
    }
    int RenameId(std::string old_id, std::string new_id)
    {
        std::cout << old_id << new_id;
    }

};

TORCH_LIBRARY(my_classes, m) {
    m.class_<PyManager>("PyManager")
        .def(torch::init<std::string, std::string, std::string, std::string, std::string, std::string, bool>())
        .def("add", &PyManager::AddUser)
        .def("remove", &PyManager::RemoveUser)
        .def("update", &PyManager::UpdateUser)
        .def("update_in_bulk", &PyManager::UpdateUsersInBulk);
}

Any help would be greatly appreciated!