cvpaperchallenge / Crux

Crux is a suite of LLM-empowered summarization and retrieval services for academic activity. Crux is developed by XCCV group of cvpaper.challenge.
MIT License
14 stars 2 forks source link

Port the content implemented in the `CVPR_2023_Survey` repository #24

Closed YoshikiKubotani closed 1 year ago

YoshikiKubotani commented 1 year ago

Issue URL

NA

Change overview

How to test

  1. Boot up docker containers
# Run under Crux/environments/cpu on your host PC
$ docker compose up -d

# If you have the old containers
$ docker compose build --no-cache
$ docker compose up -d --force-recreate
  1. Run the backend service
# Run in the cpu-crux-backwend container
# Install python packages using poetry
~$ poetry install
...

# Run the server
~$ make run-backend
poetry run gunicorn 'src.app:main' -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 -t 6000 --log-level info 
[2023-07-12 15:20:01 +0000] [10714] [INFO] Starting gunicorn 20.1.0
[2023-07-12 15:20:01 +0000] [10714] [INFO] Listening at: http://0.0.0.0:8000 (10714)
[2023-07-12 15:20:01 +0000] [10714] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2023-07-12 15:20:01 +0000] [10717] [INFO] Booting worker with pid: 10717
[2023-07-12 15:20:02 +0000] [10717] [WARNING] ASGI app factory detected. Using it, but please consider setting the --factory flag explicitly.
[2023-07-12 15:20:02 +0000] [10717] [INFO] Started server process [10717]
[2023-07-12 15:20:02 +0000] [10717] [INFO] Waiting for application startup.
[2023-07-12 15:20:02 +0000] [10717] [INFO] Application startup complete.
  1. Check the logic works properly from http://localhost:8000/docs

    • Specify at least one PDF file and fill in the other form parts as follows スクリーンショット 2023-07-16 231432
    • Push the "Excute" button
    • The logic works without problems if the response from the endpoint is as follows スクリーンショット 2023-07-16 231455

Note for reviewers

Since langchain does not yet support pydantic version 2.0, I reverted to the code using pydantic=1.10.10 in the last commit as a temporary measure; as soon as langchain supports pydantic=2.0, we can switch back again.

gatheluck commented 1 year ago

@YoshikiKubotani make test in CI job looks raises some error. Could you take a look it?

YoshikiKubotani commented 1 year ago

@gatheluck

I removed the old test code for a temporary workaround.