Move examples from cog-examples to cog#3055
Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR moves example models from the external cog-examples repo into the main cog repo and updates the test harness to support base_dir for local models. Good cleanup overall.
I found two actionable issues:
- HIGH: The
managed-weightsweights.lockwas regenerated from incomplete/stub weights. The parakeetmodel.safetensorsis listed as 135 bytes instead of ~2.5GB. - MEDIUM: The
hello-trainmodel lost itstrain_testsentry in the manifest, removing training test coverage even though the example still supports training.
|
I'm Bonk, and I've done a quick review of your PR. Summary: Moves example models from Issues found:
|
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
Summary: Moves example models from cog-examples into the main repo and updates the test harness to support base_dir for local models.
Issues found:
-
HIGH —
examples/managed-weights/weights.lockwas regenerated from incomplete/stub weights. The parakeetmodel.safetensorsis listed as 135 bytes instead of ~2.5GB, and the total size dropped from ~2.5GB to ~1.1MB. Please regenerate from the actual weights or revert this file. -
MEDIUM —
hello-trainlost itstrain_testsentry intools/test-harness/manifest.yamleven though the example still containstrain.pyand atrain:field incog.yaml. This removes training test coverage. I've posted a suggestion to restore it. -
MEDIUM —
examples/z-image-turbo/run.pyusestempfile.mktemp()which creates a predictable temporary file path (flagged by CodeQL). Replace withtempfile.NamedTemporaryFile(delete=False)for safety. -
MEDIUM —
examples/hello-concurrency/run.pyhas an emptyexcept FileNotFoundError: passblock. Add a logging statement to document the intent.
|
I'm Bonk, and I've done a quick review of your PR. Summary: Moves example models from Issues found:
|
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
Summary: Moves example models from cog-examples into the main repo and updates the test harness to support base_dir for local models.
Issues found:
- MEDIUM —
examples/blur/run.pyreturns the built-ininputfunction instead of theimageparameter whenblur == 0. This is a logic bug. - MEDIUM —
hello-trainis still missing itstrain_testsentry intools/test-harness/manifest.yamleven though the example containstrain.pyand atrain:field incog.yaml. This removes training test coverage.
|
I'm Bonk, and I've done a quick review of your PR. Summary: Moves example models from Issues found:
Both issues have suggestions posted as review comments. |
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
Summary: Moves example models from cog-examples into the main repo and updates the test harness to support base_dir for local models.
Issues found:
- MEDIUM —
hello-trainis still missing itstrain_testsentry intools/test-harness/manifest.yamleven though the example containstrain.pyand atrain:field incog.yaml. The test harness still fully supportstrain_tests(seemanifest.goandrunner.go), and there is no visible replacement mechanism or deprecation marker in the codebase. Removing the only training test without a documented alternative creates a coverage gap.
| repo: local | ||
| base_dir: ../../examples | ||
| path: hello-train | ||
| gpu: false |
There was a problem hiding this comment.
hello-train still supports training (train.py + train: in cog.yaml) but the train_tests coverage was removed. The test harness still processes train_tests, and there is no deprecation comment or replacement mechanism visible in the code. Please either restore the test or, if train_tests is truly deprecated, add a deprecation marker to the manifest schema and runner.
| gpu: false | |
| gpu: false | |
| train_tests: | |
| - description: "train produces weights file" | |
| inputs: | |
| prefix: "custom" | |
| expect: | |
| type: not_empty | |
| tests: |
|
I'm Bonk, and I've done a quick review of your PR. Summary: Moves example models from Issues found:
Posted as review comment on PR #3055. |
No description provided.