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.
Command Overview
The Trustworthy Model Registry CLI provides three primary commands:install
Install project dependencies
test
Run the test suite with coverage
URL_FILE
Process a file of model URLs
install
Installs all dependencies required to run the CLI tool and evaluate models.Syntax
Description
Theinstall command reads requirements.txt and requirements-dev.txt files and installs all listed packages using pip. This ensures your environment has all necessary libraries for:
- Making HTTP requests to model registries
- Parsing Hugging Face model metadata
- Cloning and analyzing Git repositories
- Running tests and coverage analysis
- Processing model files and documentation
What Gets Installed
Core Dependencies (requirements.txt)
Core Dependencies (requirements.txt)
- requests - HTTP client for API calls
- huggingface_hub - Hugging Face API integration
- beautifulsoup4 - HTML/XML parsing
- gitpython - Git repository operations
- fastapi - API framework (for Phase 2)
- uvicorn - ASGI server
- boto3 - AWS SDK (for cloud deployment)
Development Dependencies (requirements-dev.txt)
Development Dependencies (requirements-dev.txt)
- pytest - Testing framework
- coverage - Code coverage measurement
- pytest-mock - Mocking support for tests
- requests-mock - HTTP mocking for tests
Example Output
Return Codes
0- Installation successful1- Installation failed (check error output)
test
Runs the project’s test suite using pytest and reports code coverage.Syntax
Description
Executes all tests in the project and measures line coverage. The command:- Runs pytest in quiet mode (
-q) - Executes pytest under coverage measurement
- Generates a coverage report
- Outputs a summary in the format:
X/Y test cases passed. Z% line coverage achieved.
Example Output
How It Works
The test command internally runs:The test suite validates all metric implementations, URL classification logic, and CLI functionality.
Return Codes
0- All tests passed1- One or more tests failed or pytest/coverage not installed
URL_FILE
Processes a file containing model or dataset URLs and outputs trustworthiness metrics in NDJSON format.Syntax
Parameters
Path to a text file containing URLs to evaluate. Each URL should be on a separate line or comma-separated.
Description
This is the primary command for batch model evaluation. For each URL in the file:- Classifies the resource type (MODEL, DATASET, or CODE)
- Downloads metadata from the source (Hugging Face, GitHub, etc.)
- Computes trustworthiness metrics
- Outputs results as NDJSON (newline-delimited JSON)
URL Classification Rules
Metrics Computed
For each MODEL resource, the following metrics are evaluated:Reproducibility
Reproducibility
Checks for requirements.txt, environment.yml, or pyproject.toml files
License
License
Validates presence and clarity of license information
Size Score
Size Score
Assesses model size suitability for different hardware platforms
Lineage
Lineage
Tracks model dependencies and dataset sources
Reviewedness
Reviewedness
Evaluates documentation quality (README, examples, tutorials)
Bus Factor
Bus Factor
Analyzes contributor diversity in the repository
Code Quality
Code Quality
Checks for CI/CD, tests, and code organization
Output Format
Results are printed as NDJSON (one JSON object per line):Each metric includes both a score (0.0-1.0) and a latency value (milliseconds).
Example Usage
Create a URL file:Parallel Processing
The CLI uses a ThreadPoolExecutor to process multiple models concurrently:- Max workers: min(8, CPU count)
- Timeout per metric: 90 seconds
- Graceful degradation: Failed metrics return 0.0 instead of crashing
Error Handling
File Not Found
Empty File
No output, exit code: 0
Invalid URL
URL is classified as CODE and processed with limited metrics
Return Codes
0- Processing completed successfully1- URL file not found or other error
Global Options
The CLI does not currently support global flags, but you can control behavior via environment variables:Environment Variables
Path to write log output
Set logging verbosity (0=WARNING, 1=INFO, 2=DEBUG)
Disable Hugging Face download progress bars (set to “1”)
Disable tqdm progress bars (set to “1”)