Skip to main content

Python SDK for Superb AI On-premise

Project description

๐Ÿš€ Superb AI On-premise Python SDK

Python License Version

Superb AI On-premise Python SDK is a comprehensive Python library that provides a simple and intuitive interface to interact with your on-premise Superb AI installation. Build powerful data management, annotation, and machine learning workflows with ease.

๐ŸŒŸ Key Features

  • ๐Ÿ—‚๏ธ Dataset Management: Create, organize, and manage your datasets
  • ๐Ÿ“Š Data Operations: Upload, annotate, and manipulate your data with powerful filtering
  • ๐Ÿ” Advanced Filtering: Sophisticated filtering system for precise data queries
  • ๐Ÿท๏ธ Annotation Management: Handle annotations and versions seamlessly
  • ๐Ÿ“ค Export & Import: Flexible data export and content management
  • โšก Activity Tracking: Monitor and manage long-running tasks
  • ๐Ÿ”ง Slice Management: Organize data into logical groups

๐Ÿ”ง Installation

Step 1: Install the SDK

Install the SDK using pip:

pip install superb-ai-onprem

Requirements:

  • Python 3.7 or higher
  • Active Superb AI On-premise installation

โš ๏ธ Important: The SDK will not work without this configuration file. Make sure to replace the values with your actual credentials from your Superb AI administrator.

๐Ÿš€ Quick Start

Get up and running with Superb AI SDK in minutes:

Step 1: Authentication Setup

First, set up your authentication credentials:

Option A: Config file (Recommended for local development)

# Create config directory
mkdir -p ~/.spb

# Create config file
cat > ~/.spb/onprem-config << EOF
[default]
host=https://your-superb-ai-host.com
access_key=your-access-key
access_key_secret=your-access-key-secret
EOF

Step 2: Your First Workflow

from spb_onprem import DatasetService, DataService

# Initialize services
dataset_service = DatasetService()
data_service = DataService()

# 1. Find existing datasets
datasets, cursor, total = dataset_service.get_dataset_list(length=10)
print(f"๐Ÿ“‚ Found {total} datasets")

if datasets:
    # Use the first available dataset
    dataset = datasets[0]
    print(f"โœ… Using dataset: {dataset.name} (ID: {dataset.id})")
    
    # 2. Get data list from the dataset
    data_list, cursor, total = data_service.get_data_list(
        dataset_id=dataset.id,
        length=10
    )
    
    print(f"๐Ÿ“Š Dataset contains {total} data items")
    
    # 3. Display data information
    for i, data in enumerate(data_list, 1):
        print(f"  {i}. Key: {data.key}, Type: {data.type}, ID: {data.id}")
        
    if total > len(data_list):
        print(f"  ... and {total - len(data_list)} more items")
else:
    print("โŒ No datasets found. Please create a dataset first.")

๐ŸŽ‰ Congratulations! You've successfully:

  • โœ… Connected to your Superb AI instance
  • โœ… Found existing datasets
  • โœ… Retrieved and displayed data information

Ready for more? Check out our comprehensive documentation below!

๐Ÿ“š Module Documentation

๐Ÿ—๏ธ Core Modules

Comprehensive guides for each SDK module with detailed examples and best practices:

Module Purpose Key Features Documentation
๐Ÿ“ Datasets Dataset lifecycle management Create, organize, manage data collections ๐Ÿ“‚ Dataset Guide
๐Ÿ“Š Data Individual data management CRUD operations, advanced filtering, annotations ๐Ÿ“Š Data Guide
๐Ÿ”ช Slices Data organization & filtering Create filtered views, team collaboration ๏ฟฝ Slice Guide
โšก Activities Workflow & task management Process automation, progress tracking โšก Activity Guide
๐Ÿ“ค Exports Data & annotation export Multi-format export (COCO, YOLO, Custom) ๐Ÿ“ค Export Guide

๐ŸŽฏ Getting Started Paths

Choose your learning path based on your use case:

๐Ÿ“Š Data Management Workflow

  1. Start with ๏ฟฝ Datasets - Create and organize your data collections
  2. Then explore ๐Ÿ“Š Data - Manage individual items and annotations
  3. Use ๐Ÿ”ช Slices - Organize data into logical groups

๐Ÿš€ ML Pipeline Integration

  1. Begin with ๏ฟฝ Data - Understand data structure and filtering
  2. Configure โšก Activities - Automate labeling and review workflows
  3. Setup ๏ฟฝ Exports - Export to ML training formats

๐Ÿ‘ฅ Team Collaboration

  1. Setup ๐Ÿ“ Datasets - Organize team projects
  2. Create ๐Ÿ”ช Slices - Assign work to team members
  3. Implement โšก Activities - Track progress and quality

