jina-ai/examples

add QPS timing scripts to each example

cristianmtr opened this issue · 2 comments

Follow steps defined in #449

  • add TimeContext to index and query ops:
            with TimeContext(f'QPS: indexing {len(list(data_func_list))}', logger=flow.logger):

and

            with TimeContext(f'QPS: query with {len(query_input)}', logger=flow.logger):
  • add setup_run.sh script to example directory that prepares and runs the example, while piping the output into a metrics.txt file

ex.:

#!/bin/bash
# these scripts will contain everything that needs to be run before the example
# downloading data, model, preprocessing etc.
bash ./get_data.sh siftsmall && \
rm -rf workspace && \
bash ./generate_training_data.sh && \
python app.py -t index | tee metrics.txt && \
python app.py -t query | tee >> metrics.txt

Create a PR and edit this comment to add next to the example

  • advanced-vector-search #449
  • audio-search #449
  • chinese-text-search #459
  • cross-modal-search #459
  • fashion-example-query #459
  • multimodal-search-pdf
  • multimodal-search-tirg #459
  • multires-lyrics-search #459
  • object-search #477
  • pokedex-with-bit #460
  • tumblr-gif-search #460
  • wikipedia-sentences #460
  • wikipedia-sentences-incremental #460

@cristianmtr The ner-search and southpark-search examples are not present anymore, correct?
If yes, I think this issue is done.

@cristianmtr The ner-search and southpark-search examples are not present anymore, correct?
If yes, I think this issue is done.

Yes, those were remnants of previous branches in my local repo. This is done! Good job, everyone 💯