Ë
    $Æ%hØ‰  ã                  ó¨  — U d dl mZ d dlZd dlZd dlmZmZmZmZm	Z	 d dl
mZ ddlmZ  G d„ de	«      Z ed	d
¬«      Zd*d„Zd+d„Zddgfd,d„Zd-d.d„Zddgfd,d„Zd*d„Zd*d„Zd*d„Zd*d„Zd*d„Zd*d„Zd/d„Zddgf	 	 	 	 	 d0d„Zd*d„Zd1d„Zd2d„Z 	 	 	 	 	 	 	 	 d3d„Z!d4d„Z"d5d „Z#d6d!„Z$d7d"„Z%d8d#„Z&d9d:d$„Z'd%Z(d&e)d'<   d;d(„Z*	 	 	 	 	 	 	 	 	 	 	 	 	 	 d<d)„Z+y)=é    )ÚannotationsN)ÚAnyÚTypeVarÚCallableÚOptionalÚ
NamedTuple)Ú	TypeAliasé   )Úpandasc                  ól   — e Zd ZU ded<   dZded<   dZded<   dZded<   dZded	<   dZded
<   dZ	ded<   y)ÚRemediationÚstrÚnameNzOptional[str]Úimmediate_msgÚnecessary_msgzOptional[Callable[[Any], Any]]Únecessary_fnÚoptional_msgÚoptional_fnÚ	error_msg)
Ú__name__Ú
__module__Ú__qualname__Ú__annotations__r   r   r   r   r   r   © ó    úT/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/openai/lib/_validators.pyr   r      sE   … Ø
ƒIØ#'€M�=Ó'Ø#'€M�=Ó'Ø37€LÐ0Ó7Ø"&€L�-Ó&Ø26€KÐ/Ó6Ø#€Iˆ}Ô#r   r   ÚOptionalDataFrameTzOptional[pd.DataFrame])Úboundc                óf   — d}t        | «      |k\  rdnd}dt        | «      › d|› �}t        d|¬«      S )z’
    This validator will only print out the number of examples and recommend to the user to increase the number of examples if less than 100.
    éd   Ú z§. In general, we recommend having at least a few hundred examples. We've found that performance tends to linearly increase for every doubling of the number of examplesz
- Your file contains z prompt-completion pairsÚnum_examples©r   r   )Úlenr   )ÚdfÚMIN_EXAMPLESÚoptional_suggestionr   s       r   Únum_examples_validatorr(      sO   € ð €Lô ˆr‹7�lÒ"ñ 	ð wð ð
 .¬c°"«g¨YÐ6NÐObÐNcÐd€MÜ˜N¸-ÔHÐHr   c                ó  ‡‡— dd„Šd}d}d}d}‰| j                   vrO‰| j                   D �cg c]  }t        |«      j                  «       ‘Œ c}v rdˆˆfd„}|}d‰› d�}d‰› d�}nd‰› d�}t        d	||||¬
«      S c c}w )z[
    This validator will ensure that the necessary column is present in the dataframe.
    c                óÈ   — | j                   D �cg c]!  }t        |«      j                  «       |k(  sŒ |‘Œ# }}| j                  |d   |j                  «       id¬«       | S c c}w )Nr   T)ÚcolumnsÚinplace)r+   r   ÚlowerÚrename)r%   ÚcolumnÚcÚcolss       r   Úlower_case_columnz5necessary_column_validator.<locals>.lower_case_column,   sT   € ØŸ:™:ÖB�a¬¨Q«¯©«¸6Ó)A’ÐBˆÐBØ
�	‰	˜4 ™7 F§L¡L£NÐ3¸Tˆ	ÔBØˆ	ùò Cs
   �!A±ANc                ó   •—  ‰| ‰«      S ©Nr   )r%   r2   Únecessary_columns    €€r   Úlower_case_column_creatorz=necessary_column_validator.<locals>.lower_case_column_creator9   s   ø€ Ù(¨Ð-=Ó>Ð>r   z
- The `z ` column/key should be lowercasezLower case column name to `ú`z^` column/key is missing. Please make sure you name your columns/keys appropriately, then retryr5   )r   r   r   r   r   )r%   úpd.DataFramer/   r   Úreturnr8   )r%   r8   r9   r8   )r+   r   r-   r   )	r%   r5   r   r   r   r   r0   r6   r2   s	    `      @r   Únecessary_column_validatorr:   '   s±   ù€ ó
ð
 €MØ€LØ€MØ€Ià˜rŸz™zÑ)Ø¸¿
¹
ÖC°1¤ A£§¡¥ÒCÑCö?ð 5ˆLØ'Ð(8Ð'9Ð9YÐZˆMØ9Ð:JÐ9KÈ1ÐM‰MàÐ,Ð-ð  .Lð  MˆIäØØ#Ø#Ø!Øôð ùò  Ds   ¬ A<ÚpromptÚ
completionc                óF  ‡— g }d}d}d}t        | j                  «      dkD  rh| j                  D �cg c]	  }|‰vsŒ|‘Œ }}d}|D ]1  }|D �cg c]	  }||v sŒ|‘Œ }	}t        |	«      dkD  sŒ&|d|› d|› d�z  }Œ3 d|› |› �}d	|› �}dˆfd
„}t        d|||¬«      S c c}w c c}w )zK
    This validator will remove additional columns from the dataframe.
    Nr
   r!   r   z9
  WARNING: Some of the additional columns/keys contain `z<` in their name. These will be ignored, and the column/key `z`` will be used instead. This could also result from a duplicate column/key in the provided file.zh
- The input file should contain exactly two columns/keys per row. Additional columns/keys present are: z Remove additional columns/keys: c                ó   •— | ‰   S r4   r   ©ÚxÚfieldss    €r   r   z1additional_column_validator.<locals>.necessary_fn^   s   ø€ Ø�V‘9Ðr   Úadditional_column©r   r   r   r   ©r@   r   r9   r   )r$   r+   r   )
r%   rA   Úadditional_columnsr   r   r   r0   Úwarn_messageÚacÚdupss
    `        r   Úadditional_column_validatorrI   K   s  ø€ ð ÐØ€MØ€MØ€Lä
