neural_compressor.ux.utils.expiring_dict
¶
Dict with items expiring after given time.
Module Contents¶
Classes¶
Item that knows it it's already expired. |
|
Dict with items expiring after given time. |
- class neural_compressor.ux.utils.expiring_dict.ExpiringDictItem(value: Any, expires_at: float)¶
Item that knows it it’s already expired.
- is_expired() bool ¶
Check if item is already expired.
- class neural_compressor.ux.utils.expiring_dict.ExpiringDict(initial_value: dict | None = None, ttl: int = 120)¶
Bases:
collections.UserDict
Dict with items expiring after given time.