Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>EthicAI — AI Ethics AuditorNew to Visual Studio Code? Get it now.
EthicAI — AI Ethics Auditor

EthicAI — AI Ethics Auditor

EthicAiLab

|
1 install
| (0) | Free
Automated ethical audit of AI models: bias, explainability, robustness, AI Act compliance
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
EthicAI logo

EthicAI — AI Ethics Auditor

Audit your ML models for bias, robustness & EU AI Act compliance — in 30 seconds, without leaving VS Code.

Version Installs Rating EU AI Act 100% Local

Bias detection · SHAP explainability · Robustness testing · Compliance reports — all running locally on your machine.


Why EthicAI?

The EU AI Act requires high-risk AI systems to prove they are fair, explainable, robust, and documented. Traditional audits cost €50k–200k and take months. Cloud tools send your test data off-machine — a GDPR risk.

EthicAI brings the audit to the developer. Open your model file, click once, and get a full ethics report in seconds — bias metrics, feature attributions, stress tests, and an EU AI Act checklist — with zero data leaving your machine.

Think SonarQube for code, but for the ethics of your ML models.


✨ Features

Feature What it does
⚖️ Bias Detection Demographic Parity, Equalized Odds & Disparate Impact via Fairlearn. Binary and multi-class.
🔍 Explainability Per-decision feature importance with SHAP (TreeExplainer / KernelExplainer).
🛡️ Robustness Testing Stress tests under Gaussian noise, missing values & feature-scaling shifts.
📋 EU AI Act Compliance 12 automated checks across 9 articles (Art. 9, 10, 11, 12, 13, 14, 15, 17, 72).
💬 Plain-language Summary A verdict your DPO or manager can read — no data-science jargon.
🔧 Fix Suggestions Copy-paste Python snippets to fix each flagged issue (Fairlearn, Pipelines, logging).
📄 Professional Reports Export a polished PDF or machine-readable JSON for auditors and CI.
📊 Team Dashboard Audit history per file in the sidebar, with scores and trend arrows.

🚀 Quick Start

1. Install the extension

From the VS Code Marketplace, or:

code --install-extension ethicai.ethicai

2. Install the Python engine

pip install ethicai

3. Sign in

On first launch you'll see a Sign in with Google screen. Authenticate once — your token is stored securely in VS Code's SecretStorage.

4. Run an audit

Open a Python file or notebook, click the 🛡️ EthicAI icon (activity bar or editor title), pick your file, and watch the report appear.


📝 Your model file just needs four variables

EthicAI imports your script as a module and looks for these at the top level:

model              # any trained sklearn-compatible model
X_test             # test features (NumPy array or DataFrame)
y_test             # true labels (1-D array)
sensitive_features # optional — e.g. df["gender"], enables bias analysis

⚠️ Define them at module level (not inside if __name__ == "__main__":), and avoid blocking calls like plt.show() or input().

Example
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3)
model = RandomForestClassifier().fit(X_train, y_train)
sensitive_features = df.loc[X_test.index, "gender"]

🤖 Supported Models

Framework Support
scikit-learn ✅ Native
PyTorch ✅ via TorchModelWrapper
TensorFlow / Keras ✅ via TFModelWrapper
Classification ✅ Binary & multi-class
from ethicai import TorchModelWrapper, TFModelWrapper

model = TorchModelWrapper(torch_net)   # or TFModelWrapper(keras_model)

📋 EU AI Act Coverage

EthicAI maps each audit result to the EU AI Act (Regulation 2024/1689) — 12 checks across 9 articles:

Article Requirement
Art. 9 Risk Management System
Art. 10 Non-Discrimination · Data Governance
Art. 11 Technical Documentation
Art. 12 Record-Keeping & Logging
Art. 13 Transparency · User Communication
Art. 14 Human Oversight
Art. 15 Robustness · Accuracy Threshold
Art. 17 Quality Management
Art. 72 Fundamental Rights Assessment (FRIA)

🔒 Privacy-First

Your data never leaves your machine. EthicAI runs a local Python subprocess — no cloud, no API keys, no uploads. Training and test data stay on disk. This is what makes EthicAI usable where cloud auditing tools are legally off-limits.


⚙️ Commands & Settings

Commands (Command Palette → "EthicAI")

Command Description
EthicAI: Run Full Audit Audit bias, explainability, robustness & compliance
EthicAI: Detect Bias Bias analysis only
EthicAI: Explain Model SHAP feature importance only
EthicAI: Generate Compliance Report Export PDF / JSON
EthicAI: Inject Audit Cell into Notebook Add an audit cell to a Jupyter notebook
EthicAI: Sign in / Sign out Manage your account

Settings

Setting Default Description
ethicai.pythonPath python Path to a Python interpreter with ethicai installed
ethicai.reportFormat both pdf, json, or both
ethicai.autoDetectModels true Auto-detect ML models in open notebooks
ethicai.auditTimeout 180000 Max audit time (ms) before aborting
ethicai.authBaseUrl — Base URL of the sign-in site

💡 If you use conda/venv, set ethicai.pythonPath to the absolute interpreter path (e.g. /opt/miniconda3/bin/python) so the extension finds the package regardless of how VS Code was launched.


📦 Requirements

  • VS Code 1.85+
  • Python 3.10+ with the ethicai package (pip install ethicai)

🐛 Troubleshooting

Symptom Fix
spawn python ENOENT Set ethicai.pythonPath to your interpreter's absolute path.
Audit "finished but produced no result" Define model, X_test, y_test at module level (not under __main__).
Audit times out Your script may train a heavy model or call plt.show()/input(). Increase ethicai.auditTimeout or remove blocking calls.

Built with Fairlearn · SHAP · scikit-learn · ReportLab · TypeScript

Made with 💜 for responsible AI · Report an issue

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft