Command Line Interface Guide
Overview
ORruns provides a command-line interface (CLI) for managing experiments and analyzing results.
Basic Commands
List Experiments
# List last 10 experiments
orruns list
# List all experiments
orruns list --all
# Filter experiments by pattern
orruns list --pattern "tsp_*"
# Show detailed information
orruns list --detailed
View Experiment Details
# View experiment summary
orruns info experiment_name
# View specific run details
orruns info experiment_name --run-id run_20240315_123456
# Export metrics to CSV
orruns info experiment_name --export metrics.csv
Export Data
# Export experiment metrics
orruns export experiment_name --metrics objective,time,gap
# Export artifacts
orruns export experiment_name --run-id run_20240315_123456 --output ./exports
# Export specific artifact types
orruns export experiment_name --artifacts figures,data
Query Experiments
# Query by parameters
orruns query --params "solver=cplex,n_cities>20"
# Query by metrics
orruns query --metrics "objective<1000,gap<0.01"
# Sort results
orruns query --sort-by "metrics.objective" --ascending
Clean Up
# Delete specific experiment
orruns delete experiment_name
# Delete old experiments
orruns clean --days 30
# Force delete without confirmation
orruns delete experiment_name --force
Advanced Usage
Comparing Experiments
# Compare multiple experiments
orruns compare exp1 exp2 --metrics objective,time
# Export comparison results
orruns compare exp1 exp2 --export comparison.csv
# Visualize comparison
orruns compare exp1 exp2 --plot
Configuration
# Show current configuration
orruns config show
# Set data directory
orruns config set data_dir /path/to/data
# Reset configuration
orruns config reset
Examples
Analyzing Experiment Results
# Get experiment history
orruns history tsp_experiment --metrics objective
# Plot convergence
orruns plot tsp_experiment --metric objective --type line
# Export statistics
orruns stats tsp_experiment --export stats.csv
Batch Operations
# Export multiple experiments
orruns export "tsp_*" --metrics objective,time
# Clean up old experiments
orruns clean --pattern "test_*" --days 7
# Compare multiple runs
orruns compare exp1 exp2 exp3 --metrics objective
Tips
- Using Patterns
- Use
*for wildcard matching - Use
?for single character matching -
Patterns are case-sensitive
-
Output Formats
- Default: Human-readable format
--json: JSON output--csv: CSV format-
--quiet: Minimal output -
Error Handling
- Use
--debugfor detailed error messages - Use
--forceto skip confirmations - Use
--retryfor network operations
Environment Variables
ORRUNS_DATA_DIR: Default data directoryORRUNS_CONFIG: Custom config file pathORRUNS_LOG_LEVEL: Logging level