SeldonIO / MLServer

An inference server for your machine learning models, including support for multiple frameworks, multi-model serving and more
https://mlserver.readthedocs.io/en/latest/
Apache License 2.0
685 stars 178 forks source link

Migrate to Pydantic v2 #1748

Closed jesse-c closed 3 months ago

jesse-c commented 3 months ago

We're going for a wholesale update to Pydantic v2. Whilst I've tried to be as minimal as possible [1], I've fixed some things that were exposed during the migration [2]. Since we plan on this being a minor release, I've avoided any breaking changes in MLServer's interfaces.

It's a hefty PR. Each commit is an attempt at a self-contained part of the migration, and thus is best reviewed commit-by-commit. In saying that, it is of course a holistic change and a long line of dominoes.

For many of the commits, I've linked to the relevant part of the Pydantic v2 (migration) docs.

There will be manual integration testing as well.

[1] There's some deprecation warnings for v3 that I've looked past [2] Example: Some incorrect tests

FIXES https://github.com/SeldonIO/MLServer/issues/1419

jesse-c commented 3 months ago

Ran some manual smoke tests with no issues.