Files
INTUIA/Programa final/spacy/cli/__pycache__/init_config.cpython-312.pyc
T

95 lines
13 KiB
Plaintext
Raw Normal View History

2026-03-15 13:27:50 +00:00
Ë
=û g”)ãó’ddlZddlmZddlmZddlmZmZmZddl Z ddl
m Z ddl m
Z
ddlmZmZdd lmZdd
lmZdd lmZdd lmZd
dlmZmZmZmZmZmZmZee «jBdz Z"e"dz Z#e jHe"dz «Z%Gdde&e«Z'Gdd«Z(ejRd«eddd¬«ee(jTddd¬«edjWe(jX«d d!d"¬«ee(jZd#d$d%¬«ee(j\d&d'd(¬«ee(j^d)d*d+¬«ee(j`d,d-d.¬«fd/ed0e&d1e&d2e'd3e1d4e1d5e1fd6„«Z2ejRd7«edd8dd9¬:«ed;d<d¬«ed9d)d*d+¬«ed9d=d>d?¬«edd@dAdBdC¬«fdDed/ed4e1dEe1dFeef
dG„«Z3d9d9d9dHœd/edDed4e1dEe1dIe1dJee
e
ff dK„Z4e(jTe(jXe(jZe(j\e(j^ddLœd0e&d1ee&d2e&d3e1d4e1dIe1dJe
fdM„Z5 dSde
d/edNe1dIe1dJdf
dO„Z6dJe1fdP„Z7de
dQedJdfdR„Z8y)TéN)ÚEnum)ÚPath)ÚListÚOptionalÚTuple)ÚTemplate)ÚConfig)ÚPrinterÚ diff_stringsé)Úutil)ÚDEFAULT_CONFIG_PRETRAIN_PATH)ÚRecommendationSchema)ÚSimpleFrozenListé)ÚCOMMANDÚArgÚOptÚ import_codeÚinit_cliÚshow_validation_errorÚstring_to_listÚ templateszquickstart_training.jinjaz'quickstart_training_recommendations.ymlcóeZdZdZdZy)Ú
OptimizationsÚ
efficiencyÚaccuracyN)Ú__name__Ú
__module__Ú __qualname__rr©óúVC:\Users\garci\AppData\Roaming\Python\Python312\site-packages\spacy/cli/init_config.pyrrs Ø€JØHr"rcóLeZdZdZdZegd¢«ZejZ dZ
dZ dZ y)Ú
InitValueszÅ
Default values for initialization. Dedicated class to allow synchronized default values for init_config_cli() and
init_config(), i.e. initialization calls via CLI respectively Python.
Úen)ÚtaggerÚparserÚnerFN)
rrr Ú__doc__ÚlangrÚpipelinerrÚoptimizeÚgpuÚ pretrainingÚforce_overwriter!r"r#r%r%#s3ñð
€DÙÒ ;Ó<€HØ×'€HØ
€CØ€KØOr"r%Úconfig.zcFile to save the config to or - for stdout (will only output config and no additional logging info)T)ÚhelpÚ
allow_dashz--langz-lz&Two-letter code of the language to use)r2ú,z
--pipelinez-pzfComma-separated names of trainable pipeline components to include (without 'tok2vec' or 'transformer')z
--optimizez-ozõWhether to optimize for efficiency (faster inference, smaller model, lower memory consumption) or higher accuracy (potentially larger and slower model). This will impact the choice of architecture, pretrained weights and related hyperparameters.z--gpuz-Gz~Whether the model can run on GPU. This will impact the choice of architecture, pretrained weights and related hyperparameters.z
--pretrainingz-ptz6Include config for pretraining (with 'spacy pretrain')z--forcez-Fz!Force overwriting the output fileÚ output_filer+r,r-r.r/r0cóêt|«}t|«dk(}|s/|j«r|st«}|j dd¬«t |||j |||¬«} t| ||¬«y)aU
Generate a starter config file for training. Based on your requirements
specified via the CLI arguments, this command generates a config with the
optimal settings for your use case. This includes the choice of architecture,
pretrained weights and related hyperparameters.
DOCS: https://spacy.io/api/cli#init-config
ú-zjThe provided output file already exists. To force overwriting the config file, set the --force or -F flag.r)Úexits©r+r,r-r.r/Úsilent)Ú is_stdoutN)rÚstrÚexistsr
ÚfailÚ init_configÚvalueÚ save_config)
r5r+r,r-r.r/r0r;Úmsgr1s
r#Úinit_config_clirC1s{ô(˜'€HÜ  '€IÙ ˜×-±oÜ‹iˆØ Ø ð ô
ôØ
ØØØ ØØô
€Fô˜ ¨yÖ9r"z fill-configzPath to base config to fillF)r2r=Údir_okayr7z*Path to output .cfg file (or - for stdout)z--diffz-Dz,Print a visual diff highlighting the changesz --code-pathz--codez-czNPath to Python file with additional code (registered functions) to be importedÚ base_pathÚdiffÚ code_pathcó8t|«t||||¬«y)
Fill partial config file with default values. Will add all missing settings
from the default config and will create all objects, check the registered
functions for their default values and update the base config. This command
can be used with a config generated via the training quickstart widget:
https://spacy.io/usage/training#quickstart
DOCS: https://spacy.io/api/cli#init-fill-config
)r/rFN)rÚ fill_config)rEr5r/rFrGs r#Úinit_fill_config_clirJXsô& ÔÜ ˜Y°KÀdÖKr")r/rFr:r:Úreturncó~t|«dk(}|xs|}t|¬«}td¬«5tj|«}tj
|dd¬«} ddd«tj
 j «} | j }
