GlideKV with TensorFlow Custom Operations
A high-performance GlideKV library featuring custom TensorFlow operations, written in C++ and Python, and seamlessly integrated with Bazel for reproducible builds.
Features
- 🚀 Custom TensorFlow Ops: High-performance C++ ops for advanced GlideKV tasks
- 🛠️ Bazel Build: Reproducible, robust, and scalable build system
- 🔄 Automatic Environment Detection: Automatically finds and links your TensorFlow installation
- 📦 Wheel Packaging: Easily build and distribute as a Python wheel
- 🔧 TensorFlow Serving: Production-ready model serving capabilities
TensorFlow Serving Deployment
Docker Deployment
GlideKV supports deployment via TensorFlow Serving with Docker. The following command starts a TensorFlow Serving container with GlideKV custom operations:
docker run -itd \
-p 8080:8080 \ # Prometheus metrics port
-p 8500:8500 \ # gRPC API port
-p 8501:8501 \ # REST API port
-e GLIDEKV_METRICS_ENABLED=1 \
-v /data:/data \
--privileged=true \
--network=host \
registry.cn-beijing.aliyuncs.com/bidops/bidops:GlideKV-v1 \
--file_system_poll_wait_seconds=10 \
--model_base_path=/data/model/dnn_winr_v1/export_dir/dense_model/
Configuration Parameters
| Parameter | Description | Default |
|---|---|---|
-p 8080:8080 |
Prometheus metrics port | 8080 |
-p 8500:8500 |
gRPC API port | 8500 |
-p 8501:8501 |
REST API port | 8501 |
-e GLIDEKV_METRICS_ENABLED=1 |
Enable GlideKV metrics collection | 0 |
-v /data:/data |
Mount local data directory | - |
--privileged=true |
Enable privileged mode | false |
--network=host |
Use host network mode | bridge |
--file_system_poll_wait_seconds=10 |
Model polling interval | 10 |
--model_base_path |
Path to the TensorFlow model | - |
Environment Variables
GLIDEKV_METRICS_ENABLED=1: Enables Prometheus metrics collection for monitoring
Model Requirements
The TensorFlow model must include GlideKV custom operations:
HashTableOfTensors: For vector lookup operationsLookupFind: For key-value retrieval
Health Check
After deployment, you can check the service status:
# Check HTTP REST API
curl http://localhost:8501/v1/models
# Check gRPC API (requires grpcurl installation)
grpcurl -plaintext localhost:8500 list
# Check Prometheus metrics
curl http://localhost:8080/metrics
Install grpcurl (Optional)
If you need to test gRPC API, install grpcurl:
# Ubuntu/Debian
sudo apt-get update && sudo apt-get install -y grpcurl
# CentOS/RHEL
sudo yum install -y grpcurl
# Or download from GitHub releases
wget https://github.com/fullstorydev/grpcurl/releases/download/v1.8.7/grpcurl_1.8.7_linux_x86_64.tar.gz
tar -xzf grpcurl_1.8.7_linux_x86_64.tar.gz
sudo mv grpcurl /usr/local/bin/
rm grpcurl_1.8.7_linux_x86_64.tar.gz
开发与构建说明
- Bazel 构建:所有 C++/TF 自定义算子通过 Bazel 构建,确保与 Python 环境 TensorFlow 版本一致。
- 环境变量:需设置
TF_SO_PATH指向当前 Python 环境下的 TensorFlow 路径(python configure.py可自动完成)。 - .gitignore 已优化,避免无关文件入库。
贡献指南
欢迎提交 Issue 和 PR!请确保:
- 遵循 PEP8 代码风格
- 新增功能需附带测试
- 详细描述你的更改
License
Metadata
Release files for GlideKV 4.6.9.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| glidekv-4.6.9.3-py3-none-any.whl | Python 3 | none | any | Details for glidekv-4.6.9.3-py3-none-any.whl |
Release files / glidekv-4.6.9.3-py3-none-any.whl
| Download URL | glidekv-4.6.9.3-py3-none-any.whl |
|---|---|
| Size | 453.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
802fbbef51cd562826f936249e02234671356f28aa046b0944c313b5da3b2151
|
|
BLAKE2b-256 checksum How to use checksums |
4c6f12f48c9d206e7b9dfeadd604fc040f9b9545b7cc5390ac2376ce9adcbcf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Security for GlideKV 4.6.9.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.