I'm not sure if this will solve your problem, but you are using a very old 
version of Ranklib. The most recent version is 2.9.
https://sourceforge.net/projects/lemur/files/lemur/RankLib-2.9/


-----Original Message-----
From: kusha.pande [mailto:kusha.pa...@gmail.com] 
Sent: Thursday, February 15, 2018 8:12 AM
To: solr-user@lucene.apache.org
Subject: solr ltr jar is not able to recognize MultipleAdditiveTreesModel

Hi I am trying to upload a training model generated from ranklib jar using 
lamdamart mart.

The model is like
{"class":"org.apache.solr.ltr.model.MultipleAdditiveTreesModel",
    "name":"lambdamartmodel",
"params" : {
"trees" :[
   {
      "id": "1",
      "weight": "0.1",
      "split": {
         "feature": "8",
         "threshold": "7.111333",
         "split": [
            {
               "pos": "left",
               "feature": "8",
               "threshold": "5.223557",
               "split": [
                  {
                     "pos": "left",
                     "feature": "8",
                     "threshold": "3.2083516",
                     "split": [
                        {
                           "pos": "left",
                           "feature": "1",
                           "threshold": "100.0",
                           "split": [
                              {
                                 "pos": "left",
                                 "feature": "8",
                                 "threshold": "2.2626402",
                                 "split": [
                                    {
                                       "pos": "left",
                                       "feature": "8",
                                       "threshold": "2.2594802",
                                       "split": [
                                          {
                                             "pos": "left",
                                             "output": "-1.6371088"
                                          },
                                          {
                                             "pos": "right",
                                             "output": "-2.0"
                                          }
                                       ]
                                    },
                                    {
                                       "pos": "right",
                                       "feature": "8",
                                       "threshold": "2.4438097",
                                       "split": [
                                          {
                                             "pos": "left",
                                             "feature": "2",
                                             "threshold": "0.05",
                                             "split": [
                                                {
                                                   "pos": "left",
                                                   "output": "2.0"
                                                }, ......


getting an exception as :
Exception: Status: 400 Bad Request
Response: {
  "responseHeader":{
    "status":400,
    "QTime":43},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","java.lang.RuntimeException"],
    "msg":"org.apache.solr.ltr.model.ModelException: Model type does not
exist org.apache.solr.ltr.model.MultipleAdditiveTreesModel",
    "code":400}}
.

I have used RankLib-2.1-patched.jar to generate the model and converted the
generated xml to json.





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to