refactor : merge max_prompt_len into max_seq_len, replace assert with raise

- Engine/Scheduler/TaskManager: merge max_prompt_len into max_seq_len
- train.py: replace bare assert with ValueError/FileNotFoundError
- server.py: add --max_seq_len CLI option
- engine.py: remove dead page_size param
This commit is contained in:
2026-07-27 08:05:11 +08:00
parent 05c7432964
commit 53c804e233
12 changed files with 27 additions and 21 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ def test_task_manager_add_task_too_long_immediate_stop():
tm = TaskManager(tokenizer=t, max_seq_len=16)
tm.add_task("long", stream_callback=lambda tok: cb_calls.append(tok))
assert cb_calls[0] is STOP
assert len(tm.waiting_queue) == 0
assert len(cb_calls) == 0
assert len(tm.waiting_queue) == 1
def test_task_manager_remove_task():