Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose build_config() in Python #388

Merged
merged 4 commits into from
May 20, 2024
Merged

Conversation

jparismorgan
Copy link
Contributor

@jparismorgan jparismorgan commented May 16, 2024

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"}

@jparismorgan jparismorgan marked this pull request as ready for review May 17, 2024 02:00
{"Build_date", CURRENT_DATETIME},
{"Run_date", date_},
{"Run_date", date},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have 2 dates? Do we need both of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why, but I agree having the run date doesn't seem very useful (and is potentially even bad because it will make diff-ing the results harder), so removed.

@jparismorgan jparismorgan merged commit 6759ca1 into main May 20, 2024
6 checks passed
@jparismorgan jparismorgan deleted the jparismorgan/build-config branch May 20, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants