lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Lin Edwin Yeo <edwinye...@gmail.com>
Subject Re: Cannot train 2 or more features for Solr LTR using LIBLINEAR
Date Wed, 01 Aug 2018 01:36:18 GMT
Hi,

Anyone has any information on this?

Regards,
Edwin

On Mon, 30 Jul 2018 at 11:15, Zheng Lin Edwin Yeo <edwinyeozl@gmail.com>
wrote:

> Hi,
>
> I am using the Solr LTR in Solr 7.4.0, and I am trying to train an example
> learning model using LIBLINEAR.
>
> When I tried to run the code from train_and_upload_demo_model.py , I can
> only train one feature at a time. If I put more than one features, then I
> will get the following error
>
> Traceback (most recent call last):
>
>   File "train_and_upload_demo_model.py", line 182, in <module>
>
>     sys.exit(main())
>
>   File "train_and_upload_demo_model.py", line 169, in main
>
>
> formatter.processQueryDocFeatureVector(fvGenerator,config["trainingFile"]);
>
>   File
> "/cygdrive/c/Users/edwin/Desktop/solr-7.4.0/contrib/ltr/myModel/libsvm_formatter.py",
> line 25, in processQueryDocFeatureVector
>
>     curListOfFv.append((relevance,self._makeFeaturesMap(featureVector)))
>
>   File
> "/cygdrive/c/Users/edwin/Desktop/solr-7.4.0/contrib/ltr/myModel/libsvm_formatter.py",
> line 35, in _makeFeaturesMap
>
>     featName,featValue = keyValuePairStr.split(":");
>
> ValueError: too many values to unpack
>
>
> Is there any way that we can do so that we can train 2 or more features at
> the same time?
>
> Regards,
> Edwin
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message