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

This version

0.8.1

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.8.1.tar.gz (95.4 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.8.1-py3-none-any.whl (112.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: superb_ai_onprem-0.8.1.tar.gz
  • Upload date:
  • Size: 95.4 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.8.1.tar.gz
Algorithm Hash digest
SHA256 2bbc733de8ba9b69b8ce2b962a1f9428c423b472c24098abe39dc68ec022720f
MD5 91c94dfdb451b824b0b51568dd1f4cf7
BLAKE2b-256 0656db9c7cf08c922f7b8844f0b4b7c65765311a62e013de5d29c7ae9f1c34c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for superb_ai_onprem-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83e5a9861c978e80df34e99376202d8b2b5195d7dd987f78ab1e29d8c0400ad8
MD5 6367b1b49ff49e5472741d6a3c4d8492
BLAKE2b-256 287d186d0fe6db79cbf2a03188b9acc14ab91abe6dc27bf408c17264ad4114e9

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