ˆ2�:‰:ƒ˜ÒØ)+¯©ÖG A°qÀ²šaÐGÐÐGØˆØ$ò 	BˆBØ1Ö=˜!°R¸1²W’AÐ=ˆDÐ=Ü�4‹y˜1‹}ØÐ"\Ð]_Ð\`ð  a]ð  ^`ð  ]að  aAð  !Bñ  B‘ð	Bð Dð  EWð  DXð  Yeð  Xfð  gˆØ:Ð;MÐ:NÐOˆõ	ô Ø Ø#Ø#Ø!ô	ð ùò Hùò >s   °	BºBÁ	BÁBc                óŠ  ‡— d}d}d}| ‰   j                  d„ «      j                  «       s!| ‰   j                  «       j                  «       rg| ‰   dk(  | ‰   j                  «       z  }| j                  «       j                  |   j                  «       }d‰› d|› �}dˆfd„}dt        |«      › d‰› d	�}t        d
‰› �|||¬«      S )zA
    This validator will ensure that no completion is empty.
    Nc                ó   — | dk(  S )Nr!   r   ©r@   s    r   ú<lambda>z+non_empty_field_validator.<locals>.<lambda>q   s
   €   b¡€ r   r!   z
- `z?` column/key should not contain empty strings. These are rows: c                ó<   •— | | ‰   dk7     j                  ‰g¬«      S )Nr!   ©Úsubset)Údropna)r@   Úfields    €r   r   z/non_empty_field_validator.<locals>.necessary_fnv   s&   ø€ Ø�Q�u‘X ‘^Ñ$×+Ñ+°E°7Ð+Ó;Ð;r   úRemove z rows with empty ÚsÚempty_rC   rD   )ÚapplyÚanyÚisnullÚreset_indexÚindexÚtolistr$   r   )r%   rR   r   r   r   Ú
empty_rowsÚempty_indexess    `     r   Únon_empty_field_validatorr^   i   sÜ   ø€ ð €MØ€LØ€Mà	ˆ%�y‡�Ñ(Ó)×-Ñ-Ô/°2°e±9×3CÑ3CÓ3E×3IÑ3IÔ3KØ˜‘i 2‘o¨"¨U©)×*:Ñ*:Ó*<Ñ=ˆ
ØŸ™Ó(×.Ñ.¨zÑ:×AÑAÓCˆØ ˜wÐ&eÐfsÐetÐuˆõ	<ð "¤# mÓ"4Ð!5Ð5FÀuÀgÈQÐOˆäØ�e�WÐØ#Ø#Ø!ô	ð r   c                ó4  ‡— | j                  ‰¬«      }| j                  «       j                  |   j                  «       }d}d}d}t	        |«      dkD  r8dt	        |«      › ddj                  ‰«      › d|› �}dt	        |«      › d	�}dˆfd
„}t        d|||¬«      S )zY
    This validator will suggest to the user to remove duplicate rows if they exist.
    rO   Nr   ú
- There are z duplicated ú-z sets. These are rows: rS   z duplicate rowsc                ó(   •— | j                  ‰¬«      S )NrO   )Údrop_duplicatesr?   s    €r   r   z.duplicated_rows_validator.<locals>.optional_fn‘   s   ø€ Ø×$Ñ$¨FÐ$Ó3Ð3r   Úduplicated_rows©r   r   r   r   rD   )Ú
duplicatedrY   rZ   r[   r$   Újoinr   )r%   rA   rd   Úduplicated_indexesr   r   r   s    `     r   Úduplicated_rows_validatorri   ƒ   sÀ   ø€ ð —m‘m¨6�mÓ2€OØŸ™Ó)×/Ñ/°Ñ@×GÑGÓIÐØ€MØ€LØ€Kä
ÐÓ Ò"Ø(¬Ð-?Ó)@Ð(AÀÈcÏhÉhÐW]ÓN^ÐM_Ð_vð  xJð  wKð  LˆØ ¤Ð%7Ó!8Ð 9¸ÐIˆõ	4ô ØØ#Ø!Øô	ð r   c                óÔ   ‡‡— d}d}d}t        | «      }|dk7  rBdd„Š ‰| «      Št        ‰«      dkD  r(dt        ‰«      › d‰› d�}dt        ‰«      › d	�}dˆˆfd
„}t        d|||¬«      S )zW
    This validator will suggest to the user to remove examples that are too long.
    Núopen-ended generationc                ó€   — | j                  d„ d¬«      }| j                  «       j                  |   j                  «       S )Nc                ó^   — t        | j                  «      t        | j                  «      z   dkD  S )Ni'  )r$   r;   r<   rL   s    r   rM   zClong_examples_validator.<locals>.get_long_indexes.<locals>.<lambda>¨   s"   € ¬c°!·(±(«m¼cÀ!Ç,Á,Ó>OÑ.OÐRWÑ.W€ r   é   )Úaxis)rV   rY   rZ   r[   )ÚdÚlong_exampless     r   Úget_long_indexesz1long_examples_validator.<locals>.get_long_indexes§   s6   € ØŸG™GÑ$WÐ^_˜GÓ`ˆMØ—=‘=“?×(Ñ(¨Ñ7×>Ñ>Ó@Ð@r   r   r`   z. examples that are very long. These are rows: zf
For conditional generation, and for classification the examples shouldn't be longer than 2048 tokens.rS   z long examplesc                óž   •—  ‰| «      }‰|k7  r/t         j                  j                  dt        |«      › d|› d�«       | j	                  |«      S )NzeThe indices of the long examples has changed as a result of a previously applied recommendation.
The z? long examples to be dropped are now at the following indices: ú
)ÚsysÚstdoutÚwriter$   Údrop)r@   Úlong_indexes_to_droprr   Úlong_indexess     €€r   r   z,long_examples_validator.<locals>.optional_fn±   s   ø€ Ù'7¸Ó':Ð$ØÐ#7Ò7Ü—J‘J×$Ñ$ð Aô  BEð  FZó  B[ð  A\ð  \[ð  \pð  [qð  qsð  tôð —v‘vÐ2Ó3Ð3r   rq   re   )rp   r8   r9   r   rD   )Úinfer_task_typer$   r   )r%   r   r   r   Úft_typerr   rz   s        @@r   Úlong_examples_validatorr}   œ   sŸ   ù€ ð €MØ€LØ€Kä˜bÓ!€GØÐ)Ò)ó	Añ (¨Ó+ˆäˆ|Ó˜qÒ Ø,¬S°Ó->Ð,?Ð?mÐnzÐm{ð  |cð  dˆMØ$¤S¨Ó%6Ð$7°~ÐFˆLö4ô ØØ#Ø!Øô	ð r   c                ób  ‡‡— d}d}d}d}dŠg d¢}|D ]t  }|dk(  r4| j                   j                  j                  d«      j                  «       rŒ<| j                   j                  j                  |d¬«      j                  «       rŒr|Š n ‰j	                  dd«      }t        | «      }|d	k(  rt        d
¬«      S dd„Št        | j                   d¬«      }	| j                   |	k(  j                  «       rd|	› d�}t        d
|¬«      S |	dk7  r…|	j	                  dd«      }
d|
› d�}t        |	«      dkD  r	|d|› d�z  }| j                   j                  dt        |	«        j                  j                  |	d¬«      j                  «       r|d|	› d�z  }nd}|	dk(  rd|› d�}d ˆˆfd„}t        d||||¬«      S )!zœ
    This validator will suggest to add a common suffix to the prompt if one doesn't already exist in case of classification or conditional generation.
    Nz


