Testing
Write Unit Tests
Create comprehensive tests for your functions:CI/CD Integration
GitHub Actions Workflow
Create.github/workflows/test.yml:
Monitoring and Debugging
Add Logging
Troubleshooting
Reward Function Issues
Problem: Reward functions returning unexpected scores Solutions:- Test locally with sample inputs
- Add print statements or logging
- Verify input format matches expectations
- Check error handling catches all edge cases
- Ensure return type is
float
Rubric Evaluation Issues
Problem: Rubric scores inconsistent or errors Solutions:- Verify API key is set correctly
- Check API key has sufficient credits/quota
- Test with simpler rubric first
- Add error handling around
evaluate_rubriccall - Use
return_details=Trueto see evaluation reasoning - Verify model name is correct for provider
Import Errors
Problem:ModuleNotFoundError or import failures
Solutions:
- Ensure all directories have
__init__.pyfiles - Verify imports use correct paths
- Check dependencies are installed:
pip install -e . - Use absolute imports from package root
- Verify virtual environment is activated
Next Steps
Example Repository
Study the complete reference implementation
Python SDK
Learn more about the Python SDK