
    niD                     F    d dl Z d dlZd dlZd dlmZ  G d de          ZdS )    N)
UploadFilec                      e Zd ZdZddddddddddddZdd	d
dddddddddZ	 	 	 	 	 	 	 	 	 	 	 d2dZed             Zej	        d             Zed             Z
e
j	        d             Z
ed             Zej	        d             Zed             Zej	        d             Zed             Zej	        d              Zed!             Zej	        d"             Zed#             Zej	        d$             Zed%             Zej	        d&             Zed'             Zej	        d(             Zed)             Zej	        d*             Zed+             Zej	        d,             Zd- Zd. Zd/ Zd0 Zd1 ZdS )3ModelNewInstanceRequesta  
    Attributes:
      project_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    strboolz	list[str]intzlist[UploadFile])instance_slug	frameworkoverviewusagelicense_namefine_tunabletraining_datamodel_instance_typebase_model_instanceexternal_base_model_urlfilesinstanceSlugr
   r   r   licenseNamefineTunabletrainingDatamodelInstanceTypebaseModelInstanceexternalBaseModelUrlr   N
Apache 2.0Tc                 l   d | _         d | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _	        d | _
        d | _        || _        || _        ||| _        ||| _        || _        ||| _        ||| _        ||| _        |	|	| _        |
|
| _        |	|| _        d S d S )N)_instance_slug
_framework	_overview_usage_license_name_fine_tunable_training_data_model_instance_type_base_model_instance_external_base_model_url_filesdiscriminatorr	   r
   r   r   r   r   r   r   r   r   r   )selfr	   r
   r   r   r   r   r   r   r   r   r   s               e/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/kaggle/models/model_new_instance_request.py__init__z ModelNewInstanceRequest.__init__@   s     #!!"$(!$(!(,%!*"$DMDJ(# ,D$!.D*':D$*':D$".+BD(DJJJ     c                     | j         S )a   Gets the instance_slug of this ModelNewInstanceRequest.  # noqa:
        E501.

        The slug that the model instance should be created with  # noqa:
        E501

        :return: The instance_slug of this ModelNewInstanceRequest. #
            noqa: E501
        :rtype: str
        )r   r)   s    r*   r	   z%ModelNewInstanceRequest.instance_slugp   s     ""r,   c                 6    |t          d          || _        dS )a  Sets the instance_slug of this ModelNewInstanceRequest.

        The slug that the model instance should be created with  # noqa:
        E501

        :param instance_slug: The instance_slug of this
            ModelNewInstanceRequest. # noqa: E501
        :type: str
        Nz5Invalid value for `instance_slug`, must not be `None`)
ValueErrorr   )r)   r	   s     r*   r	   z%ModelNewInstanceRequest.instance_slug~   s'      TUUU+r,   c                     | j         S )zGets the framework of this ModelNewInstanceRequest.  # noqa: E501.

        The framework of the model instance  # noqa: E501

        :return: The framework of this ModelNewInstanceRequest. # noqa:
            E501
        :rtype: str
        )r   r.   s    r*   r
   z!ModelNewInstanceRequest.framework   s     r,   c                     |t          d          g d}||vr#t          d                    ||                    || _        dS )zSets the framework of this ModelNewInstanceRequest.

        The framework of the model instance  # noqa: E501

        :param framework: The framework of this ModelNewInstanceRequest.
            # noqa: E501
        :type: str
        Nz1Invalid value for `framework`, must not be `None`)tensorFlow1tensorFlow2tfLitetfJspyTorchjaxflaxpaxmaxTextgemmaCpptensorRtLlmggmlggufcoralscikitLearnmxnetonnxkerastransformerstritonapirF   r=   otherz7Invalid value for `framework` ({0}), must be one of {1})r0   formatr   )r)   r
   allowed_valuess      r*   r
   z!ModelNewInstanceRequest.framework   sn     PQQQ
 
 
