Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GingerlyData247/SOTeam4-P2/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before setting up the Trustworthy Model Registry locally, ensure you have the following installed:Python 3.12
Required Python version for running the application
Git
Version control system for cloning the repository
AWS Account
Free tier AWS account for S3 storage and authentication
Installation
Clone the Repository
Create Virtual Environment
Create and activate a Python virtual environment:Install Dependencies
Install all required packages fromrequirements.txt:
- FastAPI (>=0.115) - Web framework
- Uvicorn (>=0.30) - ASGI server
- Pydantic (>=2.8) - Data validation
- Boto3 (>=1.34) - AWS SDK
- Mangum (>=0.17) - AWS Lambda adapter
- HuggingFace Hub - Model metadata fetching
- GitPython - Repository analysis
- BeautifulSoup4 - HTML parsing
The complete list of dependencies can be found in the
requirements.txt file in the repository root.Configuration
Environment Variables
Create a.env file in the project root with the required environment variables:
.env
For local development, you can set
LOCAL_STORAGE=1 to use local filesystem storage instead of S3. Artifacts will be stored in /tmp/local-artifacts/.AWS Credentials
Ensure your AWS credentials are configured. You can either:-
Use AWS CLI configuration:
-
Set environment variables:
- Use IAM roles (recommended for EC2/Lambda deployments)
Running Locally
Start the Development Server
Run the application using Uvicorn:--reload flag enables auto-reload on code changes, which is useful during development.
Alternative: Using Python Module
You can also run the application directly as a Python module:Custom Port and Host
To run on a different port or host:Accessing the API
Interactive API Documentation (Swagger UI)
Once the server is running, access the interactive API documentation at:- Complete API endpoint documentation
- Interactive request/response testing
- Schema definitions
- Authentication configuration
Alternative API Documentation (ReDoc)
Alternatively, access the ReDoc documentation at:Health Check Endpoint
Verify the application is running correctly:CLI Commands
The registry also provides command-line functionality for Phase 1 compatibility:Install Dependencies
Run Tests
Process URL File
Testing the Installation
1. Check Health Endpoint
2. Ingest a Model
3. List Artifacts
Troubleshooting
Module Import Errors
Module Import Errors
Ensure your
PYTHONPATH includes the project root:S3 Connection Errors
S3 Connection Errors
- Verify your AWS credentials are configured correctly
- Check that the S3 bucket exists and is in the correct region
- Ensure your AWS user has appropriate S3 permissions
- For local development, consider setting
LOCAL_STORAGE=1
Port Already in Use
Port Already in Use
If port 8000 is already in use, specify a different port:
HuggingFace API Errors
HuggingFace API Errors
- Set
HUGGINGFACE_HUB_TOKENin your.envfile for rate limit increases - Some models require authentication to access
Next Steps
Configuration
Learn about all available environment variables
AWS Deployment
Deploy to AWS Lambda and API Gateway