AWS Bedrock Model Registry Integration¶
Overview¶
IdeaWeaver integrates with AWS Bedrock for model hosting and deployment. This guide shows you how to use AWS Bedrock with IdeaWeaver for model management and inference.
Setup¶
Train and Deploy a Model¶
source ideaweaver-env/bin/activate
ideaweaver train \
--model sshleifer/tiny-distilbert-base-cased \
--dataset ./datasets/training_data.csv \
--deploy-to-bedrock \
--aws-region us-east-1 \
--aws-access-key-id <your-access-key> \
--aws-secret-access-key <your-secret-key>
Example Output¶
🤗 Using model: sshleifer/tiny-distilbert-base-cased
🚀 Starting model training...
============================================================
🎉 TRAINING SUMMARY
============================================================
📂 Model Path: ./my-model
🤖 Base Model: sshleifer/tiny-distilbert-base-cased
📊 Dataset: ./autotrain_projects/my-model
📊 KEY PERFORMANCE METRICS
----------------------------------------
📉 Final Train Loss: 1.0986
🎯 Overall Accuracy: 20.0%
============================================================
✨ Training completed successfully! Model is ready for use.
============================================================
✅ Training completed successfully!
📁 Model saved to: ./my-model
🚀 Deploying model to AWS Bedrock...
✅ Model deployed successfully to AWS Bedrock
AWS Bedrock Console Example¶
Once your model is deployed, you can view it in the AWS Bedrock Console:
Features¶
- Model hosting
- Serverless deployment
- Auto-scaling
- Cost optimization
- Security features
- Monitoring tools
Configuration¶
Required Parameters¶
--deploy-to-bedrock
: Flag to enable AWS Bedrock deployment--aws-region
: AWS region for deployment--aws-access-key-id
: AWS access key--aws-secret-access-key
: AWS secret key
AWS Credentials Setup¶
- Go to AWS IAM Console
- Create a new IAM user
- Attach necessary permissions
- Generate access keys
- Use keys in your training command
Best Practices¶
- Security
- Use IAM roles
- Enable encryption
-
Monitor access
-
Cost Management
- Set up budgets
- Monitor usage
-
Optimize resources
-
Deployment
- Use appropriate instance types
- Configure auto-scaling
- Set up monitoring
Troubleshooting¶
Common Issues¶
- Authentication Errors
- Verify AWS credentials
- Check IAM permissions
-
Ensure proper access
-
Deployment Issues
- Check region availability
- Verify resource limits
- Monitor CloudWatch logs
Debug Mode¶
Enable verbose output for debugging:
ideaweaver train \
--model sshleifer/tiny-distilbert-base-cased \
--dataset ./datasets/training_data.csv \
--deploy-to-bedrock \
--aws-region us-east-1 \
--verbose