4 N**IPP~    $r,   c                     | j         S )zGets the overview of this ModelNewInstanceRequest.  # noqa: E501.

        The overview of the model instance (markdown)  # noqa: E501

        :return: The overview of this ModelNewInstanceRequest. # noqa:
            E501
        :rtype: str
        r   r.   s    r*   r   z ModelNewInstanceRequest.overview   s     ~r,   c                     || _         dS )zSets the overview of this ModelNewInstanceRequest.

        The overview of the model instance (markdown)  # noqa: E501

        :param overview: The overview of this ModelNewInstanceRequest. #
            noqa: E501
        :type: str
        NrL   )r)   r   s     r*   r   z ModelNewInstanceRequest.overview   s     "r,   c                     | j         S )a  Gets the usage of this ModelNewInstanceRequest.  # noqa: E501.

        The description of how to use the model instance (markdown)  #
        noqa: E501

        :return: The usage of this ModelNewInstanceRequest. # noqa:
            E501
        :rtype: str
        r    r.   s    r*   r   zModelNewInstanceRequest.usage   s     {r,   c                     || _         dS )a  Sets the usage of this ModelNewInstanceRequest.

        The description of how to use the model instance (markdown)  #
        noqa: E501

        :param usage: The usage of this ModelNewInstanceRequest. #
            noqa: E501
        :type: str
        NrO   )r)   r   s     r*   r   zModelNewInstanceRequest.usage        r,   c                     | j         S )a$  Gets the license_name of this ModelNewInstanceRequest.  # noqa:
        E501.

        The license that should be associated with the model instance  #
        noqa: E501

        :return: The license_name of this ModelNewInstanceRequest. #
            noqa: E501
        :rtype: str
        )r!   r.   s    r*   r   z$ModelNewInstanceRequest.license_name   s     !!r,   c                     |t          d          g d}||vr#t          d                    ||                    || _        dS )a  Sets the license_name of this ModelNewInstanceRequest.

        The license that should be associated with the model instance  #
        noqa: E501

        :param license_name: The license_name of this
            ModelNewInstanceRequest. # noqa: E501
        :type: str
        Nz4Invalid value for `license_name`, must not be `None`)9zCC0 1.0zCC BY-NC-SA 4.0UnknownzCC BY-SA 4.0zGPL 2zCC BY-SA 3.0Otherz Other (specified in description)z	CC BY 4.0z)Attribution 4.0 International (CC BY 4.0)zCC BY-NC 4.0z:Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)PDDLz/ODC Public Domain Dedication and Licence (PDDL)z	CC BY 3.0z$Attribution 3.0 Unported (CC BY 3.0)zCC BY 3.0 IGOz#Attribution 3.0 IGO (CC BY 3.0 IGO)zCC BY-NC-SA 3.0 IGOzBAttribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)zCDLA Permissive 1.0z;Community Data License Agreement - Permissive - Version 1.0zCDLA Sharing 1.0z8Community Data License Agreement - Sharing - Version 1.0zCC BY-ND 4.0z:Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)zCC BY-NC-ND 4.0zKAttribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)z
ODC-BY 1.0z ODC Attribution License (ODC-By)zLGPL 3.0z%GNU Lesser General Public License 3.0zAGPL 3.0z%GNU Affero General Public License 3.0zFDL 1.3z"GNU Free Documentation License 1.3z
apache-2.0r   mitMITzbsd-3-clausezBSD-3-ClausezLlama 2zLlama 2 Community LicenseGemmazgpl-3zGPL 3zRAIL-MzAI Pubs Open RAIL-M LicensezAIPubs Research-Use RAIL-Mz#AI Pubs Research-Use RAIL-M LicensezBigScience OpenRAIL-MzBigScience Open RAIL-M LicenseRAILzRAIL (specified in description)zLlama 3zLlama 3 Community Licensez:Invalid value for `license_name` ({0}), must be one of {1})r0   rI   r!   )r)   r   rJ   s      r*   r   z$ModelNewInstanceRequest.license_name  sr     STTT:
 :
 :
