Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running multiple processes on a shared outlines cache database #2306

Open
e-tornike opened this issue Sep 16, 2024 · 2 comments
Open

Running multiple processes on a shared outlines cache database #2306

e-tornike opened this issue Sep 16, 2024 · 2 comments

Comments

@e-tornike
Copy link

When using the caching feature of outlines with multiple running processes, the cache database may get accessed simultaneously, resulting in disk I/O or database disk image errors:

sqlite3.OperationalError: disk I/O error
sqlite3.DatabaseError: database disk image is malformed

This is further described in vllm-project/vllm#4193 and dottxt-ai/outlines#827.

A workaround for users, who don't use guided decoding, is described in vllm-project/vllm#7831.

Another possible workaround is to set a unique cache directory for each process using the environment variable OUTLINES_CACHE_DIR.

An implementation in this framework (here) creates a separate cache database for each model "rank". Does the use_cache argument here aim to solve this issue, or does it have a different use?

@baberabb
Copy link
Contributor

Hi! The use_cache currently implemented here is for caching evaluation results, so that you can continue where you left off in case of an error.

@e-tornike
Copy link
Author

Okay, thank you.

Would there be interest in integrating a workaround (e.g., dynamically setting the OUTLINES_CACHE_DIR) into the framework?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants