Menu

#308 Galago eval parameter "precision" is not usable.

v3.x
accepted
galago (57)
1
2019-01-23
2019-01-21
aiqy
No

The "precision" parameter in galago eval (which is used to control the eval result precision) is defined as String in Java while it is actually an int. Because galago automatically converts all strings with numbers only (e.g., "4") as long or double, we cannot set the "precision" parameter (it will cause an error saying that "only String is acceptable").

Discussion

  • Michael Zarozinski

    Can you upload an example of this behavior?

     
  • aiqy

    aiqy - 2019-01-22

    For example, when we run

    galago eval --precision=4 --metrics+map --judgments=xxx.qrels --runs+xx.ranklist

    We will have the following error:

        Exception in thread "main" java.lang.IllegalArgumentException: Key precision does not exist as String in parameters object, instead found 4
            at org.lemurproject.galago.utility.Parameters.getString(Parameters.java:279)
            at org.lemurproject.galago.utility.Parameters.get(Parameters.java:292)
            at org.lemurproject.galago.core.eval.Eval.setEvaluation(Eval.java:198)
            at org.lemurproject.galago.core.eval.Eval.run(Eval.java:126)
            at org.lemurproject.galago.utility.tools.AppFunction.run(AppFunction.java:62)
            at org.lemurproject.galago.core.tools.App.run(App.java:90)
            at org.lemurproject.galago.core.tools.App.run(App.java:81)
            at org.lemurproject.galago.core.tools.App.main(App.java:77)
    

    After changing Eval.java to set "precision" as a int parameter, everything will be fine.

     
  • Michael Zarozinski

    Note: this only happens when using the "--runs+" parameter, in other cases (such as using "--baseline") this parameter is ignored (probably why it's undocumented).

     
    • aiqy

      aiqy - 2019-01-23

      I see. I think the parameter is quite handy sometime, so I create a version of galago myself to support it. Just mention it here in case we want to support it in the future.

       
  • Michael Zarozinski

    • status: open --> accepted
    • assigned_to: Michael Zarozinski
     

Log in to post a comment.