
    Ch                    <    S r SSKJr  SSKrSSKJr   " S S5      rg)a@  
This file contains deprecated code that can only be used with the old `model.fit`-style Sentence Transformers v2.X training.
It exists for backwards compatibility with the `model.old_fit` method, but will be removed in a future version.

Nowadays, with Sentence Transformers v3+, it is recommended to use the `SentenceTransformerTrainer` class to train models.
See https://www.sbert.net/docs/sentence_transformer/training_overview.html for more information.

Instead, you should create a `datasets` `Dataset` for training: https://huggingface.co/docs/datasets/create_dataset
    )annotationsN   )InputExamplec                  (    \ rS rSrSrS rSS jrSrg)PairedFilesReader   z/Reads in the a Pair Dataset, split in two filesc                    Xl         g )N	filepaths)selfr   s     g/var/www/html/shao/venv/lib/python3.13/site-packages/sentence_transformers/readers/PairedFilesReader.py__init__PairedFilesReader.__init__   s    "    c           	        / nU R                    HJ  nUR                  S5      (       a  [        R                  " USSS9O	[        USS9nUR	                  U5        ML     / nSnU(       d  / nU H.  nUR                  5       nUS:X  a  Sn  OUR	                  U5        M0     U(       a   U$ UR	                  [        [        [        U5      5      USS	95        US
:  a  [        U5      U:  a   U$ U(       d  M  U$ )Nz.gzrtzutf-8)encodingF Tr   )guidtextslabelr   )	r   endswithgzipopenappendreadliner   strlen)	r   max_examplesfInsfilepathfInexampleseofr   texts	            r   get_examplesPairedFilesReader.get_examples   s    H $$U++ 		(D7;(W5 
 KK ' E||~2:CT"   	 OOLc#h-.@UVWXaCM\$A% #$ r   r
   N)r   )__name__
__module____qualname____firstlineno____doc__r   r&   __static_attributes__ r   r   r   r      s    9#r   r   )r,   
__future__r   r   r   r   r   r.   r   r   <module>r0      s    #  % %r   