feat: add model test harness for validating cog SDK releases#2851
Merged
markphelps merged 5 commits intomainfrom Mar 20, 2026
Merged
feat: add model test harness for validating cog SDK releases#2851markphelps merged 5 commits intomainfrom
markphelps merged 5 commits intomainfrom
Conversation
Add a declarative test harness (tools/test-harness/) that automates building and running cog models against new SDK versions. Designed for testing cog-examples against RC releases but extensible to any model in any repo. Models and their expected inputs/outputs are defined in manifest.yaml. The harness clones repos, patches cog.yaml with the target sdk_version, runs cog build + cog predict, and validates outputs using pluggable validators (exact match, contains, file_exists, json_match, etc.). Includes all 10 cog-examples models in the manifest and fixture images for blur/resnet tests.
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
markphelps
commented
Mar 20, 2026
…ness Default to downloading the latest stable cog CLI from GitHub releases and resolving the latest stable SDK version from PyPI, skipping any alpha/beta/rc tags. Both can be overridden via --cog-version and --sdk-version CLI flags, or pinned in manifest.yaml defaults.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/test-harness/) that automates building and running cog models against new SDK versionsreplicate/cog-examplesand is designed to be extensible to any model from any repomanifest.yaml— adding a new model requires zero code changesHow it works
cog.yamlto injectsdk_version(e.g.0.17.0rc2)cog buildand captures build logscog predict/cog trainwith the specified inputsUsage
Initial test results (0.17.0-rc2 SDK, non-GPU)
Two real compatibility issues found:
emit_metricis not importable fromcogin the RC SDK (breakshello-concurrency) fix(sdk): restore emit_metric as deprecated compat shim #2850Scope.contextattribute doesn't exist on coglet's_sdk.Scope(breakshello-context) feat(coglet): restore Scope.context for per-prediction context #2853Files
manifest.yamlharness/cli.pyrun,build,listcommands)harness/runner.pyharness/patcher.pysdk_versionand overrides into cog.yamlharness/validators.pyharness/report.pyfixtures/