NeMo-Guardrails icon indicating copy to clipboard operation
NeMo-Guardrails copied to clipboard

feat: refactor validators and fields to support pydantic v2

Open xiaobo8204 opened this issue 10 months ago • 2 comments

Description

This PR aims to update Pydantic to the latest v2.10.6, and switch to use the new model_validator/Field/field_validator in the new Pydantic version.

Related Issue(s)

  • Fixes #929

Checklist

  • [Y] I've read the CONTRIBUTING guidelines.
  • [Y] I've updated the documentation if applicable.
  • [Y] I've added tests if applicable.
  • [Y] @mentions of the person or team responsible for reviewing proposed changes.

xiaobo8204 avatar Feb 03 '25 08:02 xiaobo8204

@xiaobo8204 thanks for your contribution to NeMo Guardrails 👍🏻 would you please sign all your commits following the contributing guidelines. You should see a Verified tag for all your commits.

Pouyanpi avatar Feb 03 '25 10:02 Pouyanpi

@xiaobo8204 Apologies for the delay in reviewing your PR.

The issue is that we currently don’t have proper tests for the code your PR affects. I’ll open a separate PR to add the necessary tests. Once that’s in place, we can rebase your branch and move forward from there. Thanks for your patience!

Pouyanpi avatar Apr 11 '25 12:04 Pouyanpi