๐Ÿ”ง Advanced Features

Each module includes:

  • ๐ŸŽฏ Quick Start Examples - Get running immediately
  • ๐Ÿ“‹ Detailed Entity Documentation - Pydantic models with comprehensive field descriptions
  • ๐Ÿ” Advanced Usage Patterns - Best practices and complex workflows
  • ๐Ÿ”— Cross-Module Integration - How modules work together
  • โšก Performance Tips - Optimization recommendations

๐ŸŒ Module Relationships

๐Ÿ“ Datasets (containers)
โ”œโ”€โ”€ ๐Ÿ“Š Data (individual items) 
โ”‚   โ”œโ”€โ”€ ๐Ÿ”ช Slices (filtered views)
โ”‚   โ””โ”€โ”€ โšก Activities (processing workflows)
โ””โ”€โ”€ ๐Ÿ“ค Exports (output formats)

โš ๏ธ Deprecated Modules

Module Status Migration Path
ModelService ๐Ÿšซ Deprecated Use external ML frameworks
PredictionService ๐Ÿšซ Deprecated Use ๐Ÿ“Š Data prediction entities
InferService ๐Ÿšซ Deprecated Use โšก Activities for inference workflows

โš ๏ธ Error Handling

The SDK provides specific error types for different scenarios:

from spb_onprem.exceptions import (
    BadParameterError,
    NotFoundError,
    UnknownError
)

try:
    dataset = dataset_service.get_dataset(dataset_id="non-existent-id")
except NotFoundError:
    print("Dataset not found")
except BadParameterError as e:
    print(f"Invalid parameter: {e}")
except UnknownError as e:
    print(f"An unexpected error occurred: {e}")

๐Ÿงช Requirements

  • Python >= 3.7
  • requests >= 2.22.0
  • urllib3 >= 1.21.1
  • pydantic >= 1.8.0

๐Ÿค Contributing

We welcome contributions to the Superb AI On-premise SDK! Here's how you can help:

Development Setup

  1. Clone the repository:
git clone https://github.com/Superb-AI-Suite/superb-ai-onprem-python.git
cd superb-ai-onprem-python
  1. Install development dependencies:
pip install -e ".[dev]"

Contribution Guidelines

  • Code Style: Follow PEP 8 guidelines
  • Testing: Add tests for new features
  • Documentation: Update docstrings and README
  • Pull Requests: Use descriptive titles and include test results

Reporting Issues

When reporting issues, please include:

  • SDK version (spb_onprem.__version__)
  • Python version
  • Error messages and stack traces
  • Minimal reproduction example
  • Expected vs actual behavior

๐Ÿ“ž Support

Community Support

Enterprise Support

  • Technical Support: Contact your Superb AI representative
  • Custom Integration: Professional services available
  • Training: SDK workshops and onboarding sessions

Quick Help

Common Issues:

  • Authentication errors: Check config file format and credentials
  • Connection issues: Verify host URL and network connectivity
  • Import errors: Ensure SDK is properly installed (pip install superb-ai-onprem)
  • Performance issues: Use appropriate pagination and filtering

Need immediate help? Check our FAQ section or contact support.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿš€ Ready to build something amazing? Start with our Quick Start Guide and explore the powerful features of Superb AI On-premise SDK!

Built with โค๏ธ by the Superb AI team

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

superb_ai_onprem-0.7.0.tar.gz (94.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

superb_ai_onprem-0.7.0-py3-none-any.whl (110.7 kB view details)

Uploaded Python 3

File details

Details for the file superb_ai_onprem-0.7.0.tar.gz.

File metadata

  • Download URL: superb_ai_onprem-0.7.0.tar.gz
  • Upload date:
  • Size: 94.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for superb_ai_onprem-0.7.0.tar.gz
Algorithm Hash digest
SHA256 2e3ed29e1be2d866c081f5dc194033caf2e9762db932570c86251a1616db8c8d
MD5 65bf841ec6619877bb3e1c189acc7a46
BLAKE2b-256 f64dbe5f6f5329aba7e88d40ef24adf8e799e78405bea3dcd52332f2812d9c33

See more details on using hashes here.

File details

Details for the file superb_ai_onprem-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for superb_ai_onprem-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afb2e9d38446b4476016e4ad7f81c6cfed0a47deb46e3687696ee761cd3565c2
MD5 3d16d74c8815d7d5f0d03e1559e4690a
BLAKE2b-256 89b590dc473cd7a1c50aff0d930f1f252af6b07505a438fda90b00be7c132b57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page