Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1012 Bytes

File metadata and controls

30 lines (23 loc) · 1012 Bytes

Python API for FGDS

This module provides the Python API for FGDS and adds an external storage backend for lmcache.

Features

  • Use ctypes to wrap the FGDS API from the shared library (libfgds.so)
  • Provide a class for FGDS file operations

Installation

cd python
python -m pip install .

Usage

  • Build libfgds.so (see the repo top-level README.md for build steps).
  • Make sure libfgds.so is discoverable by the dynamic linker (for example, install it into /usr/lib64/, or set LD_LIBRARY_PATH to 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