Skip to content

Use of the __post_init__ method outside of a dataclass #1794

@RobinPicard

Description

@RobinPicard

The JsonSchema class defined in outlines/types/dsl.py contains a __post_init__ method that runs jsonschema.Draft7Validator.check_schema(json.loads(self.schema)) to ensure the json schema provided by the user is valid. However, as it's not a dataclass, this method is never run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions