cog
49442909 - fix(sdk): restore emit_metric as deprecated compat shim (#2850)

Commit
21 days ago
fix(sdk): restore emit_metric as deprecated compat shim (#2850) emit_metric was dropped without a backwards-compat shim when the Python HTTP server was replaced by coglet. It's widely used across replicate/* models (cog-whisper, cog-triton, cog-vllm, cog-arctic, cog-real-esrgan, cog-proxy, etc.) and its absence causes a hard ImportError on startup. Restore it as a shim that delegates to current_scope().record_metric(), following the same print-to-stderr-once pattern established for ExperimentalFeatureWarning. The deprecation message fires on first import and is then cached in globals, so there's no overhead on subsequent calls.
Author
Parents
Loading