How to Use Your Qubot Repositories in the Playground

The Rastion Playground provides a powerful cloud environment for testing and running your optimization algorithms. This guide shows you how to use your uploaded repositories in the playground.

Prerequisites

Before using the playground:

  1. Uploaded Repository: Upload your qubot to Rastion
  2. GitHub Login: Sign in with GitHub
  3. API Token: Available in your Rastion settings

Accessing the Playground

Web Interface

  1. Navigate: Go to rastion.com/qubots-playground
  2. Sign In: Ensure you’re logged in with GitHub
  3. Environment Ready: The playground loads with a containerized cloud environment

Playground Interface

The modern playground interface features:

┌─────────────────────────────────────────────────────────┐
│ Environment Specs    │ Compact Model Selector           │
├─────────────────────────────────────────────────────────┤
│ Problem Parameters   │ Optimizer Parameters             │
├─────────────────────────────────────────────────────────┤
│ Run Controls (Center) │ Share & Save Options            │
├─────────────────────────────────────────────────────────┤
│ Terminal Viewer & Real-time Logs                       │
├─────────────────────────────────────────────────────────┤
│ Results Display & Visualization                        │
└─────────────────────────────────────────────────────────┘

Key Features

  • Containerized Environment: Isolated cloud execution environment
  • Real-time Terminal: Live execution logs and progress
  • Auto-loading Functions: Automatic model discovery and loading
  • Parameter Validation: Real-time parameter validation
  • Result Visualization: Interactive charts and metrics

Using Your Repositories

1. Model Selection

The Compact Model Selector provides easy access to your repositories:

Problem Selection

  1. Search: Type to search across all available problems
  2. Filter by Owner: Use dropdown to filter by “My Repositories”, “Community”, or specific users
  3. Repository Cards: Click on problem cards showing name, description, and owner
  4. Auto-load: Selected problem automatically loads with its parameter schema

Optimizer Selection

  1. Browse Optimizers: Similar interface for optimizer selection
  2. Type Detection: Platform automatically detects optimizer vs problem types
  3. Compatibility Check: Shows which optimizers work with selected problems
  4. Quick Access: Recently used optimizers appear at the top

2. Parameter Configuration

Dynamic Parameter Inputs

The playground provides intelligent parameter configuration:

  • Schema-based: Parameters auto-populate from config.json
  • Type Validation: Real-time validation (integers, floats, strings, booleans)
  • Range Checking: Enforces min/max values defined in configuration
  • Default Values: Pre-filled with sensible defaults
  • Help Text: Hover tooltips explain each parameter

Problem Parameters

{
  "n_cities": 50,        // Number of cities (10-1000)
  "seed": 42,            // Random seed for reproducibility
  "graph_type": "random" // Type of TSP instance
}

Optimizer Parameters

{
  "population_size": 100,  // GA population size (10-500)
  "generations": 500,      // Number of generations (10-5000)
  "mutation_rate": 0.1,    // Mutation probability (0.0-1.0)
  "crossover_rate": 0.8    // Crossover probability (0.0-1.0)
}

3. Execution Controls

Centered Run Controls

  • Run Button: Large, prominent run button in center
  • Stop Button: Cancel running optimizations
  • Reset: Clear current configuration
  • Status Indicator: Shows execution state (Ready, Running, Complete, Error)

Execution Process

  1. Parameter Validation: Checks all parameters before execution
  2. Container Startup: Spins up isolated execution environment
  3. Model Loading: Downloads and loads selected qubots
  4. Real-time Monitoring: Live progress updates and logs
  5. Result Collection: Gathers metrics and optimization results

Real-time Monitoring

Terminal Viewer

The Terminal Viewer provides comprehensive execution monitoring:

Live Execution Logs

  • Real-time Output: See your algorithm’s print statements live
  • Error Messages: Immediate feedback on runtime errors
  • Progress Updates: Built-in progress tracking
  • Performance Metrics: CPU, memory usage during execution
  • Timestamps: All logs include precise timestamps

Log Categories

[INFO] 2024-01-15 10:30:15 - Loading problem: tsp_berlin52
[DEBUG] 2024-01-15 10:30:16 - Initializing population of size 100
[PROGRESS] 2024-01-15 10:30:17 - Generation 1/500 - Best: 8542.3
[PROGRESS] 2024-01-15 10:30:18 - Generation 2/500 - Best: 8234.7
[WARNING] 2024-01-15 10:30:19 - Convergence detected early
[SUCCESS] 2024-01-15 10:30:20 - Optimization complete - Final: 7892.1

Environment Specifications

The playground displays current environment specs:

  • Container: Isolated Docker environment
  • CPU: 4 cores allocated
  • Memory: 8GB RAM limit
  • Timeout: 30 minutes maximum execution
  • Storage: Temporary workspace for execution
  • Network: Restricted internet access for security

Programmatic Access

Using Python SDK

import qubots.rastion as rastion

# Authenticate with your Rastion token
rastion.authenticate("your_rastion_token")

# Execute optimization in playground
result = rastion.execute_playground_optimization(
    problem_name="my_tsp_problem",
    problem_username="your_username",
    optimizer_name="my_genetic_optimizer",
    optimizer_username="your_username",
    problem_params={
        "n_cities": 50,
        "seed": 42
    },
    optimizer_params={
        "population_size": 100,
        "generations": 500,
        "mutation_rate": 0.1
    }
)

