Usage Examples
Practical examples of using the RunRL Python client
Usage Examples
This page provides practical examples of using the RunRL Python client for common tasks.
Basic Setup
First, import the RunRL client and initialize it with your API key:
Managing Prompt Files
For details on prompt file format requirements, see the File Formats documentation.
Uploading a Prompt File
Listing Prompt Files
Getting a Prompt File Preview
Managing Reward Files
For details on reward function format requirements, see the File Formats documentation.
Uploading a Reward File
Listing Reward Files
Creating and Managing Runs
For details on the hyperparameters used when creating a run, see the API Reference documentation.
Creating a Run
Listing Runs
Getting Run Details
Canceling a Run
Monitoring Training Progress
Getting Stored Metrics
Getting Stored Logs
Streaming Logs in Real-time
Working with Models
Downloading a Trained Model
Deploying a Model
Listing Deployments
GPU Pricing
Getting All GPU Prices
Getting Price for a Specific GPU Type
Complete Training Workflow
Here's a complete example that demonstrates a typical workflow from uploading files to creating a run and monitoring progress: