petals
petals copied to clipboard
Add flag to only use already cached blocks
Allow users to specify the caching dir for the model's blocks
BONUS: add flag to only use already cached blocks, excluding those which are not already on the server
Hi @scuty2000!
The server already has a flag for the cache dir, its name is --cache_dir.
Regarding the flag to only use already cached blocks, could you please clarify why it would be useful to you? Please note that:
-
If your concern is the free disk space, the server is already able to recycle the disk space it uses for cache (= remove older blocks to free space for new ones). It may uses all free space minus 1 GiB by default, but you can set a stricter limit for the cache using the
--max_disk_spaceargument. -
If you'd like a server to only a certain fixed range of blocks, you can define it with
--block_indices. -
If your concern is the amount of network traffic or the speed of loading blocks, please let me know, I agree that such a flag would be useful in these cases.
Hi, I didn't see the --cache-dir arg, sorry for that.
For the second part, I meant exacly what you said in the third point, regarding network traffic and the speed of block loading.
Apologies: I won't work on this now, as --block_indices and/or --max_disk_space are a viable workaround, and I feel there's more impactful work (in this and other projects) to focus on right now.
@tijszwinkels No worries, thanks for taking the time to help anyway!
I second this, I need to occasionally restart the server and it is a bit frustrating that the algorithm picked just random other, not yet cached range. I don't want to limit to specific range.
Limiting of the block space could work though. I understand there're another important tasks to work on.