Skip to content

Installation Guide

This guide provides detailed installation instructions for KARMA on different platforms and environments.

KARMA can be installed through pip and also uv

Installing UV Run this command

Terminal window
curl -LsSf https://astral.sh/uv/install.sh | sh

Or see UV docs here - https://docs.astral.sh/uv/getting-started/installation/

Terminal window
pip install karma-medeval
Terminal window
karma --version

For audio-related datasets and ASR metrics:

Terminal window
pip install "karma-medeval[audio]"

This includes:

  • jiwer - Word Error Rate calculations
  • num2words - Number to word conversion
  • torchaudio - Audio processing

Install the development dependencies through pip

Terminal window
pip install "karma-medeval[all]"
Terminal window
# Clone the repository
git clone https://github.com/eka-care/KARMA-OpenMedEvalKit.git
cd KARMA-OpenMedEvalKit

Then run either of these commands for developer installation

Install the development dependencies through pip

Terminal window
pip install -e .

Install the development dependencies through pip

Terminal window
pip install -e ".[all]"

Create a .env file in your project root:

Terminal window
# Required: HuggingFace token for model downloads
HUGGINGFACE_TOKEN=your_token_here
# Cache configuration
KARMA_CACHE_TYPE=duckdb
KARMA_CACHE_PATH=./cache.db
# Logging
LOG_LEVEL=INFO
# Optional: OpenAI API key (for certain metrics)
OPENAI_API_KEY=your_openai_key
# Optional: DynamoDB configuration (for production)
# KARMA_CACHE_TYPE=dynamodb
# AWS_REGION=us-east-1
# DYNAMODB_TABLE_NAME=karma-cache

To access gated models or datasets, set this environment variable with your Huggingface token.

You can see the guide to create tokens here

Terminal window
# Login to HuggingFace
huggingface-cli login
# Or set environment variable
export HUGGINGFACE_TOKEN=your_token_here