a
    h
                     @  s:   d dl mZ d dlZd dlZeeZdd Zdd ZdS )    )annotationsNc                   s   t   fdd}|S )Nc                   s   ddddddd}|  D ]B\}}||v r||}td| d	| d
 ||vr|||< qd|v r|d}td| d d|vrd|i|d< n||d d<  | g|R i |S )NZmodel_name_or_pathZmodel_kwargsZtokenizer_kwargsZconfig_kwargsZcache_folderactivation_fn)Z
model_nameZautomodel_argsZtokenizer_argsZconfig_args	cache_dirZdefault_activation_functionzThe CrossEncoder `:` argument was renamed and is now deprecated, please use `
` instead.classifier_dropoutzoThe CrossEncoder `classifier_dropout` argument is deprecated. Please use `config_kwargs={'classifier_dropout': z}` instead.itemspoploggerwarning)selfargskwargskwargs_renamed_mappingold_namenew_namekwarg_valuer   func d/var/www/html/assistant/venv/lib/python3.9/site-packages/sentence_transformers/cross_encoder/util.pywrapper
   s0    



z2cross_encoder_init_args_decorator.<locals>.wrapper	functoolswrapsr   r   r   r   r   !cross_encoder_init_args_decorator	   s    r   c                   s   t   fdd}|S )Nc           	        s   ddi}|  D ]B\}}||v r||}td| d| d ||vr|||< qdg}|D ](}||v r^|| td| d q^ | g|R i |S )NZactivation_fctr   zThe CrossEncoder.predict `r   r   Znum_workerszS` argument is deprecated and has no effect. It will be removed in a future version.r   )	r   r   r   r   r   r   r   Zdeprecated_argsZdeprecated_argr   r   r   r   -   s$    



z:cross_encoder_predict_rank_args_decorator.<locals>.wrapperr   r   r   r   r   )cross_encoder_predict_rank_args_decorator,   s    r   )	
__future__r   r   logging	getLogger__name__r   r   r   r   r   r   r   <module>   s
   
#