### =>

)ú ->z

###

z

===

z

---

z

===>

z

--->

r   rt   F©Úregexú\nrk   Úcommon_suffix©r   Úsuffixc                ó    — | dxx   |z  cc<   | S ©Nr;   r   ©r@   r…   s     r   Ú
add_suffixz2common_prompt_suffix_validator.<locals>.add_suffixâ   s   € Ø	ˆ(‹�vÑ‹Øˆr   ©ÚxfixzAll prompts are identical: `zt`
Consider leaving the prompts blank if you want to do open-ended generation, otherwise ensure prompts are different©r   r   r!   z 
- All prompts end with suffix `r7   é
   úR. This suffix seems very long. Consider replacing with a shorter suffix, such as `z5
  WARNING: Some of your prompts contain the suffix `zZ` more than once. We strongly suggest that you review your prompts and add a unique suffixa”  
- Your data does not contain a common separator at the end of your prompts. Having a separator string appended to the end of the prompt makes it clearer to the fine-tuned model where the completion should begin. See https://platform.openai.com/docs/guides/fine-tuning/preparing-your-dataset for more detail and examples. If you intend to do open-ended generation, then you should leave the prompts emptyzAdd a suffix separator `z` to all promptsc                ó   •—  ‰| ‰«      S r4   r   ©r@   r‰   Úsuggested_suffixs    €€r   r   z3common_prompt_suffix_validator.<locals>.optional_fnù   ó   ø€ Ù˜aÐ!1Ó2Ð2r   Úcommon_completion_suffix©r   r   r   r   r   ©r@   r   r…   r   r9   r   rD   )
r;   r   ÚcontainsrW   Úreplacer{   r   Úget_common_xfixÚallr$   )r%   r   r   r   r   Úsuffix_optionsÚsuffix_optionÚdisplay_suggested_suffixr|   rƒ   Úcommon_suffix_new_line_handledr‰   r‘   s              @@r   Úcommon_prompt_suffix_validatorrž   Á   s  ù€ ð €IØ€MØ€LØ€Kð (Ðò€Nð (ò ˆØ˜EÒ!Ø�y‰y�}‰}×%Ñ% dÓ+×/Ñ/Ô1ØØ�9‰9�=‰=×!Ñ! -°uÐ!Ó=×AÑAÔCØØ(ÐÙðð  0×7Ñ7¸¸eÓDÐä˜bÓ!€GØÐ)Ò)Ü Ô0Ð0óô $ B§I¡I°HÔ=€MØ
�	‰	�]Ñ"×'Ñ'Ô)Ø2°=°/ð  Bwð  xˆ	Ü ¸9ÔEÐEà˜ÒØ)6×)>Ñ)>¸tÀUÓ)KÐ&Ø;Ð<ZÐ;[Ð[\Ð]ˆÜˆ}Ó Ò"ØÐqð  sKð  rLð  LMð  Nñ  NˆMØ�9‰9�=‰=Ð.œC Ó.Ð.Ð/×3Ñ3×<Ñ<¸]ÐRWÐ<ÓX×\Ñ\Ô^ØÐUÐVcÐUdð  eð  @ñ  @‰Mð pˆà˜ÒØ1Ð2JÐ1KÐK[Ð\ˆö	3ô Ø'Ø#Ø!ØØôð r   c                ó4  ‡‡— d}d}d}d}t        | j                  d¬«      Š‰dk(  rt        d¬«      S dd„Š| j                  ‰k(  j                  «       rt        d¬«      S ‰dk7  r&d	‰› d
�}|t	        ‰«      k  r|dz  }d‰› d�}dˆˆfd„}t        d|||¬«      S )zd
    This validator will suggest to remove a common prefix from the prompt if a long one exist.
    é   NÚprefixrŠ   r!   Úcommon_prefixr„   c                óB   — | d   j                   t        |«      d  | d<   | S r‡   ©r   r$   )r@   r¡   s     r   Úremove_common_prefixz<common_prompt_prefix_validator.<locals>.remove_common_prefix  s#   € Ø˜‘k—o‘o¤c¨&£k mÐ4ˆˆ(‰Øˆr   z"
- All prompts start with prefix `r7   zÒ. Fine-tuning doesn't require the instruction specifying the task, or a few-shot example scenario. Most of the time you should only add the input data into the prompt, and the desired output into the completionúRemove prefix `z` from all promptsc                ó   •—  ‰| ‰«      S r4   r   )r@   r¢   r¥   s    €€r   r   z3common_prompt_prefix_validator.<locals>.optional_fn!  s   ø€ Ù+¨A¨}Ó=Ð=r   Úcommon_prompt_prefixre   )r@   r   r¡   r   r9   r   rD   )r˜   r;   r   r™   r$   )r%   ÚMAX_PREFIX_LENr   r   r   r¢   r¥   s        @@r   Úcommon_prompt_prefix_validatorrª     sÆ   ù€ ð €Nà€MØ€LØ€Kä# B§I¡I°HÔ=€MØ˜ÒÜ Ô0Ð0óð 	�	‰	�]Ñ"×'Ñ'Ô)ä Ô0Ð0à˜ÒØ=¸m¸_ÈAÐNˆØœC Ó.Ò.Øð  rñ  rˆMØ,¨]¨OÐ;MÐNˆLö>ô Ø#Ø#Ø!Øô	ð r   c                ó>  ‡‡‡— d}t        | j                  d¬«      Št        ‰«      dkD  xr ‰d   dk(  Št        ‰«      |k  rt        d¬«      S dd„Š| j                  ‰k(  j	                  «       rt        d¬«      S d	‰› d
�}d‰› d�}dˆˆˆfd„}t        d|||¬«      S )zh
    This validator will suggest to remove a common prefix from the completion if a long one exist.
    é   r¡   rŠ   r   ú r¢   r„   c                ó\   — | d   j                   t        |«      d  | d<   |rd| d   › �| d<   | S )Nr<   r­   r¤   )r@   r¡   Ú	ws_prefixs      r   r¥   z@common_completion_prefix_validator.<locals>.remove_common_prefix7  s=   € Ø˜L™/×-Ñ-¬c°&«k¨mÐ<ˆˆ,‰Ùà ! ! L¡/Ð!2Ð3ˆAˆl‰OØˆr   z&
- All completions start with prefix `z_`. Most of the time you should only add the output data into the completion, without any prefixr¦   z` from all completionsc                ó   •—  ‰| ‰‰«      S r4   r   )r@   r¢   r¥   r¯   s    €€€r   r   z7common_completion_prefix_validator.<locals>.optional_fnE  s   ø€ Ù# A }°iÓ@Ð@r   Úcommon_completion_prefixre   )r@   r   r¡   r   r¯   r   r9   r   rD   )r˜   r<   r$   r   r™   )r%   r©   r   r   r   r¢   r¥   r¯   s        @@@r   Ú"common_completion_prefix_validatorr²   ,  s½   ú€ ð €Nä# B§M¡M¸ÔA€MÜ�MÓ" QÑ&ÒB¨=¸Ñ+;¸sÑ+B€IÜ
ˆ=Ó˜NÒ*Ü Ô0Ð0óð 	�‰˜Ñ&×+Ñ+Ô-ä Ô0Ð0à=¸m¸_ð  Mlð  m€MØ$ ] OÐ3IÐJ€L÷Aô Ø'Ø#Ø!Øô	ð r   c                ó   ‡‡— d}d}d}d}t        | «      }|dk(  s|dk(  rt        d¬«      S t        | j                  d¬«      }| j                  |k(  j	                  «       rd|› d	|› d
�}t        d|¬«      S dŠg d¢}|D ];  }| j                  j
                  j                  |d¬«      j                  «       rŒ9|Š n ‰j                  dd«      }	dd„Š|dk7  r…|j                  dd«      }
