This module provides the Python API for FGDS and adds an external storage backend for lmcache.
- Use
ctypesto wrap the FGDS API from the shared library (libfgds.so) - Provide a class for FGDS file operations
cd python
python -m pip install .- Build
libfgds.so(see the repo top-levelREADME.mdfor build steps). - Make sure
libfgds.sois discoverable by the dynamic linker (for example, install it into/usr/lib64/, or setLD_LIBRARY_PATHto the directory containing it). - Verify the Python package is importable
python -c "import fgds; print(fgds.__file__)"- Run simple test for FGDS Python API
python test/test.py -f /data/a.safetensors-
Test the lmcache with FGDS backend:See fgds-lmcache.md for more details.
-
Test the fastsafetensors with FGDS copier:See fgds-fastsafetensor.md for more details.