How to Upload a Qubot Repository to Rastion
Step-by-step guide to upload your optimization algorithms and problems to the Rastion platform
How to Upload a Qubot Repository to Rastion
This guide shows you how to upload your optimization algorithms and problems to Rastion, making them available for use in the playground, leaderboards, and community sharing.
Prerequisites
Before uploading, ensure you have:
- GitHub Account: Sign in to Rastion with GitHub
- Rastion Token: Get your token from Settings → API Access
- Qubots Framework:
pip install qubots
- Valid Repository: Following Qubots structure
Repository Structure
Your repository should follow the Qubots structure:
Example qubot.py (Optimizer)
Example config.json
Method 1: Web Interface Upload (Recommended)
1. Access Repository Creation
- Navigate: Go to rastion.com/qubots
- Sign In: Ensure you’re logged in with GitHub
- Create Repository: Click “Create New Repository” or ”+” button
2. Repository Setup
Fill in the repository details:
- Repository Name: Choose a unique name (e.g., “genetic_tsp_optimizer”)
- Description: Brief description of your algorithm/problem
- Visibility: Public (discoverable) or Private (personal use)
- Initialize: Choose to start with empty repository or upload files
3. Upload Files
Option A: Drag and Drop
- Drag Files: Drop your qubot files directly into the browser
- Automatic Detection: Platform detects qubot.py and config.json
- Validation: Real-time validation of file structure
Option B: File Browser
- Browse Files: Click “Upload Files” button
- Select Multiple: Choose all your qubot files at once
- Commit Message: Add descriptive commit message
Method 2: Python SDK Upload
1. Install and Authenticate
2. Upload from Directory
Method 3: Git Integration
1. Clone Your Repository
2. Add Your Files
3. Repository Management
The platform provides GitHub-style repository management:
- File Browser: Navigate through your repository files
- Code Viewer: Syntax-highlighted code viewing
- Edit Files: Direct file editing in the browser
- Version History: Track changes and commits
- Collaboration: Add collaborators and manage permissions
Validation and Testing
1. Automatic Validation
Rastion automatically validates your repository:
- Structure: Checks for required files (qubot.py, config.json)
- Syntax: Python syntax validation
- Dependencies: Verifies requirements.txt compatibility
- Configuration: Validates config.json format and parameters
- Type Detection: Automatically detects if it’s an optimizer or problem
2. Repository Status
After upload, check your repository status:
- Navigate: Go to your repository page at
rastion.com/your_username/repo_name
- Status Badge: Green badge indicates successful validation
- Issues Tab: View any validation warnings or errors
- Configuration: Review detected qubot type and parameters
3. Test in Playground
Test your uploaded repository immediately:
- Quick Test: Click “Open in Playground” from your repository page
- Auto-Load: Your qubot is automatically selected
- Parameter Setup: Configure parameters using the detected schema
- Run Test: Execute a quick test to verify functionality
Repository Management
Update Repository
Web Interface Updates
- Navigate: Go to your repository page
- Edit Files: Click on any file to edit directly in browser
- Upload New Files: Drag and drop additional files
- Commit Changes: Add commit message and save changes
Git-based Updates
Repository Settings
Access repository settings from your repository page:
- Description: Update repository description and tags
- Visibility: Switch between public/private
- Collaborators: Add team members with different permission levels
- Statistics: View download counts, playground usage, and performance metrics
- Integrations: Connect with external tools and services
Best Practices
Code Quality
- Documentation: Include comprehensive README
- Comments: Well-commented code
- Error Handling: Robust error handling
- Testing: Include unit tests when possible
Configuration
- Parameter Validation: Validate input parameters
- Sensible Defaults: Provide reasonable default values
- Clear Descriptions: Document what each parameter does
Performance
- Efficiency: Optimize for performance
- Memory Usage: Consider memory constraints
- Scalability: Test with different problem sizes
Troubleshooting
Common Issues
”Repository Name Already Exists”
- Choose a unique repository name
- Check if you already have a repository with that name
- Consider using versioning in the name (e.g., “my_optimizer_v2”)
“Validation Failed”
- Missing Files: Ensure qubot.py and config.json are present
- Invalid Config: Check config.json syntax using a JSON validator
- Import Errors: Verify all dependencies are listed in requirements.txt
- Class Definition: Ensure your qubot class inherits from BaseOptimizer or BaseProblem
”Upload Timeout”
- Check internet connection stability
- Try uploading smaller files first
- Use Git method for large repositories
- Contact support for repositories >100MB
”Permission Denied”
- Verify you’re logged in with GitHub
- Check that your Rastion token is valid
- Ensure you have repository creation permissions
Getting Help
- Repository Issues: Check the Issues tab on your repository page
- Community Forum: Ask questions at rastion.com/community
- Documentation: Browse Qubots framework docs
- Examples: Study successful repositories in the community
- Support: Contact support through the platform help center
Next Steps
Use in Playground
Test your uploaded repository in the playground
Join Leaderboard
Submit your optimizer to competitions
Create Experiment
Share optimization experiments
Repository Browser
Manage your uploaded repositories
Your repository is now available on Rastion for the community to discover, use, and build upon!