v ~--LSS .    *r,   c                     | j         S )a
  Gets the fine_tunable of this ModelNewInstanceRequest.  # noqa:
        E501.

        Whether the model instance is fine tunable  # noqa: E501

        :return: The fine_tunable of this ModelNewInstanceRequest. #
            noqa: E501
        :rtype: bool
        r"   r.   s    r*   r   z$ModelNewInstanceRequest.fine_tunable\  s     !!r,   c                     || _         dS )zSets the fine_tunable of this ModelNewInstanceRequest.

        Whether the model instance is fine tunable  # noqa: E501

        :param fine_tunable: The fine_tunable of this
            ModelNewInstanceRequest. # noqa: E501
        :type: bool
        Nr\   )r)   r   s     r*   r   z$ModelNewInstanceRequest.fine_tunablei  s     *r,   c                     | j         S )a  Gets the training_data of this ModelNewInstanceRequest.  # noqa:
        E501.

        A list of training data (urls or names)  # noqa: E501

        :return: The training_data of this ModelNewInstanceRequest. #
            noqa: E501
        :rtype: list[str]
        r#   r.   s    r*   r   z%ModelNewInstanceRequest.training_datav  s     ""r,   c                     || _         dS )a  Sets the training_data of this ModelNewInstanceRequest.

        A list of training data (urls or names)  # noqa: E501

        :param training_data: The training_data of this
            ModelNewInstanceRequest. # noqa: E501
        :type: list[str]
        Nr_   )r)   r   s     r*   r   z%ModelNewInstanceRequest.training_data  s     ,r,   c                     | j         S )aS  Gets the model_instance_type of this ModelNewInstanceRequest.  #
        noqa: E501.

        Whether the model instance is a base model, external variant,
        internal variant, or unspecified  # noqa: E501

        :return: The model_instance_type of this
            ModelNewInstanceRequest. # noqa: E501
        :rtype: str
        )r$   r.   s    r*   r   z+ModelNewInstanceRequest.model_instance_type  s     ((r,   c                 j    g d}||vr#t          d                    ||                    || _        dS )aN  Sets the model_instance_type of this ModelNewInstanceRequest.

        Whether the model instance is a base model, external variant,
        internal variant, or unspecified  # noqa: E501

        :param model_instance_type: The model_instance_type of this
            ModelNewInstanceRequest. # noqa: E501
        :type: str
        )Unspecified	BaseModelKaggleVariantExternalVariantzAInvalid value for `model_instance_type` ({0}), must be one of {1}N)r0   rI   r$   )r)   r   rJ   s      r*   r   z+ModelNewInstanceRequest.model_instance_type  sU     ZYYn44SZZ'    %8!!!r,   c                     | j         S )aX  Gets the base_model_instance of this ModelNewInstanceRequest.  #
        noqa: E501.

        If this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance  # noqa: E501

        :return: The base_model_instance of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: str
        r%   r.   s    r*   r   z+ModelNewInstanceRequest.base_model_instance  s     ((r,   c                     || _         dS )aS  Sets the base_model_instance of this ModelNewInstanceRequest.

        If this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance  # noqa: E501

        :param base_model_instance: The base_model_instance of this ModelNewInstanceRequest.  # noqa: E501
        :type: str
        Nrh   )r)   r   s     r*   r   z+ModelNewInstanceRequest.base_model_instance  s     %8!!!r,   c                     | j         S )a4  Gets the external_base_model_url of this ModelNewInstanceRequest.  #
        noqa: E501.

        If this is an external variant, a URL to the base model  # noqa:
        E501

        :return: The external_base_model_url of this
            ModelNewInstanceRequest. # noqa: E501
        :rtype: int
        r&   r.   s    r*   r   z/ModelNewInstanceRequest.external_base_model_url  s     ,,r,   c                     || _         dS )a3  Sets the external_base_model_url of this ModelNewInstanceRequest.

        If this is an external variant, a URL to the base model  # noqa:
        E501

        :param external_base_model_url: The external_base_model_url of
            this ModelNewInstanceRequest. # noqa: E501
        :type: int
        Nrk   )r)   r   s     r*   r   z/ModelNewInstanceRequest.external_base_model_url  s     )@%%%r,   c                     | j         S )a  Gets the files of this ModelNewInstanceRequest.  # noqa: E501.

        A list of files that should be associated with the model
        instance version  # noqa: E501

        :return: The files of this ModelNewInstanceRequest. # noqa: E501
        :rtype: list[UploadFile]
        r'   r.   s    r*   r   zModelNewInstanceRequest.files  s     {r,   c                     || _         dS )a  Sets the files of this ModelNewInstanceRequest.

        A list of files that should be associated with the model
        instance version  # noqa: E501

        :param files: The files of this ModelNewInstanceRequest. #
            noqa: E501
        :type: list[UploadFile]
        Nrn   )r)   r   s     r*   r   zModelNewInstanceRequest.files  rQ   r,   c                    i }t          j        | j                  D ]\  }}t          | |          }t	          |t
                    r"t          t          d |                    ||<   Lt          |d          r|                                ||<   tt	          |t                    r4t          t          d |
                                                    ||<   |||<   |S )z'Returns the model properties as a dict.c                 N    t          | d          r|                                 n| S )Nto_dicthasattrrr   )xs    r*   <lambda>z1ModelNewInstanceRequest.to_dict.<locals>.<lambda>  s"    IAVAV2]!))+++\] r,   rr   c                 v    t          | d         d          r"| d         | d                                         fn| S )N   rr   r   rs   )items    r*   rv   z1ModelNewInstanceRequest.to_dict.<locals>.<lambda>  s8    WTRSWV_E`E`%jd1gtAw/@/@%A%Afj r,   )six	iteritemsproject_typesgetattr