d|
› d
�}t        |«      dkD  r	|d|	› d
�z  }| j                  j
                  dt        |«        j
                  j                  |d¬«      j                  «       r|d|› d�z  }nd}|dk(  rd|	› d�}d ˆˆfd„}t        d||||¬«      S )!z 
    This validator will suggest to add a common suffix to the completion if one doesn't already exist in case of classification or conditional generation.
    Nrk   Úclassificationrƒ   r„   r…   rŠ   z All completions are identical: `zJ`
Ensure completions are different, otherwise the model will just repeat `r7   rŒ   z [END])	rt   ú.z ENDz***z+++z&&&z$$$z@@@z%%%Fr€   rt   r‚   c                ó    — | dxx   |z  cc<   | S ©Nr<   r   rˆ   s     r   r‰   z6common_completion_suffix_validator.<locals>.add_suffixv  s   € Ø	ˆ,‹˜6Ñ!‹Øˆr   r!   z$
- All completions end with suffix `r�   rŽ   z9
  WARNING: Some of your completions contain the suffix `zU` more than once. We suggest that you review your completions and add a unique endingaH  
- Your data does not contain a common ending at the end of your completions. Having a common ending string appended to the end of the completion makes it clearer to the fine-tuned model where the completion should end. See https://platform.openai.com/docs/guides/fine-tuning/preparing-your-dataset for more detail and examples.zAdd a suffix ending `z` to all completionsc                ó   •—  ‰| ‰«      S r4   r   r�   s    €€r   r   z7common_completion_suffix_validator.<locals>.optional_fnˆ  r’   r   r“   r”   r•   rD   )
r{   r   r˜   r<   r™   r   r–   rW   r—   r$   )r%   r   r   r   r   r|   rƒ   rš   r›   rœ   r�   r‰   r‘   s              @@r   Ú"common_completion_suffix_validatorr¹   P  s  ù€ ð €IØ€MØ€LØ€Kä˜bÓ!€GØÐ)Ò)¨WÐ8HÒ-HÜ Ô0Ð0ä# B§M¡M¸ÔA€MØ
�‰˜Ñ&×+Ñ+Ô-Ø6°}°oð  FQð  R_ð  Q`ð  `að  bˆ	Ü ¸9ÔEÐEð  Ðò
€Nð (ò ˆØ�=‰=×Ñ×%Ñ% m¸5Ð%ÓA×EÑEÔGØØ(ÐÙð	ð
  0×7Ñ7¸¸eÓDÐóð ˜ÒØ)6×)>Ñ)>¸tÀUÓ)KÐ&Ø?Ð@^Ð?_Ð_`ÐaˆÜˆ}Ó Ò"ØÐqð  sKð  rLð  LMð  Nñ  NˆMØ�=‰=×ÑÐ2¤ MÓ 2Ð2Ð3×7Ñ7×@Ñ@ÀÐV[Ð@Ó\×`Ñ`ÔbØÐYÐZgÐYhð  i~ð  ñ  ‰Mð dˆà˜ÒØ.Ð/GÐ.HÐH\Ð]ˆö	3ô Ø'Ø#Ø!ØØôð r   c                óÒ   — d
d„}d}d}d}| j                   j                  dd j                  «       dk7  s| j                   j                  d   d   dk7  rd}d}|}t	        d|||¬	«      S )zŽ
    This validator will suggest to add a space at the start of the completion if it doesn't already exist. This helps with tokenization.
    c                ó6   — | d   j                  d„ «      | d<   | S )Nr<   c                ó8   — | j                  d«      rd| z   S d| z   S )Nr­   r!   )Ú
startswith)rT   s    r   rM   zLcompletions_space_start_validator.<locals>.add_space_start.<locals>.<lambda>š  s"   € ÀÇÁÈcÔAR¸2Ð_`Ñ:`€ ÐX[Ð_`Ñ:`€ r   )rV   rL   s    r   Úadd_space_startz:completions_space_start_validator.<locals>.add_space_start™  s    € Ø˜L™/×/Ñ/Ñ0`Óaˆˆ,‰Øˆr   Nrn   r   r­   zæ
- The completion should start with a whitespace character (` `). This tends to produce better results due to the tokenization we use. See https://platform.openai.com/docs/guides/fine-tuning/preparing-your-dataset for more detailsz=Add a whitespace character to the beginning of the completionÚcompletion_space_startre   rD   )r<   r   ÚnuniqueÚvaluesr   )r%   r¾   r   r   r   s        r   Ú!completions_space_start_validatorrÂ   ”  s€   € ó
ð €LØ€KØ€Mà	‡}�}×Ñ˜˜!Ð×$Ñ$Ó&¨!Ò+¨r¯}©}×/CÑ/CÀAÑ/FÀqÑ/IÈSÒ/Pð BˆØVˆØ%ˆÜØ%Ø#Ø!Øô	ð r   c                óâ   ‡— dˆfd„}| ‰   j                  d„ «      j                  «       }| ‰   j                  d„ «      j                  «       }|dz  |kD  rt        dd‰› d‰› d�d	‰› d
�|¬«      S y)zt
    This validator will suggest to lowercase the column values, if more than a third of letters are uppercase.
    c                óH   •— | ‰   j                   j                  «       | ‰<   | S r4   )r   r-   )r@   r/   s    €r   Ú
