o
    ®Ÿ?eR  ã                   @   s6   d Z ddlmZ ddlmZ ddlmZ ddd„ZdS )	z3A Python interface for creating TensorFlow servers.é    )Údevice_attributes_pb2)Úpywrap_tensorflow)Ú_pywrap_device_libNc                    s4   dd„ ‰ d}| dur|   ¡ }‡ fdd„t |¡D ƒS )zÒList the available devices available in the local process.

  Args:
    session_config: a session config proto or None to use the default config.

  Returns:
    A list of `DeviceAttribute` protocol buffers.
  c                 S   s   t  ¡ }| | ¡ |S ©N)r   ZDeviceAttributesZParseFromString)Zpb_strÚm© r   úd/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/client/device_lib.pyÚ_convert    s   
z$list_local_devices.<locals>._convertNc                    s   g | ]}ˆ |ƒ‘qS r   r   )Ú.0Ús©r	   r   r   Ú
<listcomp>(   s    ÿz&list_local_devices.<locals>.<listcomp>)ZSerializeToStringr   Zlist_devices)Zsession_configZserialized_configr   r   r   Úlist_local_devices   s   	
ÿr   r   )Ú__doc__Ztensorflow.core.frameworkr   Ztensorflow.pythonr   Ztensorflow.python.clientr   r   r   r   r   r   Ú<module>   s
   