Tracing Groq
MLflow Tracing provides automatic tracing capability when using Groq.
When Groq auto-tracing is enabled by calling the mlflow.groq.autolog
function,
usage of the Groq SDK will automatically record generated traces during interactive development.
Note that only synchronous calls are supported, and that asynchronous API and streaming methods are not traced.
Example Usage
Python
import groq
import mlflow
# Turn on auto tracing for Groq by calling mlflow.groq.autolog()
mlflow.groq.autolog()
# Set up MLflow tracking on Databricks
mlflow.set_tracking_uri("databricks")
mlflow.set_experiment("/Shared/groq-demo")
client = groq.Groq()
# Use the create method to create new message
message = client.chat.completions.create(
model="llama-3.3-70b-versatile",
messages=[
{
"role": "user",
"content": "Explain the importance of low latency LLMs.",
}
],
)
print(message.choices[0].message.content)
Disable auto-tracing
Auto tracing for Groq can be disabled globally by calling mlflow.groq.autolog(disable=True)
or mlflow.autolog(disable=True)
.
Next Steps
- Understand tracing concepts - Learn how MLflow captures and organizes trace data
- Debug and observe your app - Use the Trace UI to analyze your Groq application's behavior
- Evaluate your app's quality - Set up quality assessment for your Groq-powered application