lower_casez(lower_case_validator.<locals>.lower_case²  s"   ø€ Ø�f‘I—M‘M×'Ñ'Ó)ˆˆ&‰	Øˆr   c                ó&   — t        d„ | D «       «      S )Nc              3  ód   K  — | ](  }|j                  «       sŒ|j                  «       sŒ%d –— Œ* y­w©rn   N)ÚisalphaÚisupper©Ú.0r0   s     r   ú	<genexpr>z9lower_case_validator.<locals>.<lambda>.<locals>.<genexpr>¶  ó$   è ø€ Ò0]°qÀÇÁÅÐQR×QZÑQZÕQ\´Ñ0]ùó   ‚0˜0©0©ÚsumrL   s    r   rM   z&lower_case_validator.<locals>.<lambda>¶  ó   € ¬SÑ0]¸AÔ0]Ó-]€ r   c                ó&   — t        d„ | D «       «      S )Nc              3  ód   K  — | ](  }|j                  «       sŒ|j                  «       sŒ%d –— Œ* y­wrÈ   )rÉ   ÚislowerrË   s     r   rÍ   z9lower_case_validator.<locals>.<lambda>.<locals>.<genexpr>·  rÎ   rÏ   rÐ   rL   s    r   rM   z&lower_case_validator.<locals>.<lambda>·  rÒ   r   r
   rÅ   z
- More than a third of your `z%` column/key is uppercase. Uppercase z÷s tends to perform worse than a mixture of case encountered in normal language. We recommend to lower case the data if that makes sense in your domain. See https://platform.openai.com/docs/guides/fine-tuning/preparing-your-dataset for more detailsz'Lowercase all your data in column/key `r7   re   NrD   )rV   rÑ   r   )r%   r/   rÅ   Úcount_upperÚcount_lowers    `   r   Úlower_case_validatorrØ   ­  s“   ø€ õ
ð �V‘*×"Ñ"Ñ#]Ó^×bÑbÓd€KØ�V‘*×"Ñ"Ñ#]Ó^×bÑbÓd€Kà�Q�˜Ò$ÜØØ;¸F¸8ÐChÐioÐhpð  qhð  iØBÀ6À(È!ÐLØ"ô	
ð 	
ð r   c                óŒ  — d}d}d}d}d}t         j                  j                  | «      �rõ	 | j                  «       j	                  d«      s| j                  «       j	                  d«      r_| j                  «       j	                  d«      rdnd\  }}d|› d�}d|› d	�}t        j                  | |t        ¬
«      j                  d«      }�nV| j                  «       j	                  d«      rdd}d}t        j                  | «      }	|	j                  }
t        |
«      dkD  r|dz  }t        j                  | t        ¬«      j                  d«      }�nÓ| j                  «       j	                  d«      rud}d}t        | d«      5 }|j                  «       }t        j                  |j!                  d«      D �cg c]  }d|g‘Œ c}|t        ¬«      j                  d«      }ddd«       �n?| j                  «       j	                  d«      rit        j"                  | dt        ¬«      j                  d«      }t        |«      dk(  r/d}d}t        j"                  | t        ¬«      j                  d«      }n¸n·| j                  «       j	                  d«      rj	 t        j"                  | dt        ¬«      j                  d«      }t        |«      dk(  r+t        j"                  | t        ¬«      j                  d«      }nd}d}n.d}d | v r|d!| › d"| j!                  d «      d#   › d$�z  }n	|d!| › d%�z  }nd*| › d+�}t+        d,|||¬-«      }||fS c c}w # 1 sw Y   Œ(xY w# t$        $ r- t        j"                  | t        ¬«      j                  d«      }Y Œ`w xY w# t$        t&        f$ r1 | j!                  d «      d#   j)                  «       }d&| › d'|› d(|› d)�}Y Œœw xY w).zÕ
    This function will read a file saved in .csv, .json, .txt, .xlsx or .tsv format using pandas.
     - for .xlsx it will read the first sheet
     - for .txt it will assume completions and split on newline
    Nz.csvz.tsv)ÚCSVú,)ÚTSVú	z=
- Based on your file extension, your file is formatted as a z filezYour format `z` will be converted to `JSONL`)ÚsepÚdtyper!   z.xlsxzH
- Based on your file extension, your file is formatted as an Excel filez/Your format `XLSX` will be converted to `JSONL`rn   z¥
- Your Excel file contains more than one sheet. Please either save as csv or ensure all data is present in the first sheet. WARNING: Reading only the first sheet...)rß   z.txtz9
- Based on your file extension, you provided a text filez.Your format `TXT` will be converted to `JSONL`Úrrt   )r+   rß   ú.jsonlT)Úlinesrß   z^
- Your JSONL file appears to be in a JSON format. Your file will be converted to JSONL formatz/Your format `JSON` will be converted to `JSONL`z.jsonz^
- Your JSON file appears to be in a JSONL format. Your file will be converted to JSONL formatz]Your file must have one of the following extensions: .CSV, .TSV, .XLSX, .TXT, .JSON or .JSONLrµ   z Your file `z` ends with the extension `.éÿÿÿÿz` which is not supported.z` is missing a file extension.zYour file `z!` does not appear to be in valid z9 format. Please ensure your file is formatted as a valid z file.zFile z does not exist.Úread_any_format)r   r   r   r   )ÚosÚpathÚisfiler-   ÚendswithÚpdÚread_csvr   ÚfillnaÚ	ExcelFileÚsheet_namesr$   Ú
read_excelÚopenÚreadÚ	DataFrameÚsplitÚ	read_jsonÚ
ValueErrorÚ	TypeErrorÚupperr   )ÚfnamerA   Úremediationr   r   r   r%   Úfile_extension_strÚ	separatorÚxlsÚsheetsÚfÚcontentÚlines                 r   rä   rä   Ã  s½  € ð €KØ€MØ€MØ€IØ	€Bä	‡w�w‡~�~�eÕð<	vØ�{‰{‹}×%Ñ% fÔ-°·±³×1GÑ1GÈÔ1OØ@EÇÁÃ×@VÑ@VÐW]Ô@^±ÐdqÑ-Ð" IàTÐUgÐThÐhmÐnð ð #0Ð0BÐ/CÐCaÐ b�Ü—[‘[ ¨I¼SÔA×HÑHÈÓL’Ø—‘“×'Ñ'¨Ô0Ø k�Ø Q�Ü—l‘l 5Ó)�ØŸ™�Ü�v“; ’?Ø!ð  &Nñ  N�MÜ—]‘] 5´Ô4×;Ñ;¸BÓ?’Ø—‘“×'Ñ'¨Ô/Ø \�Ø P�Ü˜% Ó%ð !¨ØŸf™f›h�GÜŸ™Ø07·±¸dÓ0CÖD¨˜"˜dšÒDØ &Ü!ô÷ ‘f˜R“jð	 ÷!ñ !ð —‘“×'Ñ'¨Ô1Ü—\‘\ %¨t¼3Ô?×FÑFÀrÓJ�Ü�r“7˜a’<ð %F�MØ$U�MÜŸ™ e´3Ô7×>Ñ>¸rÓB‘BàØ—‘“×'Ñ'¨Ô0ðCäŸ™ e°4¼sÔC×JÑJÈ2ÓN�BÜ˜2“w !’|äŸ\™\¨%´sÔ;×BÑBÀ2ÓF™ð )J˜Ø(Y˜øð tð ð ˜%‘<Ø <°¨wÐ6RÐSX×S^ÑS^Ð_bÓScÐdfÑSgÐRhð  iBð  "Cñ  C‘Ià <°¨wÐ6TÐ!UÑU�Iøð ˜E˜7Ð"2Ð3ˆ	äØØ#Ø#Øô	€Kð ˆ{ˆ?Ðùòc E÷!ð !ûô6 "ò CäŸ™ e´3Ô7×>Ñ>¸rÓB’BðCûô œIÐ&ò 	vØ!&§¡¨SÓ!1°"Ñ!5×!;Ñ!;Ó!=ÐØ% e WÐ,MÐN`ÐMað  b[ð  \nð  [oð  ouð  vŠIð	vúsb   ¬EN Å;3L>Æ.L9
Æ9L>ÇB1N ÊA(M
 Ë0/N Ì9L>Ì>MÍN Í
3N Í=N Í?N Î N Î=OÏOc                óL   — t        | «      }d}|dk(  rd|› d�}t        d|¬«      S )zÓ
    This validator will infer the likely fine-tuning format of the data, and display it to the user if it is classification.
    It will also suggest to use ada and explain train/validation split benefits.
    Nr´   zK