tj«} |
dj| «|r6t|
|«tjt«} | j|
«}
|j«}
|
j«}|
|k(r|jd«n|jd «|rf|sd|
|k(r|jd
«nM|jd «t!d «t!t#|
|««|jd
«t!d «t%|
|||¬«||
fS#1swYŒYxYw)Nr7©Úno_printF©Ú hint_fillT)Ú auto_fillÚvalidateÚ
componentsz5Nothing to auto-fill: base config is already completeú"Auto-filled config with all valuesz(No diff to show: nothing was auto-filledzSTART CONFIG DIFFÚzEND CONFIG DIFF)r;r:)r<r
rr
Ú load_configÚload_model_from_configr1Úget_sourced_componentsÚupdateÚvalidate_config_for_pretrainrÚmergeÚto_strÚwarnÚgoodÚdividerÚprintr rA)r5rEr/rFr:r;rNrBr1ÚnlpÚfilledÚsourcedÚpretrain_configÚbeforeÚafters r#rIrIosrô  '€IØÒ"˜F€HÜ
˜
$€CÜ ¨Ö /Ü×! ,ˆÜ×)¨&¸DÈ5ÔQˆ÷
×
% c§j¡jÓ
1€CØ
Z‰Z€Fô×)¨&Ó1€GØ
ˆ<Ñ×Ñ ÔÜ$ V¨SÔ×*Ô+GÓHˆØ ×& .ˆØ
]‰]_€FØ M‰MO€EØ
Ø Ð Ð ‘HØ UŠ?Ø H‰HÐ K‰KÐ "ŒIÜ ”,˜v  K‰KÐ "ŒIܘ ¨yÀÕ 6ˆ÷?
0Ñ /ús ­.F2Æ2F<r9có¬t|¬«}tjd«5}t|j ««}ddd«|D cgc] } | dvsŒ| Œ }} t
d}
t
dit
j||
«¤Žj«} ||||rdnd| d| d| d d
œ} | d r t«s|jd «d| d <j| «j«}
tjd
d|
«}
|j| «}|dj!|«|| dj#«|j$r|j&jd«nddœ}|j)d«|j+«D]\}}|j-d|d|«Œt/d¬«5t1j2|
«}t1j4|d¬«}|j6}|r6t9||«t1j:t<«}|j?|«}ddd«|jAd«S#1swYŒþxYwcc} w#1swYŒ.xYw)NrMÚr)Útok2vecÚ transformerÚ __default__r.ÚcpurjÚ word_vectorsÚ has_letters)r+rSr-ÚhardwareÚtransformer_datarmrnrpzµTo generate a more effective transformer-based config (GPU-only), install the spacy-transformers package and re-run this command. The config generated now does not use transformers.z\n\n\n+z
z, roÚname)ÚLanguageÚPipelinez Optimize forÚHardwareÚ Transformerz4Generated config template specific for your use casez- z: FrOT)rQrTr!)!r
Ú