add --disable-disk-cache (#160)

Co-authored-by: Ja1Zhou <50169346+Ja1Zhou@users.noreply.github.com>
This commit is contained in:
Liangsheng Yin
2024-02-08 00:50:12 +08:00
committed by GitHub
parent 79e6b84bec
commit b1a3a454ee
3 changed files with 17 additions and 5 deletions

View File

@@ -25,7 +25,8 @@ class ServerArgs:
disable_log_stats: bool = False
log_stats_interval: int = 10
log_level: str = "info"
no_regex_jump_forward: bool = False
disable_regex_jump_forward: bool = False
disable_disk_cache: bool = False
def __post_init__(self):
if self.tokenizer_path is None:
@@ -172,10 +173,15 @@ class ServerArgs:
help="Log stats interval in second.",
)
parser.add_argument(
"--no-regex-jump-forward",
"--disable-regex-jump-forward",
action="store_true",
help="Disable regex jump-forward",
)
parser.add_argument(
"--disable-disk-cache",
action="store_true",
help="Disable disk cache to avoid possible crashes related to file system or high concurrency.",
)
@classmethod
def from_cli_args(cls, args: argparse.Namespace):