Troubleshooting
Solutions for common issues with the RunRL Python client
Troubleshooting
This guide provides solutions for common issues you might encounter when using the RunRL Python client.
Authentication Issues
Invalid API Key
Symptom: You receive an AuthenticationError
when initializing the client.
Solution:
- Verify that your API key is correct and starts with
rl-
- Check if your API key has expired or been revoked
- Generate a new API key from the RunRL dashboard
API Key Environment Variable Not Set
Symptom: You get a ValueError
when trying to get the API key from an environment variable.
Solution:
- Ensure you've set the environment variable correctly
- Check for typos in the environment variable name
- Verify the environment variable is accessible in your current session
File Upload Issues
File Not Found
Symptom: You get a FileNotFoundError
when trying to upload a file.
Solution:
- Check if the file exists at the specified path
- Verify the path is correct (absolute vs. relative)
- Ensure you have read permissions for the file
Invalid File Format
Symptom: Your file upload is rejected by the API.
Solution:
- Ensure your file is in the correct format (e.g., .jsonl for prompt files and .py for reward files)
- Validate the file content before uploading
- Check for any formatting errors in the file
Run Creation Issues
Missing Required Parameters
Symptom: You get a ValueError
about missing required arguments when creating a run.
Solution:
- Ensure you're providing all required parameters (
model_name
,prompt_file
,reward_file
) - Check for typos in parameter names
- Verify the parameter values are valid
Turbo Mode Constraints
Symptom: You get a ValueError
about turbo mode requiring specific GPU settings.
Solution:
- When using
turbo=True
, ensuregpu_type="H100"
andn_gpus=8
- Alternatively, set
turbo=False
if you want to use different GPU settings
Resource Not Found Issues
Run Not Found
Symptom: You get a NotFoundError
when trying to access a run.
Solution:
- Verify the run ID is correct
- Check if the run has been deleted
- Ensure you have permission to access the run
File Not Found
Symptom: You get a NotFoundError
when trying to access a file.
Solution:
- Verify the file ID is correct
- Check if the file has been deleted
- Ensure you have permission to access the file
Network and API Issues
Connection Errors
Symptom: You get a RunRLError
with a message about HTTP request failure.
Solution:
- Check your internet connection
- Verify the API endpoint is accessible
- Check if there are any firewall or proxy issues
API Server Errors
Symptom: You get an APIServerError
with a 5xx status code.
Solution:
- The issue is on the server side, not your code
- Wait and try again later
- Check the RunRL status page for any reported outages
Asynchronous Operations
Streaming Logs Issues
Symptom: You get an error when trying to use stream_logs()
.
Solution:
- Ensure you're using the async function correctly
- Use
asyncio.run()
to run the async function from synchronous code - If in an environment that already has an event loop (e.g., Jupyter), use a different approach
For Jupyter notebooks or environments with an existing event loop:
Debugging Tips
Enable Verbose Logging
To get more information about what's happening, you can enable verbose logging:
Inspect Request and Response Details
For advanced debugging, you can use a request session with a custom event hook:
Common Error Messages and Solutions
Error Message | Likely Cause | Solution |
---|---|---|
"Authentication failed: Unauthorized" | Invalid API key | Check your API key and regenerate if necessary |
"Missing required arguments" | Required parameters not provided | Ensure all required parameters are included |
"Resource not found" | Invalid ID or deleted resource | Verify the resource ID and check if it exists |
"Permission denied" | Insufficient permissions | Ensure you have the necessary permissions for the operation |
"Turbo mode requires 8xH100 GPUs" | Incompatible GPU settings with turbo mode | Use H100 GPUs with n_gpus=8, or set turbo=False |
"HTTP request failed" | Network or connectivity issue | Check your internet connection and try again |
"Server error" | Issue on the RunRL server | Wait and try again later |
Getting Help
If you're still experiencing issues after trying the solutions in this guide:
- Check the RunRL documentation for updates
- Contact RunRL support at founders@runrl.com
- Visit the RunRL dicussion board for help from other users