- Based on your data it seems like you're trying to fine-tune a model for zã
- For classification, we recommend you try one of the faster and cheaper models, such as `ada`
- For classification, you can estimate the expected model performance by keeping a held out dataset, which is not used for trainingr"   r#   )r{   r   )r%   r|   r   s      r   Úformat_inferrer_validatorr    sA   € ô
 ˜bÓ!€GØ€MØÐ"Ò"ØfÐgnÐfoð  pUð  VˆÜ˜N¸-ÔHÐHr   c                ó`  — |j                   �Ot        j                  j                  d|j                  › d|j                   › d�«       t        j
                  d«       |j                  �)t        j                  j                  |j                  «       |j                  �|j                  | «      } | S )zs
    This function will apply a necessary remediation to a dataframe, or print an error message if one exists.
    z

ERROR in z validator: z

Aborting...rn   )	r   ru   Ústderrrw   r   Úexitr   rv   r   )r%   rø   s     r   Úapply_necessary_remediationr  (  s�   € ð ×ÑÐ(Ü�
‰
×Ñ˜=¨×)9Ñ)9Ð(:¸,À{×G\ÑG\ÐF]Ð]lÐmÔnÜ�‰�ŒØ× Ñ Ð,Ü�
‰
×Ñ˜×2Ñ2Ô3Ø×ÑÐ+Ø×%Ñ% bÓ)ˆØ€Ir   c                óº   — t         j                  j                  | «       |r t         j                  j                  d«       yt        «       j	                  «       dk7  S )NzY
TÚn)ru   rv   rw   Úinputr-   )Ú
input_textÚauto_accepts     r   Úaccept_suggestionr  6  s?   € Ü‡J�J×Ñ�ZÔ ÙÜ�
‰
×Ñ˜ÔØÜ‹7�=‰=‹?˜cÑ!Ð!r   c                ó  — d}d|j                   › d�}|j                   �-t        ||«      r!|j                  €J ‚|j                  | «      } d}|j                  �-t        j
                  j                  d|j                  › d�«       | |fS )zc
    This function will apply an optional remediation to a dataframe, based on the user input.
    Fz- [Recommended] z [Y/n]: Tz- [Necessary] rt   )r   r  r   r   ru   rv   rw   )r%   rø   r
  Úoptional_appliedr	  s        r   Úapply_optional_remediationr  >  s—   € ð ÐØ# K×$<Ñ$<Ð#=¸XÐF€JØ×ÑÐ+Ü˜Z¨Ô5Ø×*Ñ*Ð6Ð6Ð6Ø×(Ñ(¨Ó,ˆBØ#ÐØ× Ñ Ð,Ü�
‰
×Ñ˜>¨+×*CÑ*CÐ)DÀBÐGÔHØÐÐÐr   c                óø   — t        | «      }d}|dk(  rt        | «      }|dz  }n%| j                  d¬«      j                  «       }|dz  }dd„} ||dz   «      }t        j
                  j                  d	|› d
�«       y)z?
    Estimate the time it'll take to fine-tune the dataset
    g      ð?r´   g
×£p=
÷?T)rZ   g‘í|?5^ª?c                óª   — | dk  rt        | d«      › d�S | dk  rt        | dz  d«      › d�S | dk  rt        | dz  d«      › d�S t        | dz  d«      › d�S )	Né<   r
   z secondsi  z minutesi€Q z hoursz days)Úround)Útimes    r   Úformat_timez.estimate_fine_tuning_time.<locals>.format_time]  sv   € Ø�"Š9Ü˜D !“nÐ% XÐ.Ð.Ø�DŠ[Ü˜D 2™I qÓ)Ð*¨(Ð3Ð3Ø�EŠ\Ü˜D 4™K¨Ó+Ð,¨FÐ3Ð3ä˜D 5™L¨!Ó,Ð-¨UÐ3Ð3r   éŒ   z:Once your model starts training, it'll approximately take z~ to train a `curie` model, and less for `ada` and `babbage`. Queue will approximately take half an hour per job ahead of you.
N)r  Úfloatr9   r   )r{   r$   Úmemory_usagerÑ   ru   rv   rw   )r%   Ú	ft_formatÚexpected_timer"   Úsizer  Útime_strings          r   Úestimate_fine_tuning_timer  P  s�   € ô   Ó#€IØ€MØÐ$Ò$Ü˜2“wˆØ$ tÑ+‰à�‰ TˆÓ*×.Ñ.Ó0ˆØ˜v™ˆó4ñ ˜m¨cÑ1Ó2€KÜ‡J�J×ÑØ
DÀ[ÀMð  RQð  	Rõr   c                óà   — |rddgndg}d}	 |dkD  rd|› d�nd}|D �cg c],  }t         j                  j                  | «      d   › d|› |› d�‘Œ. }}t        d	„ |D «       «      s|S |d
z  }Œ^c c}w )NÚ_trainÚ_validr!   r   z (ú)Ú	_preparedrá   c              3  óZ   K  — | ]#  }t         j                  j                  |«      –— Œ% y ­wr4   )rå   ræ   rç   )rÌ   rý   s     r   rÍ   z get_outfnames.<locals>.<genexpr>s  s   è ø€ Ò?¨”2—7‘7—>‘> !×$Ñ?ùs   ‚)+rn   )rå   ræ   ÚsplitextrW   )r÷   rò   ÚsuffixesÚiÚindex_suffixr…   Úcandidate_fnamess          r   Úget_outfnamesr(  m  s‘   € Ù',�˜(Ñ#°2°$€HØ	€AØ
Ø$%¨¢E˜˜A˜3˜a‘y¨rˆØowÖxÐekœrŸw™w×/Ñ/°Ó6°qÑ9Ð:¸)ÀFÀ8ÈLÈ>ÐY_Ò`ÐxÐÐxÜÑ?Ð.>Ô?Ô?Ø#Ð#Ø	ˆQ‰ˆð ùâxs   ž1A+c                óš   — | j                   j                  «       }d }|dk(  r'| j                   j                  «       j                  d   }||fS )Nr
   r   )r<   rÀ   Úvalue_countsrZ   )r%   Ú	n_classesÚ	pos_classs      r   Úget_classification_hyperparamsr-  x  sH   € Ø—‘×%Ñ%Ó'€IØ€IØ�A‚~Ø—M‘M×.Ñ.Ó0×6Ñ6°qÑ9ˆ	Ø�iÐÐr   c                ó&  — t        | «      }t        | j                  d¬«      }t        | j                  d¬«      }d}d}|dk(  rt	        ||«      rd}d}	|j                  dd	«      }
