Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Vespa' object has no attribute 'update_batch'. Did you mean: 'update_data'? #31132

Closed
zshnb opened this issue Apr 12, 2024 · 1 comment
Assignees
Milestone

Comments

@zshnb
Copy link

zshnb commented Apr 12, 2024

I try run text-image-search app with command:
python3 clip_feed.py. then I got error

AttributeError: 'Vespa' object has no attribute 'update_batch'. Did you mean: 'update_data'?

I've checked vespa application code, there isn't update_batch function, how can I fix this?

@thomasht86
Copy link

This sample-app uses an old version of pyvespa, and update_batch is no longer supported.
Instead, you should use feed_iterable().
Note that you also need to confirm that your batch is in expected format, eg.

batch = [
    "id": "1",
    "fields": {
        "title": "yourtitle",
        ...
    },
]

For more examples, see also https://pyvespa.readthedocs.io/en/latest/reads-writes.html

We will also create an issue to update the sample app.

@kkraune kkraune transferred this issue from vespa-engine/sample-apps May 7, 2024
@kkraune kkraune added this to the soon milestone May 8, 2024
@zshnb zshnb closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants