Skip to main content

Logging

  • Implement Python logging in UDFs and application endpoints
  • Track execution time, errors, API call latency
  • Use structured logging (JSON) for log aggregation

Resource Monitoring

  • Monitor CPU, RAM, Disk I/O, Network on Pixeltable host
  • Track UDF execution time and model inference latency
  • Alert on resource exhaustion
Key Metrics to Track:

Optimization

Batch Operations

Use batch processing for better throughput:

Performance Tips

  • Batch Operations: Use @pxt.udf(batch_size=32) for GPU model inference
  • Batch Inserts: Insert multiple rows at once: table.insert([row1, row2, ...])
  • Profile UDFs: Add execution time logging to identify bottlenecks
  • Embedding Indexes: Use pgvector for efficient similarity search

Rate Limiting

Built-In Provider Limits

Automatic rate limiting for OpenAI, Anthropic, Gemini, etc. is configured per-model in config.toml:

Custom API Rate Limiting

Use resource_pool to throttle calls to self-hosted models or custom endpoints:

Advanced Features

LLM & Agent Workflows

Build complex agent workflows as computed columns with tool calling, MCP integration, and persistent state.

Snapshots

Create immutable point-in-time copies for reproducible ML experiments.
Last modified on July 14, 2026