|j                  dd	«      }t        |«      d
kD  rd|› d�nd}d}|s:|s8t        j                  j                  d|› d|	› d|
› d|› d�	«       t        | «       yt	        ||«      �r›t        ||«      }|rât        |«      dk(  rd|d
   v rd|d   v sJ ‚d}t        t        | «      |z
  t        t        | «      dz  «      «      }| j                  |d¬«      }| j                  |j                   «      }|ddg   j#                  |d
   dddd¬«       |ddg   j#                  |d   dddd¬«       t%        | «      \  }}|	dz  }	|dk(  r
|	d |› d�z  }	n7|	d!|› �z  }	n.t        |«      dk(  sJ ‚| ddg   j#                  |d
   dddd¬«       |rd"ndd#z   d$j'                  |«      z   }|r	d%|d   › d�nd}t        |
«      d
k(  rdnd&|
› d�}t        j                  j                  d'|› d(|d
   › d|› |	› d)|› |› d�«       t        | «       yt        j                  j                  d*«       y)+aQ  
    This function will write out a dataframe to a file, if the user would like to proceed, and also offer a fine-tuning command with the newly created file.
    For classification it will optionally ask the user if they would like to split the data into train/valid files, and modify the suggested command to include the valid set.
    r…   rŠ   FzQ- [Recommended] Would you like to split into training and validation set? [Y/n]: r´   Tr!   rt   r‚   r   z Make sure to include `stop=["z;"]` so that the generated texts ends at the expected place.z@

Your data will be written to a new JSONL file. Proceed [Y/n]: zK
You can use your file for fine-tuning:
> openai api fine_tunes.create -t "ú"ue   

After youâ€™ve fine-tuned a model, remember that your prompt has to end with the indicator string `zX` for the model to start generating completions, rather than continuing with the prompt.r
   ÚtrainÚvalidrn   iè  gš™™™™™é?é*   )r  Úrandom_stater;   r<   ÚrecordsN)râ   ÚorientÚforce_asciiÚindentz! --compute_classification_metricsz" --classification_positive_class "z --classification_n_classes rT   z to `z` and `z -v "uc   After youâ€™ve fine-tuned a model, remember that your prompt has to end with the indicator string `z
Wrote modified filezd`
Feel free to take a look!

Now use that file when fine-tuning:
> openai api fine_tunes.create -t "z

z#Aborting... did not write the file
)r{   r˜   r;   r<   r  r—   r$   ru   rv   rw   r  r(  ÚmaxÚintÚsamplerx   rZ   Úto_jsonr-  rg   )r%   r÷   Úany_remediationsr
  r  Úcommon_prompt_suffixr“   rò   r	  Úadditional_paramsÚ%common_prompt_suffix_new_line_handledÚ)common_completion_suffix_new_line_handledÚoptional_ending_stringÚfnamesÚMAX_VALID_EXAMPLESÚn_trainÚdf_trainÚdf_validr+  r,  Úfiles_stringÚvalid_stringÚseparator_reminders                          r   Úwrite_out_filerJ  €  s³  € ô
   Ó#€IÜ*¨2¯9©9¸8ÔDÐÜ.¨r¯}©}À8ÔLÐà€EØd€JØÐ$Ò$Ü˜Z¨Ô5ØˆEàÐØ,@×,HÑ,HÈÈuÓ,UÐ)Ø0H×0PÑ0PÐQUÐW\Ó0]Ð-ô Ð8Ó9¸AÒ=ð )Ð)RÐ(Sð  TOñ  	Pàð ð V€Já¡EÜ�
‰
×ÑØ[Ð\aÐ[bÐbcÐduÐcvð  w^ð  _Dð  ^Eð  E]ð  ^tð  ]uð  uwð  xô	
ô 	" "Õ%ä	˜: {Õ	3Ü˜u eÓ,ˆÙÜ�v“; !Ò#¨°6¸!±9Ñ(<ÀÈFÐSTÉIÑAUÐUÐUØ!%ÐÜœ#˜b›'Ð$6Ñ6¼¼CÀ»GÀc¹MÓ8JÓKˆGØ—y‘y 7¸�yÓ<ˆHØ—w‘w˜xŸ~™~Ó.ˆHØ�h Ð-Ñ.×6Ñ6Ø�q‘	 ¨iÀUÐSWð 7ô ð �h Ð-Ñ.×6Ñ6Ø�q‘	 ¨iÀUÐSWð 7ô ô $BÀ"Ó#EÑ ˆI�yØÐ!DÑDÐØ˜AŠ~Ø!Ð'IÈ)ÈÐTUÐ%VÑVÑ!à!Ð'CÀIÀ;Ð%OÑOÑ!ä�v“; !Ò#Ð#Ð#Ø�˜,Ð'Ñ(×0Ñ0Ø�q‘	 ¨iÀUÐSWð 1ô ñ
  %™¨"°Ñ7¸9¿>¹>È&Ó;QÑRˆÙ/4˜˜v a™y˜k¨Ñ+¸"ˆô Ð8Ó9¸QÒ>ñ àvð  x]ð  w^ð  ^vð  wð 	ô
 	�
‰
×ÑØ# L >ð  2Zð  [að  bcñ  [dð  Zeð  efð  gsð  ftð  uFð  tGð  GKð  L^ð  K_ð  `vð  _wð  wyð  zô	
ô 	" "Õ%ä�
‰
×ÑÐ?Õ@r   c                óÐ   — d}t        | j                  j                  j                  «       «      dk(  ryt        | j                  j                  «       «      t        | «      |z  k  ryy)z>
    Infer the likely fine-tuning task type from the data
    é   r   rk   r´   zconditional generation)rÑ   r;   r   r$   r<   Úunique)r%   ÚCLASSIFICATION_THRESHOLDs     r   r{   r{   Ë  sU   € ð  !ÐÜ
ˆ2�9‰9�=‰=×ÑÓÓ 1Ò$Ø&ä
ˆ2�=‰=×ÑÓ!Ó"¤S¨£WÐ/GÑ%GÒGØà#r   c                óö   — d}	 |dk(  r| j                   t        |«      dz    d n| j                   dt        |«      dz    }|j                  «       dk7  r	 |S ||j                  d   k(  r	 |S |j                  d   }Œw)zQ
    Finds the longest common suffix or prefix of all the values in a series
    r!   r…   rn   Nr   )r   r$   rÀ   rÁ   )Úseriesr‹   Úcommon_xfixÚcommon_xfixess       r   r˜   r˜   Ù  s¤   € ð €KØ
