autofaiss.utils package
Submodules
autofaiss.utils.algorithms module
Various optimization algorithms
autofaiss.utils.array_functions module
useful functions t apply on numpy arrays
autofaiss.utils.cast module
function to cast variables in others
- autofaiss.utils.cast.cast_bytes_to_memory_string(num_bytes)[source]
Cast a number of bytes to a readable string
- Return type:
- autofaiss.utils.cast.cast_memory_to_bytes(memory_string)[source]
Parse a memory string and returns the number of bytes >>> cast_memory_to_bytes(“16B”) 16 >>> cast_memory_to_bytes(“16G”) == 16*1024*1024*1024 True
- Return type:
autofaiss.utils.decorators module
Useful decorators for fast debuging
- class autofaiss.utils.decorators.Timeit(comment=None, indent=0, verbose=True)[source]
Bases:
ContextDecorator
Timing class, used as a context manager
autofaiss.utils.path module
path