lm-sys / lm-sys/FastChat

THIS SESSION HAS BEEN INACTIVE FOR TOO LONG. PLEASE REFRESH THIS PAGE.

Open
#2,062 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

The timeout is too fast, it will prompt “THIS SESSION HAS BEEN INACTIVE FOR TOO LONG. PLEASE REFRESH THIS PAGE.” soon

The request web server log
```
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | gradio_web_server | add_text. ip: XXXXXX . len: 2
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | gradio_web_server | inactive. ip: XXXXXX . text: hi
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/api/predict "HTTP/1.1 200 OK"
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/reset "HTTP/1.1 200 OK"
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | gradio_web_server | bot_response. ip: XXXXX
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/api/predict "HTTP/1.1 200 OK"
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/api/predict "HTTP/1.1 200 OK"
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/reset "HTTP/1.1 200 OK"

```

The front show:

![image](https://github.com/lm-sys/FastChat/assets/11453650/201f775b-bb13-471f-9d10-38a1385c3039)

start:
```

su - admin
source /home/admin/.bashrc
conda activate llama27bchathf

python3 -m fastchat.serve.controller --host localhost --port 21018
python3 -m fastchat.serve.model_worker --model-path /var/www/data/fastchat/Llama-2-7b-chat-hf --host localhost --port 31018 --controller http://localhost:21018 --worker http://localhost:31018
python3 -m fastchat.serve.gradio_web_server --port 7868 --host 0.0.0.0 --controller http://localhost:21018
python3 -m fastchat.serve.openai_api_server --port 8008 --host 0.0.0.0 --controller http://localhost:21018

```

I don't know if modify config file: fastchat/constants.py can solve this problem?
```
# Session expiration time
SESSION_EXPIRATION_TIME = 3600
```

# 临时解决办法
我现在进行了临时解决办法,就是将web的老版本,比如运行老版本的 v0.2.7 这个版本,Web就比较正常。
pip3 install fschat==v0.2.7
所以Web段我用老版本的跑是比较正常的。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with fastchat/constants.py and the gradio_web_server entry point, then compare the current behavior with the reported v0.2.7 behavior. Reproduce the session-expiration prompt using the supplied launch commands and logs; done means the web session no longer expires prematurely while the intended expiration behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.