pysiglib.set_cache_dir

pysiglib.set_cache_dir#

Added in version v1.0.0.

set_cache_dir(dir)[source]#

Sets the cache directory to use in pysiglib.prepare_log_sig when use_disk=True. If the cache directory is not explicitly set by a call to this function, a default directory will be used:

  • Windows: %LOCALAPPDATA%

  • Linux: ~/.cache

  • Mac: ~/Library/Caches

This function is not thread safe.

Parameters:

dir (str) – Path to cache directory

Example usage:#

import pysiglib

# Set cache dir to a folder "my_cache_dir" in the current working directory
pysiglib.set_cache_dir("./my_cache_dir")

pysiglib.prepare_log_sig(5, 3, lead_lag=True, method=2, use_disk=True)

X = torch.rand((32,100,5))
X_log_sig = pysiglib.log_sig(X, 3, lead_lag=True, method=2)

Citation#

If you found this library useful in your research, please consider citing the paper:

@article{shmelev2025pysiglib,
  title={pySigLib-Fast Signature-Based Computations on CPU and GPU},
  author={Shmelev, Daniil and Salvi, Cristopher},
  journal={arXiv preprint arXiv:2509.10613},
  year={2025}
}