jina-ai / cookiecutter-jina

Cookiecutter template for a Jina project
Apache License 2.0
10 stars 2 forks source link

-n argument does nothing #7

Closed alexcg1 closed 3 years ago

alexcg1 commented 4 years ago

Describe Problem

Running python app.py index -n 100 should index 100 documents. It doesn't. Instead it indexes whatever the num_docs variable is in app.py

I even ran:

python app.py index -n foo

To confirm it's -n isn't connected to anything. No errors thrown, just indexes as normal

Why happening?

I'm guessing app.py isn't specifying the -n flag to do anything. It should (I guess) be tied to num_docs?

Environment

jina 0.3.6 jina-proto 0.0.45 jina-vcs-tag (unset) libzmq 4.3.2 pyzmq 1.19.0 protobuf 3.12.2 proto-backend cpp grpcio 1.30.0 ruamel.yaml 0.16.10 python 3.8.3 platform Linux platform-release 5.6.16-1-MANJARO platform-version #1 SMP PREEMPT Wed Jun 3 14:26:28 UTC 2020 architecture x86_64 processor
jina-resources /home/alexcg/.local/share/virtualenvs/test_my_first-1HJJ4O2U/lib/python3.8/site-packages/jina/resources JINA_ARRAY_QUANT (unset) JINA_CONTRIB_MODULE (unset) JINA_CONTRIB_MODULE_IS_LOADING(unset) JINA_CONTROL_PORT (unset) JINA_DEFAULT_HOST (unset) JINA_EXECUTOR_WORKDIR (unset) JINA_FULL_CLI (unset) JINA_IPC_SOCK_TMP (unset) JINA_LOG_FILE (unset) JINA_LOG_LONG (unset) JINA_LOG_NO_COLOR (unset) JINA_LOG_PROFILING (unset) JINA_LOG_SSE (unset) JINA_LOG_VERBOSITY (unset) JINA_POD_NAME (unset) JINA_PROFILING (unset) JINA_SOCKET_HWM (unset) JINA_STACK_CONFIG (unset) JINA_TEST_CONTAINER (unset) JINA_TEST_GPU (unset) JINA_TEST_PRETRAINED (unset) JINA_VCS_VERSION (unset) JINA_VERSION (unset) JINA_WARN_UNNAMED (unset) JINA_BINARY_DELIMITER (unset) JINA_DISABLE_UVLOOP (unset)

alexcg1 commented 3 years ago

This seems to only work on examples that use click library. Cookiecutter'ed code doesn't use it