Skip to content

Conversation

@bharathts07
Copy link
Contributor

@bharathts07 bharathts07 commented Oct 30, 2025

WHAT

  1. Renamed the over long "getting started with..." to "ml-function-classify" - easier to read
  2. Add a new notebook that demonstrates how you can use ML Function Anomaly Detect
  3. Add a notebook template which show how you can deploy a Python UDF that takes image urls and performs operation on the image present at the URL

WHY

Need to demo the possibilities to Sales / Solution engineers

- id: requirements-txt-fixer
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 7.1.1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated this to get past local config error

Comment on lines +1 to +7
[meta]
authors=["bharath-swamy"]
title="Demonstrate ML function Anomaly Detect"
description="""\
Learn how to train an ML Anomaly Detect \
model and run it to predict the class of a set of time series inputs.
"""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a new example for anomaly detect

Comment on lines +40 to +41
"# Install and Import Required Libraries\n",
"!pip install -q langchain==0.3.27 langchain-openai==0.2.10 langchain-community==0.3.25 langchain-core==0.3.72 pillow==10.4.0 aiofiles==24.1.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pinned the all install libraries for consistency

Comment on lines +73 to +93
"async def download_image_from_url(image_url: str, max_size: int = 1024) -> str:\n",
" \"\"\"\n",
" Download image from URL and encode to base64 for GPT-4o Vision API.\n",
"\n",
" Parameters\n",
" ----------\n",
" image_url : str\n",
" URL of the image to download\n",
" max_size : int, optional\n",
" Maximum size to resize image to save on API costs, by default 1024\n",
"\n",
" Returns\n",
" -------\n",
" str\n",
" Base64 encoded image string\n",
"\n",
" Raises\n",
" ------\n",
" Exception\n",
" If image download fails or processing encounters an error\n",
" \"\"\"\n",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated function to Use numpy style docstrings

@bharathts07 bharathts07 requested a review from kesmit13 October 30, 2025 22:32
@bharathts07 bharathts07 changed the title Add an example python UDF template to show how to process image data through LLM calls Add SingleStore AI Bootcamp : AI/ML Enablement template notebooks Oct 30, 2025
Copy link

@mgiannakopoulos mgiannakopoulos left a comment

Choose a reason for hiding this comment

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

🚢 Ship IT!

}
],
"source": [
"pip install -q kagglehub"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be pinned to a version

],
"source": [
"%%sql\n",
"USE \"temp\";\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you are going to do this instead of selecting the database in the UI, you should at least use {{ db_name }} so that if that variable is changed earlier in the notebook, this still matches.

@kesmit13 kesmit13 merged commit a5af76e into singlestore-labs:master Oct 31, 2025
1 check passed
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.

4 participants