hanxiao / mindspore-jina-example

https://hanxiao.io/2020/10/28/Mindspore-powered-Neural-Search-in-Jina/
Apache License 2.0
6 stars 1 forks source link

Some errors when running this demo #2

Closed leonwanghui closed 3 years ago

leonwanghui commented 3 years ago

Hi Dr.Xiao, recently I'm trying to deploy the mindspore-jina-example demo on my Linux server, but it seems that some errors just occurred unexpectedly.

Firstly it seems that the Jina hello-world couldn't launch successfully on the Linux server with some errors of no browser support. So I'm wondering if the demo can only be installed on Linux with GUI support.

Then when I tried to install the demo with the instruction, some errors occurred when I run jina hello-world --uses-index helloworld.flow.index.yml --uses-query helloworld.flow.query.yml command:

ERROR:tornado.general:Uncaught exception in ZMQStream callback
Traceback (most recent call last):
  File "/root/miniconda3/envs/mindspore/lib/python3.7/site-packages/zmq/eventloop/zmqstream.py", line 444, in _run_callback
    callback(*args, **kwargs)
  File "/root/miniconda3/envs/mindspore/lib/python3.7/site-packages/jina/peapods/zmq.py", line 346, in <lambda>
    self.out_sock.on_recv(lambda x: _callback(x, self.out_sock_type))
  File "/root/miniconda3/envs/mindspore/lib/python3.7/site-packages/jina/peapods/zmq.py", line 333, in _callback
    msg = _parse_from_frames(sock_type, msg)
  File "/root/miniconda3/envs/mindspore/lib/python3.7/site-packages/jina/peapods/zmq.py", line 531, in _parse_from_frames
    return ProtoMessage(frames[1], frames[2])
  File "/root/miniconda3/envs/mindspore/lib/python3.7/site-packages/jina/proto/message/__init__.py", line 38, in __init__
    self.envelope.ParseFromString(envelope)
google.protobuf.message.DecodeError: Error parsing message

Could u offer some suggestions to resolve the errors? Thanks!

hanxiao commented 3 years ago

This looks like a version mismatch problem. The in-docker Jina version & out-docker (aka host machine) Jina version are inconsistent. Try the following steps:

  1. pip install -U jina[hub]
  2. Rebuild the mindspore-lenet image

If no browser then you can't see the result, but HTML is generated anyway, you can copy-paste the HTML to local and check that.

hanxiao commented 3 years ago

maybe let me freeze the version

leonwanghui commented 3 years ago

@hanxiao Sure, plz let me know if it's done, thx!

leonwanghui commented 3 years ago

Also there is a tiny error in both helloworld.flow.index.yml and helloworld.flow.query.yml file that the docker image version should be updated to 0.0.2.

leonwanghui commented 3 years ago

@hanxiao Hi, it seems that the demo just work fine on the Linux server. I uninstalled all packages and re-install them through the instruction, the teminal shows that the static hello-world.html page has been generated, and I can open the static website after copying them to my laptop.

leonwanghui commented 3 years ago

Thanks for your kindly help, will close this issue : )