TileDB-Vector-Search
TileDB-Vector-Search copied to clipboard
Expose `build_config()` in Python
What
When investigating an issue with Vamana cloud I wanted to print out information about the tiledb library version used in an UDF. You can do this to print out the tiledb Python library version:
>>> def testme():
... import tiledb.vector_search
... return tiledb.vector_search.version.version
...
>>> tiledb.cloud.udf.exec(testme, image_name="3.9-vectorsearch")
'0.4.0'
But I also noticed this function which was hidden behind a conditional directive. Here we start building it again, add a C++ test for it, and expose it in Python. This seems nice for potential future issues like this, though do let me know if you have concerns about exposing this to users.
Result
This is what it prints out:
{"Build":"Release","Build_date":"2024-05-16 16:39:04","Compiler":{"CMAKE_CXX_FLAGS":"-Wall -Wno-unused-variable ","CMAKE_CXX_FLAGS_DEBUG":"-g","CMAKE_CXX_FLAGS_RELEASE":"-O3 -DNDEBUG","CMAKE_CXX_FLAGS_RELWITHDEBINFO":"-O2 -g -DNDEBUG","CXX_COMPILER":"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++","CXX_COMPILER_ID":"AppleClang","CXX_VERSION":"15.0.0.15000309"},"GIT_REPO":{"GIT_BRANCH":"main","GIT_COMMIT_DATE":"2024-05-16","GIT_COMMIT_HASH":"9effb8bc","GIT_COMMIT_TIME":"10:26:42","GIT_REPO_NAME":"TileDB-Vector-Search-4","GIT_REPO_URL":""},"Run_date":"Thu May 16 16:41:20 2024","cmake_source_dir":"/Users/parismorgan/repo/TileDB-Vector-Search-4/src","tiledb_version":{"major":2,"minor":23,"patch":0},"uuid":"fdntoharwtynnkithnxcrdcy"}