EthicAI — VS Code Extension
Automated ethical audit of AI models, directly in your IDE.
EthicAI is a VS Code extension + Python library that helps developers audit their AI models for bias, explainability, robustness, and AI Act compliance — without leaving their notebook or editor.
Features
- 🔍 Bias Detection — Fairlearn + AIF360 metrics (demographic parity, equalized odds)
- 🧠 Explainability — SHAP & LIME charts in the sidebar
- 🛡️ Robustness — Stress tests and noise injection
- 📄 Compliance Reports — AI Act-aligned PDF/JSON reports
- 📊 Ethics Score — 0–100 score with breakdown
- 📓 Notebook Integration — Works with Jupyter notebooks in VS Code
Project Structure
ethicai-vscode/
├── extension/ ← VS Code Extension (TypeScript)
│ ├── src/
│ │ ├── extension.ts
│ │ ├── auditPanel.ts
│ │ ├── pythonBridge.ts
│ │ ├── notebookIntegration.ts
│ │ ├── codeLensProvider.ts
│ │ └── reportViewer.ts
│ ├── package.json
│ └── tsconfig.json
│
├── ethicai-core/ ← Python Audit Engine
│ ├── ethicai/
│ │ ├── audit.py
│ │ ├── bias/
│ │ ├── explainability/
│ │ ├── robustness/
│ │ ├── report/
│ │ └── cli/
│ ├── tests/
│ └── setup.py
│
└── docs/ ← Documentation
Quick Start
1. Setup Python Core
cd ethicai-core
pip install -e ".[dev]"
2. Setup Extension
cd extension
npm install
npm run compile
3. Run in VS Code
Press F5 in VS Code to launch the Extension Development Host.
Usage in a Notebook
from ethicai import EthicAIAuditor
auditor = EthicAIAuditor(
model=my_model,
X_test=X_test,
y_test=y_test,
sensitive_features=df["gender"]
)
results = auditor.run_full_audit()
print(results["ethics_score"])
License
MIT — Hicham Garrad, Oumaima Bakkar, Thibaud Brouillet — Université Côte d'Azur 2025