dspy-production-deployment
Installation
SKILL.md
DSPy Production Deployment
Goal
Prepare a DSPy program for repeatable, observable, scalable, and safer production execution.
Cache Hardening
DSPy enables memory and disk caches by default. Disk cache deserialization uses pickle unless restricted. Enable the allowlist mode in production:
import dspy
dspy.configure_cache(restrict_pickle=True)
Register trusted custom cache types only when needed: