Installation
Requirements
Python 3.8 or higher
pip package manager
Git (for development installation)
Basic Installation
Install MedExplain-Evals using pip:
git clone https://github.com/heilcheng/MedExplain-Evals.git
cd MedExplain-Evals
pip install .
This command uses the setup.py file to install the package and its dependencies correctly. The setup.py file automatically handles all core dependencies defined in the install_requires section.
Development Installation
For development, install in editable mode with additional dependencies:
git clone https://github.com/heilcheng/MedExplain-Evals.git
cd MedExplain-Evals
pip install -e .[dev]
This installs additional tools for development:
pytest for testing
black for code formatting
flake8 for linting
mypy for type checking
Optional Dependencies
Some features require additional packages:
Machine Learning Components:
pip install torch transformers sentence-transformers
Natural Language Processing:
pip install spacy scispacy
python -m spacy download en_core_web_sm
Documentation Building:
pip install sphinx sphinx-rtd-theme myst-parser
Configuration
Create logs directory:
mkdir logs
Set up API keys (required for LLM-as-a-judge evaluation):
export OPENAI_API_KEY="your-openai-api-key"
export ANTHROPIC_API_KEY="your-anthropic-api-key"
Verify installation:
python -c "from src.benchmark import MedExplain; print('Installation successful!')"
Docker Installation (Optional)
For a containerized environment:
# Build the Docker image
docker build -t medexplain-evals .
# Run the container
docker run -it medexplain-evals
Troubleshooting
Common Issues:
Import errors: Ensure all dependencies are installed
API key errors: Set environment variables correctly
Permission errors: Use virtual environment or user installation
Getting Help:
Check the GitHub Issues page
Review the documentation
Contact the development team