# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ....core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .alternative import Alternative
from .custom_model_request import CustomModelRequest
from .dataset import Dataset
from .evaluation_args import EvaluationArgs
from .task import Task


class TrainingBaseRequest(UniversalBaseModel):
    custom_model: CustomModelRequest
    dataset: Dataset
    target_feature: typing.Optional[str] = None
    task: typing.Optional[Task] = None
    evaluation: typing.Optional[EvaluationArgs] = None
    alternatives: typing.Optional[typing.List[Alternative]] = None
    callback_url: typing.Optional[str] = None
    notify: typing.Optional[bool] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
