jina-ai / examples

Jina examples and demos to help you get started
https://docs.jina.ai
Apache License 2.0
455 stars 142 forks source link

wikipedia-sentences-incremental: repository does not exist #440

Closed franquil closed 3 years ago

franquil commented 3 years ago

Following the guide at wikipedia-sentences-incremental directory, an error: Unable to find image 'jinahub/app.example.wikipedia-sentences-incremental:0.1-0.9.24' locally docker: Error response from daemon: pull access denied for jinahub/app.example.wikipedia-sentences-incremental, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. will be occurred, when run docker run -p 45678:45678 jinahub/app.example.wikipedia-sentences-incremental:0.1-0.9.24 command.

Looks like the required repository does not exist.

rutujasurve94 commented 3 years ago

Hey @franquil could you try with jinahub/app.example.wikipedia-sentences-30k:0.2.10-1.0.10 instead? This link is valid https://hub.docker.com/r/jinahub/app.example.wikipedia-sentences-30k. You can navigate the available images for examples with prefix this prefix: https://hub.docker.com/r/jinahub/app.example

franquil commented 3 years ago

Hi @rutujasurve94 , thanks again. I build an image called jinahub/app.example.wikipedia-sentences-incremental:0.1-1.0.13 and published to jina hub. Here's the pop up page at the end. I suppose the command docker run -p 45678:45678 jinahub/app.example.wikipedia-sentences-incremental:0.1-1.0.13 should be working now. (the version should be modified to 1.0.13 rather than 0.9.24 at README)

By the way, I found a typo at the last sh command curl --request POST -d '{"top_k": 10, "mode": "search", "data": ["text:hello world"]}' -H 'Content-Type: application/json' 'http://0.0.0.0:45678/api/search'`, the last character `(backtick) should be removed, otherwise it won't work.

I found the results will take a while to show up in this example compared with the Wikipedia sentences example, another potential improvement would be reducing the default top_k parameter to 2 (or 3). So, users would get a fast response rather than waiting for a while and don't know what happened.

What would you think?

rutujasurve94 commented 3 years ago

Hi @franquil thanks for the insights on this and glad to know that you could successfully publish the image. I'll make the correction for the curl query : curl --request POST -d '{"top_k": 10, "mode": "search", "data": ["text:hello world"]}' -H 'Content-Type: application/json' 'http://0.0.0.0:45678/api/search' We can tweak the top_k param to return few most relevant results for the incremental case for sure. The incremental example uses docIdCache to avoid duplication while indexing. At query time, it ideally wouldn't affect the speed

franquil commented 3 years ago

Hi @rutujasurve94 thanks for your reply. In terms of the built image(jinahub/app.example.wikipedia-sentences-incremental:0.1-1.0.13), I can found it on Docker Hub, is it available on dashboard-hub? If it is, how can I find it?

Thanks for your clarification about the query issue.

rutujasurve94 commented 3 years ago

Hi @franquil, dashboard-hub has the pod images (all types of executors hosted), wikipedia examples is a type of app (example)

franquil commented 3 years ago

Thanks, @rutujasurve94 . I searched with the "example" and the "demo" filters on dashboard-hub page, however, still couldn't find the image I posted. It may be out of this issue's scope, and I suppose the issue can be closed now.

alexcg1 commented 3 years ago

I guess this can be closed now @franquil @FionnD @rutujasurve94 ?

franquil commented 3 years ago

@alexcg1 Seems that the doc is not updated especially the last part "Run in Docker". Furthermore, looks like there's a new update two weeks ago, which corresponding docker image doesn't exist, when I try to rebuild it, an error below occurred:

@ 6[C]:inputs is not valid! FileNotFoundError(2, 'No such file or directory')
Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/jina/clients/request/__init__.py", line 56, in request_generator
    for batch in batch_iterator(data, request_size):
  File "/opt/conda/lib/python3.8/site-packages/jina/helper.py", line 229, in batch_iterator
    chunk = tuple(islice(data, batch_size))
  File "/opt/conda/lib/python3.8/site-packages/jina/clients/sugary_io.py", line 63, in _input_lines
    with open(filepath, read_mode) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'data/input-1.txt'

To fix the issue, I suppose the docker image should be rebuilt and upload to remote hub, and the README file should be updated.