o
    c²“iÐ  ã                   @   sH   d dl Z d dlmZmZ e  e¡Zdee dee dedefdd„Z	dS )	é    N)ÚDictÚOptionalÚmetricÚmodeÚconfigÚreturnc              
   K   sd   z| |||fi |¤ŽW S  t y1 } zt|ƒ d¡r+t d¡ | |||ƒW  Y d}~S |‚d}~ww )z•Wraps around set_search_properties() so that it is backward compatible.

    Also outputs a warning to encourage custom searchers to be updated.
    z:set_search_properties() got an unexpected keyword argumentzƒPlease update custom Searcher to take in function signature as ``def set_search_properties(metric, mode, config, **spec) -> bool``.N)Ú	TypeErrorÚstrÚ
startswithÚloggerÚwarning)Úset_search_properties_funcr   r   r   ÚspecÚe© r   úH/home/ubuntu/.local/lib/python3.10/site-packages/ray/tune/search/util.pyÚ+_set_search_properties_backwards_compatible   s   ÿÿ€õr   )
ÚloggingÚtypingr   r   Ú	getLoggerÚ__name__r   r	   Úboolr   r   r   r   r   Ú<module>   s    
þýüú