vespa-engine / learntorank-DEPRECATED

Apache License 2.0
4 stars 2 forks source link

Batch evaluation is not working with pyvespa >= 0.39.0 #57

Closed sbrunk closed 11 months ago

sbrunk commented 11 months ago

I'm currently playing with Vespa for a hybrid-search use-case and it's working great so far!

One thing I'm trying to do is to compare different preprocessing methods and ranking strategies, so I've created a simple eval dataset and tried to run batch evaluation.

from learntorank.evaluation import evaluate

evaluation = evaluate(
    app=app,
    labeled_data=labeled_data,
    eval_metrics=eval_metrics,
    query_model=query_model,
    id_field="id"
)

Running it, causses the following error though:

AttributeError: 'Vespa' object has no attribute 'query_batch'

It seems the reason is the removal of the query_batch method in https://github.com/vespa-engine/pyvespa/pull/617. My current workaround is to downgrade to pyvespa 0.38.0

kkraune commented 11 months ago

Correct, this will not work for recent pyvespa releases - the pyvespa API is still work in progress. Thanks for reporting!

The https://github.com/vespa-engine/learntorank repo will shortly be archived as it is not actively maintained, and I will update the (readme) files with this.