Ë
    `›¾jâ  ã                   óâ  — d dl Z d dlZd dlmZ d dlmZmZmZmZ d dl	Z	d dl
mZ ddlmZ ddlmZ ddlmZ d	d
lmZmZmZmZmZmZmZ  ej6                  ddddœ¬«       edddd¬«       eddddd¬«       edddd¬«       eddddd¬«       edd d!d"¬«      fd#e	j8                  d$ed%ee   d&ee   d'ed(efd)„«       Z	 d-d ej@                  «       d*œd$ee!ef   d%eee!ef      d(ed+ee!ef   fd,„Zy).é    N)ÚPath)ÚAnyÚDictÚOptionalÚUnion)Úmsgé   )Úutil)Úinit_nlp)Útrainé   )ÚArgÚOptÚappÚimport_codeÚparse_config_overridesÚ	setup_gpuÚshow_validation_errorr   T)Úallow_extra_argsÚignore_unknown_options)Úcontext_settings.zPath to config file)ÚhelpÚexistsÚ
allow_dashz--outputz--output-pathz-oz-Output directory to store trained pipeline in)r   z--codez-czNPath to Python file with additional code (registered functions) to be importedFz	--verbosez-Vz-VVz/Display more information for debugging purposeséÿÿÿÿz--gpu-idz-gzGPU ID or -1 for CPUÚctxÚconfig_pathÚoutput_pathÚ	code_pathÚverboseÚuse_gpuc                 óÀ   — |r-t         j                  j                  t        j                  «       t        | j                  «      }t        |«       t        ||||¬«       y)aú  
    Train or update a spaCy pipeline. Requires data in spaCy's binary format. To
    convert data from other formats, use the `spacy convert` command. The
    config file includes all settings and hyperparameters used during training.
    To override settings in the config, e.g. settings that point to local
    paths or that you want to experiment with, you can override them as
    command line options. For instance, --training.batch_size 128 overrides
    the value of "batch_size" in the block "[training]". The --code argument
    lets you pass in a Python file that's imported before training. It can be
    used to register custom functions and architectures that can then be
    referenced in the config.

    DOCS: https://spacy.io/api/cli#train
    ©r!   Ú	overridesN)	r
   ÚloggerÚsetLevelÚloggingÚDEBUGr   Úargsr   r   )r   r   r   r   r    r!   r$   s          úY/home/spazio/kingdom_calls/work5/transenv/lib/python3.12/site-packages/spacy/cli/train.pyÚ	train_clir+      sB   € ñ\ Ü�‰×ÑœWŸ]™]Ô+Ü& s§x¡xÓ0€IÜ�	ÔÜ	ˆ+�{¨G¸yÖIó    r#   r$   c                óV  — t        j                  | «      } t        j                  |«      }| rt        | «      dk7  r(| j                  «       st	        j
                  d| d¬«       |st	        j                  d«       nR|j                  «       s*|j                  d¬«       t	        j                  d|› �«       t	        j                  d	|› �«       t        |«       t        | «      5  t        j                  | |d
¬«      }d d d «       t	        j                  d«       t        | d
¬«      5  t        |¬«      }d d d «       t	        j                  d«       t	        j                  d«       t        ||t        j                   t        j"                  ¬«       y # 1 sw Y   Œ˜xY w# 1 sw Y   ŒlxY w)Nú-zConfig file not foundr   )ÚexitszNo output directory providedT)ÚparentszCreated output directory: zSaving to output directory: F)r$   ÚinterpolatezInitializing pipeline)Ú	hint_fill)r!   zInitialized pipelinezTraining pipeline)r!   ÚstdoutÚstderr)r
   Úensure_pathÚstrr   r   ÚfailÚinfoÚmkdirÚgoodr   r   Úload_configÚdividerr   Ú	train_nlpÚsysr3   r4   )r   r   r!   r$   ÚconfigÚnlps         r*   r   r   L   sL  € ô ×"Ñ" ;Ó/€KÜ×"Ñ" ;Ó/€Káœ3˜{Ó+¨sÒ2¸;×;MÑ;MÔ;OÜ�‰Ð(¨+¸QÕ?ÙÜ�‰Ð/Õ0à×!Ñ!Ô#Ø×Ñ dÐÔ+Ü�H‰HÐ1°+°Ð?Ô@Ü�‰Ð/°¨}Ð=Ô>ÜˆgÔÜ	˜{Ó	+ñ WÜ×!Ñ! +¸ÐPUÔVˆ÷Wä‡K�KÐ'Ô(Ü	˜{°eÔ	<ñ 0Ü�v wÔ/ˆ÷0ä‡H�HÐ#Ô$Ü‡K�KÐ#Ô$Üˆc�;¨¼¿
¹
Ì3Ï:É:ÖV÷Wð Wú÷0ð 0ús   Ã#FÄ&FÆFÆF()N)"r'   r>   Úpathlibr   Útypingr   r   r   r   ÚtyperÚwasabir   Ú r
   Útraining.initializer   Útraining.loopr   r=   Ú_utilr   r   r   r   r   r   r   ÚcommandÚContextÚboolÚintr+   ÚSimpleFrozenDictr6   © r,   r*   ú<module>rO      sƒ  ðÛ Û 
Ý ß -Ó -ã Ý å Ý *Ý .÷÷ ñ ð €‡�Ø°4ÐSWÑXôñ ØÐ'°Àôñ #&ØØØØØ<ô#ñ !$ØØØØ]ô	!ñ ØØØØØ>ôñ �r˜: tÐ2HÔIñ5/Jà	�‰ð/Jð ð/Jð ˜$‘ð/Jð ˜‰~ð/Jð& ð'/Jð4 ò5/Jóð/Jðh /3ðWð Ø 5 × 5Ñ 5Ó 7òWØ�s˜D�yÑ!ðWà˜%  T 	Ñ*Ñ+ðWð ð	Wð
 �C˜�H‰~ôWr,   