à59¸XÒ5EˆF�J‰Jœ˜[Ó)¨AÑ-Ð.Ð0Ñ1È6Ï:É:ÐVlÔX[Ð\gÓXhÐklÑXlÐKmð 	ð × Ñ Ó" aÒ'Øð
 Ðð	 ˜M×0Ñ0°Ñ3Ò3Øð Ðð (×.Ñ.¨qÑ1ˆKð r   z,Callable[[pd.DataFrame], Remediation | None]r	   Ú	Validatorc                 ó„   — t         d„ d„ t        t        t        t        t
        d„ d„ t        t        t        t        t        gS )Nc                ó   — t        | d«      S r‡   ©r:   rL   s    r   rM   z get_validators.<locals>.<lambda>ñ  s   € Ô,¨Q°Ó9€ r   c                ó   — t        | d«      S r·   rV  rL   s    r   rM   z get_validators.<locals>.<lambda>ò  s   € Ô,¨Q°Ó=€ r   c                ó   — t        | d«      S r‡   ©rØ   rL   s    r   rM   z get_validators.<locals>.<lambda>ø  s   € Ô& q¨(Ó3€ r   c                ó   — t        | d«      S r·   rY  rL   s    r   rM   z get_validators.<locals>.<lambda>ù  s   € Ô& q¨,Ó7€ r   )r(   rI   r^   r  ri   r}   rž   rª   r²   r¹   rÂ   r   r   r   Úget_validatorsr[  î  s9   € äÙ9Ù=Ü#Ü!Ü!Ü!ÜÙ3Ù7Ü&Ü&Ü*Ü*Ü)ðð r   c                ó0  — g }|�|j                  |«       |D ]*  } || «      }|€Œ|j                  |«       t        | |«      } Œ, t        |D �cg c]  }|j                  €|j                  �|‘Œ c}«      }t        |D �cg c]  }|j                  €Œ|‘Œ c}«      }	d}
|r=t
        j                  j                  d«       |D ]  }t        | ||«      \  } }|
xs |}
Œ nt
        j                  j                  d«       |
xs |	} || |||«       y c c}w c c}w )NFz?

Based on the analysis we will perform the following actions:
z

No remediations found.
)	Úappendr  rW   r   r   ru   rv   rw   r  )r%   r÷   rø   Ú
validatorsr
  Úwrite_out_file_funcÚoptional_remediationsÚ	validatorÚ&any_optional_or_necessary_remediationsÚany_necessary_appliedÚany_optional_appliedr  Ú!any_optional_or_necessary_applieds                r   Úapply_validatorsrf    sB  € ð 02ÐØÐØ×$Ñ$ [Ô1Øò >ˆ	Ù “mˆØÑ"Ø!×(Ñ(¨Ô5Ü,¨R°Ó=‰Bð	>ô .1ð  5ö	
àØ×'Ñ'Ð3°{×7PÑ7PÐ7\ò ò	
ó.Ð*ô  Ø(=Ög˜À×AZÑAZÑAfŠÒgóÐð !Ðá-Ü�
‰
×ÑÐ]Ô^Ø0ò 	LˆKÜ#=¸bÀ+È{Ó#[Ñ ˆBÐ Ø#7Ò#KÐ;KÑ ñ	Lô 	�
‰
×ÑÐ7Ô8à(<Ò(UÐ@UÐ%á˜˜EÐ#DÀkÕRùò+	
ùò 	hs   Á!DÁ?DÂD)r%   r8   r9   r   )r%   r8   r5   r   r9   r   )r%   r8   rA   ú	list[str]r9   r   )r<   )r%   r8   rR   r   r9   r   )r%   r8   r/   r   r9   úRemediation | None)r÷   r   rA   rg  r9   z'tuple[pd.DataFrame | None, Remediation])r%   r   rø   r   r9   r   )r	  r   r
  Úboolr9   ri  )r%   r8   rø   r   r
  ri  r9   ztuple[pd.DataFrame, bool])r%   r8   r9   ÚNone)r÷   r   rò   ri  r9   rg  )r%   r8   r9   ztuple[int, object])
r%   r8   r÷   r   r<  ri  r
  ri  r9   rj  )r%   r8   r9   r   )r…   )rP  r   r‹   r   r9   r   )r9   úlist[Validator])r%   r8   r÷   r   rø   rh  r^  rk  r
  ri  r_  zCallable[..., Any]r9   rj  ),Ú
__future__r   rå   ru   Útypingr   r   r   r   r   Útyping_extensionsr	   Ú_extrasr   ré   r   r   r(   r:   rI   r^   ri   r}   rž   rª   r²   r¹   rÂ   rØ   rä   r  r  r  r  r  r(  r-  rJ  r{   r˜   rS  r   r[  rf  r   r   r   ú<module>rp     sx  ðæ "ã 	Û 
ß ?Õ ?Ý 'å "ô$�*ô $ñ Ð1Ð9QÔRÐ óIó!ðH HPÐQ]ÐF^ô ô<ð4 FNÈ|ÐD\ô ó2"óJAóH$óN!óHAóHó2ð. &.¨|Ð$<ðVØðVØ!ðVà,óVór	Ióó"ð Øð Ø#.ð Ø=Að àó ó$ó:ó óHAóV$ôð$ F€	ˆ9Ó Eóð('SØð'Sàð'Sð $ð'Sð  ð	'Sð
 ð'Sð ,ð'Sð 
ô'Sr   