alibi-detect icon indicating copy to clipboard operation
alibi-detect copied to clipboard

Update pydantic requirement from <2.0.0,>=1.8.0 to >=1.8.0,<3.0.0

Open dependabot[bot] opened this issue 1 year ago • 10 comments

Updates the requirements on pydantic to permit the latest version.

Release notes

Sourced from pydantic's releases.

v2.0 2023-06-30

What's Changed

... (truncated)

Changelog

Sourced from pydantic's changelog.

v2.0 (2023-06-30)

Pydantic V2 is here! :tada:

See this post for more details.

See the full changelog here

v2.0b3 (2023-06-16)

Third beta pre-release of Pydantic V2

See the full changelog here

v2.0b2 (2023-06-03)

Add from_attributes runtime flag to TypeAdapter.validate_python and BaseModel.model_validate.

See the full changelog here

v2.0b1 (2023-06-01)

First beta pre-release of Pydantic V2

See the full changelog here

v2.0a4 (2023-05-05)

Fourth pre-release of Pydantic V2

See the full changelog here

v2.0a3 (2023-04-20)

Third pre-release of Pydantic V2

See the full changelog here

v2.0a2 (2023-04-12)

Second pre-release of Pydantic V2

See the full changelog here

v2.0a1 (2023-04-03)

First pre-release of Pydantic V2!

See this post for more details.

... (truncated)

Commits

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

dependabot[bot] avatar Jul 03 '23 07:07 dependabot[bot]

Assigning to self, as I'll need to update how pydantic is used in the saving tests for this PR.

ascillitoe avatar Jul 03 '23 15:07 ascillitoe

@ascillitoe sounds like this is a major (breaking) version (although I haven't found a good place describing all the new stuff). I suppose for us we would want to upgrade to >=2.0 instead of also allowing an older version (unless we can make the required changes in a way that works with both 1.x and 2.x?). However, if we do that, then need to check how this might interact on e.g. mlserver runtimes with a different pydantic version.

jklaise avatar Jul 10 '23 16:07 jklaise

Yeh it involves some moderate changes, I actually tried to do this today and stopped since realised it was a bigger job than first expected.

Their is a migration tool bump-pydantic, but it didn't work properly when I tried it. To support v2 I'd need to rewrite the validators in saving/validators.py, and a few bits in saving/schemas.py. I'm not 100% sure but don't think we'll be able to rewrite the pydantic stuff to work in v1 and v2, I think we'd have to have separate v1 and v2 pydantic models.

According to this, we have a year to make the jump, so it might be worth leaving this for a while? Some of our deps such as thinc are also still on v1.x so we can't make the move just yet anyway.

ascillitoe avatar Jul 10 '23 16:07 ascillitoe

p.s. good point about mlserver...

ascillitoe avatar Jul 10 '23 16:07 ascillitoe

Superseded by https://github.com/SeldonIO/alibi-detect/pull/882. Everything else about needing to do an actual migration still stands, of course!

jesse-c avatar Mar 07 '24 10:03 jesse-c

Hello, thinc now supports pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0. What is your roadmap regarding the pydantic version bump? I'm using pydantic~=2.0 and I cannot use your library because of that :( .

MarcBresson avatar Mar 18 '24 10:03 MarcBresson

Hi @MarcBresson, with https://github.com/SeldonIO/alibi-detect/pull/882, you should be able to use Alibi Detect with Pydantic v1 or v2! We haven't done a release yet though. Are you able to use a commit hash or branch to specify the version of Alibi Detect that you use?

jesse-c avatar Mar 18 '24 10:03 jesse-c

Thank you for your quick answer! It worked like a charm with https://github.com/SeldonIO/alibi-detect/archive/master.zip in my requirements file.

Will change it back later when the new version has been released.

MarcBresson avatar Mar 18 '24 10:03 MarcBresson

@MarcBresson: No worries mate! Thank you too for confirming that that worked.

jesse-c avatar Mar 18 '24 10:03 jesse-c

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 07 '24 14:05 CLAassistant