yuanbit / jina-financial-qa-search

69 stars 13 forks source link

Error during command jina hub build FinBertQARanker/ --pull --test-uses --timeout-ready 60000 #2

Open valery-semantipedia opened 3 years ago

valery-semantipedia commented 3 years ago

On macos I got

  1. jina hub build FinBertQARanker/ --pull --test-uses --timeout-ready 60000 .../opt/anaconda3/lib/python3.7/site-packages/jina/importer.py:135: UserWarning: due to the missing dependencies or bad implementations, ['jina.hub.encoders.image.VSEImageEncoder', 'jina.hub.encoders.nlp.VSETextEncoder'] can not be imported if you are using these executors/drivers, they wont work. You can use jina check to list all executors and drivers f'due to the missing dependencies or bad implementations, ' usage: jina [-h] [-v] [-vf] {hello-world, pod, flow, gateway ... 7 more choices} ... jina: error: unrecognized arguments: --timeout-ready 60000
  2. I deleted option --timeout-ready 60000 This time I got AttributeError: 'FinBertQARanker' object has no attribute 'COL_MATCH_HASH' HubIO@24673[I]: def score( HubIO@24673[I]: self, query_meta: Dict, old_match_scores: Dict, match_meta: Dict HubIO@24673[I]: ) -> "np.ndarray": HubIO@24673[I]:
    HubIO@24673[I]: # Compute new matching scores using a fine-tuned model. HubIO@24673[I]: new_scores = [ HubIO@24673[I]: ( HubIO@24673[I]: match_id, HubIO@24673[I]: self._get_score(query_meta['text'], match_meta[match_id]['text']), HubIO@24673[I]: ) HubIO@24673[I]: for match_id, old_score in old_match_scores.items() HubIO@24673[I]: ] HubIO@24673[I]: return np.array( HubIO@24673[I]: new_scores HubIO@24673[I]: , HubIO@24673[I]:> dtype=[(self.COL_MATCH_HASH, np.int64), (self.COL_SCORE, np.float64)], HubIO@24673[I]: ) HubIO@24673[I]:E AttributeError: 'FinBertQARanker' object has no attribute 'COL_MATCH_HASH' HubIO@24673[I]: HubIO@24673[I]:init.py:96: AttributeError
valery-semantipedia commented 3 years ago

Is it possible to avoid usage of attribute 'COL_MATCH_HASH' in code?

valery-semantipedia commented 3 years ago

New version fixes the FinBertQARanker build issue but now there is an error related to missing config.json file

building FinBertQARanker/ takes 4 minutes and 30 seconds (270.76s) HubIO@64395[S]:🎉 built jinahub/pod.ranker.finbertqaranker:0.0.1-0.8.2 (sha256:863ce122b1) uncompressed size: 3.7 GB FinBertQARanker@64395[I]:post_init may take some time... 404 Client Error: Not Found for url: https://huggingface.co//Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker/models/bert-qa/resolve/main/config.json FinBertQARanker@64395[I]:post_init may take some time takes 5 seconds (5.17s) HubIO@64395[E]:something wrong while testing the build: OSError("Can't load config for '/Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker/models/bert-qa'. Make sure that:\n\n- '/Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker/models/bert-qa' is a correct model identifier listed on 'https://huggingface.co/models'\n\n- or '/Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker/models/bert-qa' is the correct path to a directory containing a config.json file\n\n") (base) Valerys-MBP:jina-financial-qa-search-master valerygolender$ 404 Client Error: Not Found for url: https://huggingface.co//Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker/models/bert-qa/resolve/main/config.json -bash: 404: command not found (base) Valerys-MBP:jina-financial-qa-search-master valerygolender$ FinBertQARanker@64395[I]:post_init may take some time takes 5 seconds (5.17s) -bash: syntax error near unexpected token `(' (base) Valerys-MBP:jina-financial-qa-search-master valerygolender$ HubIO@64395[E]:something wrong while testing the build: OSError("Can't load config for '/Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker/models/bert-qa'. Make sure that:\n\n- '/Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker/models/bert-qa' is a correct model identifier listed on 'https://huggingface.co/models'\n\n- or '/Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker/models/bert-qa' is the correct path to a directory containing a config.json file\n\n")

below is content of FinBertQARanker folder on my mac ls /Users/valerygolender/jina-financial-qa-search-master/FinBertQARanker Dockerfile init.py config.yml requirements.txt README.md pycache manifest.yml tests

valery-semantipedia commented 3 years ago

I followed your recommendations and after copying the files I got another error while running search python app.py search unknown exception: APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.41/containers/create?name=ranker')) See the attached file jina_finbert_er.txt Afterwards I tried to rebuild

    HubIO@6303[I]:Successfully tagged jinahub/pod.ranker.finbertqaranker:0.0.1-0.8.2
      HubIO@6303[I]:building FinBertQARanker/ takes 4 minutes and 36 seconds (276.95s)
      HubIO@6303[S]:🎉 built jinahub/pod.ranker.finbertqaranker:0.0.1-0.8.2 (sha256:3e0c6aefe5) uncompressed size: 3.3 GB

FinBertQARanker@6303[I]:post_init may take some time... FinBertQARanker@6303[I]:post_init may take some time takes 7 seconds (7.92s) FinBertQARanker@6303[S]:successfully built FinBertQARanker from a yaml config BasePea@6767[I]:post_init may take some time... HubIO@6303[E]:something wrong while testing the build: TimeoutError('jina.peapods.pea.BasePea with name BasePea can not be initialized after 10000.0ms')

I used command jina hub build FinBertQARanker/ --pull --test-uses jina hub build FinBertQARanker/ --pull --test-uses --timeout-ready 60000 jina_finbert_er.txt gave error jina: error: unrecognized arguments: --timeout-ready 60000

asigiuk commented 3 years ago

I'm also getting the same error when I run the command jina hub build FinBertQARanker/ --pull --test-uses --timeout-ready 60000

/.local/lib/python3.8/site-packages/jina/importer.py:134: UserWarning: due to the missing dependencies or bad implementations, ['jina.hub.encoders.nlp.VSETextEncoder', 'jina.hub.encoders.image.VSEImageEncoder'] can not be imported if you are using these executors/drivers, they wont work. You can use jina check to list all executors and drivers warnings.warn( usage: jina [-h] [-v] [-vf] {hello-world, pod, flow, gateway ... 7 more choices} ... jina: error: unrecognized arguments: --timeout-ready 60000