o
    ۷i                     @  s(   d dl mZ d dlZd	ddZdgZdS )
    )annotationsN	lora_pathstrreturnintc                 C  s8   t | d }tj|dd dddd@ }|pdS )	aW  Return a deterministic positive integer ID for a LoRA adapter.

    vLLM uses `lora_int_id` as the adapter's cache key. Python's built-in
    `hash()` is intentionally randomized per process (PYTHONHASHSEED), which
    makes it unsuitable for persistent IDs. This helper derives a stable
    63-bit positive integer from the adapter path.
    zutf-8N   bigF)	byteordersignedl       )hashlibsha256encodedigestr   
from_bytes)r   r   value r   J/home/ubuntu/vllm_env/lib/python3.10/site-packages/vllm_omni/lora/utils.pystable_lora_int_id	   s   r   )r   r   r   r   )
__future__r   r   r   __all__r   r   r   r   <module>   s   

