You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Alessandro Benedetti (Jira)" <ji...@apache.org> on 2021/02/10 17:09:00 UTC
[jira] [Updated] (SOLR-15149) Learning To Rank model upload fails
generically
[ https://issues.apache.org/jira/browse/SOLR-15149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alessandro Benedetti updated SOLR-15149:
----------------------------------------
Description:
When uploading a model, using a not existent store or other incorrect parameters you get:
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","java.lang.ClassCastException"],
"msg":"org.apache.solr.ltr.model.ModelException: Model type does not exist org.apache.solr.ltr.model.LinearModel",
"code":400}}
In the response, logs don't help that much out of the box, I had to go for remote debugging and of course we don't want the generic user to do that.
Reason is in org/apache/solr/ltr/model/LTRScoringModel.java:111
{code:java}
try {
// create an instance of the model
model = solrResourceLoader.newInstance(
className,
LTRScoringModel.class,
new String[0], // no sub packages
new Class[] { String.class, List.class, List.class, String.class, List.class, Map.class },
new Object[] { name, features, norms, featureStoreName, allFeatures, params });
if (params != null) {
SolrPluginUtils.invokeSetters(model, params.entrySet());
}
} catch (final Exception e) {
throw new ModelException("Model type does not exist " + className, e);
}
{code}
This happens when:
- use a not existent feature store
- use not existent feature
- use an integer instead of Double as a weight in a linear model
unless any objection, we should improve such message with the real one
was:
When uploading a model, using a not existent store or other incorrect parameters you get:
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","java.lang.ClassCastException"],
"msg":"org.apache.solr.ltr.model.ModelException: Model type does not exist org.apache.solr.ltr.model.LinearModel",
"code":400}}
In the response, logs don't help that much out of the box, I had to go for remote debugging and of course we don't want the generic user to do that.
Reason is in org/apache/solr/ltr/model/LTRScoringModel.java:111
{code:java}
try {
// create an instance of the model
model = solrResourceLoader.newInstance(
className,
LTRScoringModel.class,
new String[0], // no sub packages
new Class[] { String.class, List.class, List.class, String.class, List.class, Map.class },
new Object[] { name, features, norms, featureStoreName, allFeatures, params });
if (params != null) {
SolrPluginUtils.invokeSetters(model, params.entrySet());
}
} catch (final Exception e) {
throw new ModelException("Model type does not exist " + className, e);
}
{code}
unless any objection, we should improve such message with the real one
> Learning To Rank model upload fails generically
> -----------------------------------------------
>
> Key: SOLR-15149
> URL: https://issues.apache.org/jira/browse/SOLR-15149
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Alessandro Benedetti
> Priority: Major
>
> When uploading a model, using a not existent store or other incorrect parameters you get:
> "error":{
> "metadata":[
> "error-class","org.apache.solr.common.SolrException",
> "root-error-class","java.lang.ClassCastException"],
> "msg":"org.apache.solr.ltr.model.ModelException: Model type does not exist org.apache.solr.ltr.model.LinearModel",
> "code":400}}
> In the response, logs don't help that much out of the box, I had to go for remote debugging and of course we don't want the generic user to do that.
> Reason is in org/apache/solr/ltr/model/LTRScoringModel.java:111
> {code:java}
> try {
> // create an instance of the model
> model = solrResourceLoader.newInstance(
> className,
> LTRScoringModel.class,
> new String[0], // no sub packages
> new Class[] { String.class, List.class, List.class, String.class, List.class, Map.class },
> new Object[] { name, features, norms, featureStoreName, allFeatures, params });
> if (params != null) {
> SolrPluginUtils.invokeSetters(model, params.entrySet());
> }
> } catch (final Exception e) {
> throw new ModelException("Model type does not exist " + className, e);
> }
> {code}
> This happens when:
> - use a not existent feature store
> - use not existent feature
> - use an integer instead of Double as a weight in a linear model
> unless any objection, we should improve such message with the real one
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org