These are some high-level concepts related to EvaDB.

If you still have questions after reading this documents, ping us on our Slack!

User-Defined Function (UDF) or Function#

User-defined functions are thin wrappers around deep learning models. They allow us to use deep learning models in AI queries.

Here is an illustrative UDF for classifying MNIST images.

!wget -nc
cursor.create_udf("MnistImageClassifier", True, '')
response = cursor.df()

That’s it! You can now use the newly registered UDF anywhere in the query – in the select or filter calls.

query = cursor.table("MNISTVideo")
query = query.filter("id = 30 OR id = 50 OR id = 70")

# Here, we are selecting the output of the function
query ="data, MnistImageClassifier(data).label")
response = query.df()
query2 = cursor.table("MNISTVideo")

# Here, we are also filtering based on the output of the function
query2 = query2.filter("MnistImageClassifier(data).label = '6' AND id < 10")
query2 ="data, MnistImageClassifier(data).label")
response = query2.df()