cog icon indicating copy to clipboard operation
cog copied to clipboard

Deprecate python 3.7

Open technillogue opened this issue 2 years ago • 6 comments

Python 3.7 stopped receiving security support in June. We should release a version of cog that deprecates 3.7 (and supports 3.12), then stop letting people push new 3.7 models. Ideally we should push people to use 3.11 and not just 3.8 so that things get faster.

technillogue avatar Dec 13 '23 18:12 technillogue

https://github.com/replicate/cog/issues/1481

technillogue avatar Feb 21 '24 19:02 technillogue

Python 3.7 support was previous dropped in https://github.com/replicate/cog/pull/1020, but that was reverted in #1201 after it caused problems for existing models built with 3.7.

@nickstenning Are we in a place now where we could plausibly target newer Python releases?

mattt avatar Feb 22 '24 12:02 mattt

We can't drop support for Python 3.7 in one go, as we have models running in production that have Python 3.7.

As @technillogue alludes to above, we first need to cut a cog point release that spits out deprecation warnings (likely to the prediction logs to maximise the chance that people see them!), then we need to prevent new models with 3.7 from being pushed.

Depending on the scale of the problem, we may also need to put some banners in people's accounts on the website.

nickstenning avatar Feb 22 '24 12:02 nickstenning

Is the problem that models running Python 3.7 will fail when we try to install the latest version of Cog at startup? If so, could we skip that step? Or else change the logic to install the latest 3.7 compatible version?

mattt avatar Feb 22 '24 12:02 mattt

The entire cluster runs the same version of Cog. I don't think we want to change that right now.

nickstenning avatar Feb 22 '24 12:02 nickstenning

the shortest-term change is to just stop letting people push new models with 3.7. adding deprecation warnings in prediction logs sounds great. after a few months it's entirely possible we will no longer be breaking anything important that's still being used

technillogue avatar Feb 24 '24 21:02 technillogue