When Jep converts a Python object into a Java object if it does not recognize the Python type it will return the String representation of the Python object, see this bug for discussion on that behavior. If you are running the latest version of Jep(3.8) you can override this behavior by passing a Java class to the getValue function. The PyObject class was created to serve as a generic wrapper around arbitrary python objects. The following code should do what you want:
Jep jep = new Jep();
jep.eval("import pickle");
jep.eval("clf = pickle.load(open('C:/Downloads/DSRFmodel.pkl', 'rb'))");
jep.eval("print(type(clf))");
Object randomForest = jep.getValue("clf", PyObject.class);
jep.eval("import integration");
jep.set("arg1", requestId);
jep.set("arg2", randomForest);
jep.eval("result = integration.trainmodel(arg1, arg2)");
Answer from bsteffen on Stack Overflow
» pip install jep
There's another sourceforge project called pyro4. It can handle python modules like: numpy, sklearn... And maybe it's even better because it is currently developed. (last jepp version was released in 2010)
Check out https://github.com/mrj0/jep, that's where JEP is now. And it seems it was updated recently. As per the site it now works with Python version >= 2.6.