print(f"Best value: {result.best_value}")
print(f"Runtime: {result.runtime_seconds}")
print(f"Iterations: {result.iterations}")

Results and Sharing

Optimization Results Display

After execution, the playground shows comprehensive results:

Performance Metrics

  • Best Value: Optimal objective value found
  • Runtime: Total execution time in seconds
  • Iterations: Number of algorithm iterations
  • Evaluations: Total function evaluations
  • Convergence: Convergence rate and final gap

Result Visualization

  • Convergence Plot: Real-time objective value progression
  • Solution Visualization: Problem-specific visualizations (TSP tours, etc.)
  • Performance Charts: Runtime and memory usage over time
  • Statistical Summary: Mean, median, standard deviation across runs

Sharing and Collaboration

Share Workflow

  1. Save Configuration: Click “Save” to bookmark successful parameter combinations
  2. Generate Share Link: Create shareable URLs for specific configurations
  3. Export Results: Download results as JSON, CSV, or PDF
  4. Copy Configuration: Copy parameter settings to clipboard

Workflow Management

  • My Workflows: Access saved configurations from your profile
  • Public Workflows: Share configurations with the community
  • Workflow History: Track all your playground executions
  • Collaboration: Team members can access shared workflows

Community Integration

Discover and Learn

  • Community Problems: Browse problems uploaded by other users
  • Popular Optimizers: See most-used optimization algorithms
  • Recent Activity: View recent community playground runs
  • Success Stories: Learn from high-performing configurations

Mix and Match Combinations

The playground enables flexible experimentation:

  • Your Problem + Community Optimizer: See how others solve your problems
  • Community Problem + Your Optimizer: Benchmark against standard problems
  • Your Problem + Your Optimizer: Test your complete solution
  • Community Problem + Community Optimizer: Learn from successful examples

Best Practices

Parameter Tuning

  1. Start Small: Begin with smaller problem instances
  2. Incremental Changes: Adjust one parameter at a time
  3. Document Settings: Keep track of successful configurations
  4. Use Defaults: Start with default parameters, then optimize

Performance Optimization

# Efficient parameter exploration
parameter_grid = {
    "population_size": [50, 100, 200],
    "generations": [100, 500, 1000],
    "mutation_rate": [0.05, 0.1, 0.2]
}

best_result = None
best_params = None

for pop_size in parameter_grid["population_size"]:
    for generations in parameter_grid["generations"]:
        for mut_rate in parameter_grid["mutation_rate"]:
            result = execute_playground_optimization(
                problem_name="my_problem",
                problem_username="your_username",
                optimizer_name="my_optimizer",
                optimizer_username="your_username",
                optimizer_params={
                    "population_size": pop_size,
                    "generations": generations,
                    "mutation_rate": mut_rate
                }
            )
            
            if best_result is None or result.best_value < best_result.best_value:
                best_result = result
                best_params = {
                    "population_size": pop_size,
                    "generations": generations,
                    "mutation_rate": mut_rate
                }

print(f"Best parameters: {best_params}")
print(f"Best value: {best_result.best_value}")

Troubleshooting

Common Issues

”Model Not Found”

  • Check Repository Name: Verify exact repository name and owner
  • Repository Visibility: Ensure repository is public or you have access
  • Upload Status: Confirm repository uploaded successfully with green validation badge
  • Refresh Models: Use the refresh button in model selector

”Parameter Validation Error”

  • Type Mismatch: Check parameter types (int, float, string, boolean)
  • Range Violations: Ensure values are within min/max bounds
  • Required Parameters: Fill in all required parameters (marked with *)
  • JSON Format: For complex parameters, ensure valid JSON format

”Execution Failed”

  • Check Terminal Logs: Review error messages in terminal viewer
  • Memory Issues: Reduce problem size if memory limit exceeded
  • Timeout: Optimize algorithm for faster execution (30-minute limit)
  • Dependencies: Ensure all required packages are in requirements.txt

”Container Startup Failed”

  • Platform Status: Check if playground service is operational
  • Resource Limits: Wait if platform is at capacity
  • Authentication: Verify you’re logged in and have playground access
  • Browser Issues: Try refreshing page or different browser

Performance Optimization

Speed Up Execution

  • Reduce Problem Size: Start with smaller instances for testing
  • Optimize Parameters: Use efficient parameter settings
  • Algorithm Efficiency: Profile your code for bottlenecks
  • Early Stopping: Implement convergence criteria

Memory Management

  • Data Structures: Use memory-efficient data structures
  • Garbage Collection: Explicitly delete large objects
  • Batch Processing: Process data in smaller chunks
  • Monitor Usage: Watch memory usage in environment specs

Getting Help

  • Terminal Logs: Always check execution logs first
  • Community Forum: Ask questions at rastion.com/community
  • Documentation: Review Qubots framework docs
  • Platform Status: Check status page for service issues
  • Support: Contact support through help center for technical issues

Next Steps

The playground is your testing ground for optimization algorithms. Experiment, iterate, and discover the best solutions for your problems!