NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3375 most downloaded on PyPI
Containers for machine learning
Last release 9 days ago
22 Sep 2026
Release timing varies
gaps range from 8 days to 2 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
184 releases · first in 2021
One column per quarter.
9a05507f89d40e069ca71b63e3b08e918a6696f0 Make progress bar more pretty
This is now unsupported and will receive no further updates. There are some breaking changes in the API that will be introduced with the release of th…
This release introduces support for concurrent processing of predictions through the use of an async predict function.
To enable the feature add the new concurrency.max entry to your cog.yaml file:
concurrency:
max: 32
And update your predictor to use the async def predict syntax:
class Predictor(BasePredictor):
async def setup(self) -> None:
print("async setup is also supported...")
async def predict(self) -> str:
print("async predict");
return "hello world";
Cog will now process up to 32 predictions simultaneously, once at capacity subsequent predictions will return a 409 HTTP response.
If your model is currently using Iterator or ConcatenateIterator it will need to be updated to use AsyncIterator or AsyncConcatenateIterator respectively.
from cog import AsyncConcatenateIterator, BasePredictor
class Predict(BasePredictor):
async def predict(self) -> AsyncConcatenateIterator[str]:
for fruit in ["apple", "banana", "orange"]:
yield fruit
An earlier fork of cog with concurrency support was published under the 0.10.0a release channel. This is now unsupported and will receive no further updates. There are some breaking changes in the API that will be introduced with the release of the 0.14.0 beta. This alpha release is backwards compatible and you will see deprecation warnings when calling the deprecated functions.
emit_metric(name, value) - this has been replaced by current_scope().record_metric(name, value)[!NOTE] Note that the use of
current_scopeis still experimental and will output warnings to the console. To suppress these you can ignore theExperimentalFeatureWarning:import warnings from cog import ExperimentalFeatureWarning warnings.filterwarnings("ignore", category=ExperimentalFeatureWarning)
File or Path types these will currently block the event loop. This may be an issue for large file outputs and will be fixed in a future release.Path in cog predictsha256: prefix in generated runtime config files (#2153)Path in cog predict"cog init actions workflow template (#2192)This is now unsupported and will receive no further updates. There are some breaking changes in the API that will be introduced with the release of th…
This release introduces support for concurrent processing of predictions through the use of an async predict function.
To enable the feature add the new concurrency.max entry to your cog.yaml file:
concurrency:
max: 32
And update your predictor to use the async def predict syntax:
class Predictor(BasePredictor):
async def setup(self) -> None:
print("async setup is also supported...")
async def predict(self) -> str:
print("async predict");
return "hello world";
Cog will now process up to 32 predictions simultaneously, once at capacity subsequent predictions will return a 409 HTTP response.
If your model is currently using Iterator or ConcatenateIterator it will need to be updated to use AsyncIterator or AsyncConcatenateIterator respectively.
from cog import AsyncConcatenateIterator, BasePredictor
class Predict(BasePredictor):
async def predict(self) -> AsyncConcatenateIterator[str]:
for fruit in ["apple", "banana", "orange"]:
yield fruit
An earlier fork of cog with concurrency support was published under the 0.10.0a release channel. This is now unsupported and will receive no further updates. There are some breaking changes in the API that will be introduced with the release of the 0.14.0 beta. This alpha release is backwards compatible and you will see deprecation warnings when calling the deprecated functions.
emit_metric(name, value) - this has been replaced by current_scope().record_metric(name, value)[!NOTE] Note that the use of
current_scopeis still experimental and will output warnings to the console. To suppress these you can ignore theExperimentalFeatureWarning:import warnings from cog import ExperimentalFeatureWarning warnings.filterwarnings("ignore", category=ExperimentalFeatureWarning)
File or Path types these will currently block the event loop. This may be an issue for large file outputs and will be fixed in a future release.Full Changelog: https://github.com/replicate/cog/compare/v0.13.6...v0.14.0-alpha1
6eb2d2ea1a9ba3d96ba1dbe12ff9c3b2b08b388e Add a cog integration test for apt-packages
nofile limit for tests8e9e53e54af491d28510960a70e64070669d4a31 Remove duplicate 3.10 python version
This release includes an important bug fix around usage of requests to include explicit connection timeouts. Other changes include tidying related to
This release includes an important bug fix around usage of requests to include explicit connection timeouts. Other changes include tidying related to the removal of python 3.7 support, adding the output of pip freeze as a docker image label, and some groundwork towards supporting concurrent predictions.
d714a7011724acb16ec71ce5c134b634b1a51ce3 Add ability to wait for an environment
4de7f61b2051dbf84132dc123bb83131705d4b99 Add Config class
3e0dc7900c9f1db4f8e4fa16cd2e9493ce61f1e8 Add version and more URLs to index document
5e2218fe708a5f22bae63cf9e074225d03db23cd Add Setup Logging
typing-extensions to fix conflict with spacy and pydantic (#2033)8333a832a62902294aa92ae3b9cc9ca9c64e9278 Revert "Support async predictors (#2010)"
This reverts a change introduced in v0.11.4 to begin supporting async predict functions. The changes to how output redirection is handled broke a subset of models that started subprocesses during setup which then used stdout and/or stderr at predict time.
a8e138f585bf2e47f55b700af81d764afa9a25ee Bump version constraint for typing-constraints
typing-constraints (#2019)b62fd84cb71918dc401868b44a5608d7ee29c8e6 Bump goreleaser now we're on 1.23
Explain NAME_UNKNOWN error on failed cog push by @mattt in https://github.com/replicate/cog/pull/1844
NAME_UNKNOWN error on failed cog push by @mattt in https://github.com/replicate/cog/pull/1844This release fixes a bug in the last few releases of cog (that we mistakenly thought we'd fixed in 0.9.25) which resulted in a broken version of cog built into the images output by cog build.
Full Changelog: https://github.com/replicate/cog/compare/v0.11.1...v0.11.3
Nothing published for this version
269244795e85d2ac18b7c5f3c2eed48d05eec945 Choices for Str not just list
Nothing published for this version
Nothing published for this version
a6219fab5e5f480b5aa5b59a189c2e3c03c2199d Add support for Pydantic 2
32c7408b22592fbb80e0320b3b922498672b0994 fix GHA
426b112452b8000f5732c84b5e7b15f14f4ed4d5 Provide User-Agent and Accept headers in URLFile requests
a60d1516bddc96c266edf20d7e2fa908518c36b6 Add .envrc for asdf
name attribute of URLFile across serializers (#2000)layout python to automatically use venv (#1970)3805e2e5578ca84e1a5cfd459e6dc0be8558e7ed Support custom filename to be provided to URLFile
3edefe40c2b5e6a1329fb8e9199f1e7156b3bf76 Fix type annotations in Input
move runner terminate into runner shutdown after waiting for predictions to ocmplete @technillogue in https://github.com/replicate/cog/pull/1843
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha20...v0.10.0-alpha21
This release fixes an error which happens when setup fails that was introduced in alpha18
This release fixes an error which happens when setup fails that was introduced in alpha18
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha18...v0.10.0-alpha20
This release mistakenly included a more significant change in addition to fixing an error which happens when setup fails that was introduced in alpha1
This release mistakenly included a more significant change in addition to fixing an error which happens when setup fails that was introduced in alpha18
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha18...v0.10.0-alpha19
This release attempts to fix cog never exiting if a shutdown is requested during setup. This may not work, but this also adds a lot of logging that sh
This release attempts to fix cog never exiting if a shutdown is requested during setup. This may not work, but this also adds a lot of logging that should allow us to actually resolve the issue.
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha17...v0.10.0-alpha18
This release includes a temporary fix for a bug around cancellation.
This release includes a temporary fix for a bug around cancellation.
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha16...v0.10.0-alpha17
a4b86cd Poison model healthcheck on shutdown
> This release is identical to v0.10.0-alpha14, except for a change made to fix a test that prevented our CD workflow from completing.
[!IMPORTANT]
This release is identical to v0.10.0-alpha14, except for a change made to fix a test that prevented our CD workflow from completing.
Shutting down the server is supposed to call should_exit for uvicorn to do application shutdown. Fixing this seems to make exiting work more cleanly.
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha13...v0.10.0-alpha15
Shutting down the server is supposed to call should_exit for uvicorn to do application shutdown. Fixing this seems to make exiting work more cleanly.
Shutting down the server is supposed to call should_exit for uvicorn to do application shutdown. Fixing this seems to make exiting work more cleanly.
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha13...v0.10.0-alpha14
add batch_size metric by @technillogue in https://github.com/replicate/cog/pull/1750
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha12...v0.10.0-alpha13
log traceback and set error properly by @technillogue in https://github.com/replicate/cog/pull/1734
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha11...v0.10.0-alpha12
Fix upload logging by @mattt in https://github.com/replicate/cog/pull/1707
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha10...v0.10.0-alpha11
Backport Secret type to async branch by @mattt in https://github.com/replicate/cog/pull/1706
Secret type to async branch by @mattt in https://github.com/replicate/cog/pull/1706Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha9...v0.10.0-alpha10
This release fixes being able to push concurrent models with cog.
This release fixes being able to push concurrent models with cog.
predict_time_share needs to be set before sending the completed webhook by @technillogue in https://github.com/replicate/cog/pull/1683
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha7...v0.10.0-alpha8
This release adds cog.emit_metric, a predict_time_share metric, and provisional support for setting target concurrency. It also properly records the c
This release adds cog.emit_metric, a predict_time_share metric, and provisional support for setting target concurrency. It also properly records the changes that were already in prod.
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha6...v0.10.0-alpha7
Scary temporary commit for a hemorrhaging-edge release. This adds concurrency to the config and significantly changes the behavior of cog.Path, does s
Full Changelog: https://github.com/replicate/cog/compare/v0.10.0-alpha3...v0.10.0-alpha4
Scary temporary commit for a hemorrhaging-edge release. This adds concurrency to the config and significantly changes the behavior of cog.Path, does something unsavory to upload very large files, and actually enables concurrency.
513e837 Revert "Revert PR "async runner" (#1352)"
Full Changelog: https://github.com/replicate/cog/compare/v0.9.0+async.1...v0.10.0-alpha1
Full Changelog: https://github.com/replicate/cog/compare/v0.9.0+async.1...v0.10.0-alpha1
20c13d70edeb4137e88df3c8c9bcb404dc9b61b8 Fix deprecated snapshot.name_template
Cog: (#1980)This release includes fixes for running cog build on GitHub Actions, and improvements to the experience if you accidentally paste a Replicate API toke
This release includes fixes for running cog build on GitHub Actions, and improvements to the experience if you accidentally paste a Replicate API token (rather than a CLI auth token) into cog login.
~This release also ensures that the correct version of cog is installed into the built image when using Cog base images (the default).~ (This bug wasn't actually fixed in this release, and is finally fixed in v0.11.2.)
layout python to automatically use venv (#1970)This release includes a fix for a bug present in v0.9.21 and v0.9.23.
This release includes a fix for a bug present in v0.9.21 and v0.9.23.
The bug affected models that ran subprocesses, and could cause those subprocesses to fail with a broken pipe. The fix is in #1969.
> This release includes changes from the previous tag, v0.9.22, which doesn't have a corresponding release.
[!IMPORTANT]
This release includes changes from the previous tag, v0.9.22, which doesn't have a corresponding release.
Full Changelog: https://github.com/replicate/cog/compare/v0.9.21...v0.9.23
Nothing published for this version
b1a616a0ebec30e02ec18123a4cf5d7ae869a692 Add Cython CFLAGS for package optimizations
TestWorkerState deterministic62f6d413a22d6c1b91dfef9179a585715730c906 Add Python 3.7 back to supported versions
b6c852a4a78ee74502b7cf64c79b08bcb934c35a Allow manual trigger for PyPI release
create_predict_task into PredictTask.__init__cf547dd112b21dfe54f90b8033b548552653e27c Bump github.com/getkin/kin-openapi from 0.126.0 to 0.127.0
src config optionPredictionRunnerEnable --use-cog-base-image by default by @mattt in https://github.com/replicate/cog/pull/1778
--use-cog-base-image by default by @mattt in https://github.com/replicate/cog/pull/1778github.com/google/go-containerregistry to get latest layer SHA instead of pulling by @mattt in https://github.com/replicate/cog/pull/1779cog predict when predictor with string output type returns None by @mattt in https://github.com/replicate/cog/pull/1809Dockerfile generation regression when --separate-weights is enabled by @mattt in https://github.com/replicate/cog/pull/1811Full Changelog: https://github.com/replicate/cog/compare/v0.9.12...v0.9.13
> This release is identical to v0.9.11, except for a change made to fix a flakey test that prevented our CI/CD workflow from completing.
[!IMPORTANT]
This release is identical to v0.9.11, except for a change made to fix a flakey test that prevented our CI/CD workflow from completing.
URLPath files to be missing when cleaning up inputs by @mattt in https://github.com/replicate/cog/pull/1763cog.yaml or predictor are missing by @asingh9530 in https://github.com/replicate/cog/pull/1470cog build --use-cog-base-image with minor and patch versions of Python and Torch by @mattt in https://github.com/replicate/cog/pull/1774Full Changelog: https://github.com/replicate/cog/compare/v0.9.10...v0.9.12
Include prediction id upload request by @aron in https://github.com/replicate/cog/pull/1667
cog init to include a GitHub Actions workflow file by @zeke in https://github.com/replicate/cog/pull/1671image works with cog push by @zeke in https://github.com/replicate/cog/pull/1679run by @timfallmk in https://github.com/replicate/cog/pull/1704Env argument in call to NewPredictor on retry by @mattt in https://github.com/replicate/cog/pull/1709cog.yaml schema by @mattt in https://github.com/replicate/cog/pull/1703--env/-e flags to cog train subcommand by @mattt in https://github.com/replicate/cog/pull/1710Full Changelog: https://github.com/replicate/cog/compare/v0.9.8...v0.9.9
update cog init to include a GitHub Actions workflow file by @zeke in https://github.com/replicate/cog/pull/1671
cog init to include a GitHub Actions workflow file by @zeke in https://github.com/replicate/cog/pull/1671image works with cog push by @zeke in https://github.com/replicate/cog/pull/1679Full Changelog: https://github.com/replicate/cog/compare/v0.9.9-alpha...v0.9.9-alpha2
36c7ece Include prediction id upload request
This release fixes an issue No output specified with docker-container driver for users of Docker buildx.
This release fixes an issue No output specified with docker-container driver for users of Docker buildx.
Thanks to @mattt and @EduarteXD for the fixes.
Bump github.com/docker/docker from 26.0.2+incompatible to 26.1.1+incompatible by @dependabot in https://github.com/replicate/cog/pull/1646
Full Changelog: https://github.com/replicate/cog/compare/v0.9.7...v0.9.8-alpha
deprecate cog.File in docs by @zeke in https://github.com/replicate/cog/pull/1613
The main changes in this release is the Secret type and always passing the --load flag to docker buildx build. Enjoy!
Secret type by @mattt in https://github.com/replicate/cog/pull/1546--load flag to docker buildx build command by @mattt in https://github.com/replicate/cog/pull/1621cog.File in docs by @zeke in https://github.com/replicate/cog/pull/1613Full Changelog: https://github.com/replicate/cog/compare/v0.9.6...v0.9.7
feat: deprecate python 3.7 #2 by @dkhokhlov in https://github.com/replicate/cog/pull/1582
The main highlight in this release is revised schema validation that should improve boot times. We also add support for torch 2.2, drop support for 3.7, add support for list in inputs, and fix some other bugs.
Your coding agent can read these notes before it upgrades. Set up the MCP server →