isinstancelistmaprt   rr   dictitems)r)   resultattr_values        r*   rr   zModelNewInstanceRequest.to_dict  s    }T%788 	% 	%GD!D$''E%&& %#C(](]_d$e$efft	** 
%$}}tE4(( %#jj    t  %tr,   c                 N    t          j        |                                           S )z/Returns the string representation of the model.)pprintpformatrr   r.   s    r*   to_strzModelNewInstanceRequest.to_str  s    ~dllnn---r,   c                 *    |                                  S )zFor `print` and `pprint`)r   r.   s    r*   __repr__z ModelNewInstanceRequest.__repr__  s    {{}}r,   c                 P    t          |t                    sdS | j        |j        k    S )z'Returns true if both objects are equal.F)r~   r   __dict__r)   rH   s     r*   __eq__zModelNewInstanceRequest.__eq__  s)    %!899 	5}..r,   c                     | |k     S )z+Returns true if both objects are not equal. r   s     r*   __ne__zModelNewInstanceRequest.__ne__&  s    5=  r,   )NNNNr   TNNNNN)__name__
__module____qualname____doc__r|   attribute_mapr+   propertyr	   setterr
   r   r   r   r   r   r   r   r   r   rr   r   r   r   r   r   r,   r*   r   r      s         $$$#(# M ( %%'22#9 M  !   $. . . .` # # X# , , , 	 	 X	 ,$ ,$ ,$\ 	 	 X	 _
" 
" _
" 
 
 X
 \  \ " " X" N* N* N*` 
" 
" X
" 
* 
* 
* 
# 
# X
# 
, 
, 
, ) ) X) 8 8  8( 	) 	) X	) 	8 	8  	8 - - X- #@ @ $#@ 	 	 X	 \  \  ,. . .  / / /! ! ! ! !r,   r   )r   rerz   kaggle.models.upload_filer   objectr   r   r,   r*   <module>r      sr   &  				 



 0 0 0 0 0 0M! M! M! M! M!f M! M! M! M! M!r,   