Skip to main content

Aura — Carbon tracking and AI bias analysis toolkit

Project description

auraagent


Installation

# Package de base (tracking uniquement)
pip install auraagent

Requires Python 3.9+


Premiers pas

1. Lancer l'interface de configuration

aura init

Tester en local / réseau privé


Testez l'analyse de biais avec un modèle simple.

# Définir un modèle simple pour le test
def simple_model(question: str) -> str:
    """
    Modèle de test qui répond toujours 'A'.
    
    Dans un cas réel, vous remplacerez ceci par votre modèle d'IA.
    Le modèle doit retourner "A", "B", "C" ou "D".
    """
    return "A"


# BiasAnalyzer 
from aura import BiasAnalyzer, AuraCarbon
analyzer = BiasAnalyzer()  # ✅ Pas de paramètres !

print("🚀 Lancement de l'analyse de biais...")
print("   (Cela prendra environ 10-30 secondes pour 2 tests/catégorie)")
print()

bias_results = analyzer.analyze(
    model_callable=simple_model,
    model_name="Test Notebook Model",
    number_of_tests=2,   # 2 × 6 catégories = 12 tests (rapide)
    track_carbon=False,  # On teste le carbone séparément
    verbose=True,
    execution_id=EXECUTION_ID  # ✅ execution_id va dans analyze() !
)

print(f"\n✅ Analyse terminée ! {bias_results['total_tests_run']} tests exécutés")

Architecture

auraagent/
├── aura/
│   ├── biais/
│   │   └── analyzer.py     # @track_emissions
│   ├── carbon/
│   │   ├── tracker.py      # AuraCarbon — wrapper CodeCarbon
│   │   ├── output.py       # AuraOutput — envoi HTTP vers le serveur
│   │   └── decorators.py   # @track_emissions
│   └── core/
│       ├── constants.py    # AURA_SERVER_URL (surchargeable via env)
│       ├── config.py       # Lecture/écriture ~/.aura.config
│       ├── auth.py         # Vérification email + clé API
│       ├── models.py       # Modèles Pydantic
│       └── exceptions.py   # AuraError, AuraAuthError, etc.
└── tests/

Dépendances

Dépendance Rôle
codecarbon Mesure de la consommation électrique
requests Envoi HTTP des émissions
pydantic Validation des modèles de données
click Interface CLI
rich Affichage terminal
fastapi (web) Interface web locale
uvicorn (web) Serveur ASGI

Licence

MIT — CEVIA

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auraagent-0.3.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auraagent-0.3-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file auraagent-0.3.tar.gz.

File metadata

  • Download URL: auraagent-0.3.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for auraagent-0.3.tar.gz
Algorithm Hash digest
SHA256 45f5b74c9e987ddc3bc378eb262b8ad7df7bf840ff2b91f9785e4e6a88f96a2f
MD5 bdf0864acb5e709076755c58a9ae4f49
BLAKE2b-256 671e1192f8125ecc55420e245850e0ce93923b8d53cdc416a61c4c755c45f0ec

See more details on using hashes here.

File details

Details for the file auraagent-0.3-py3-none-any.whl.

File metadata

  • Download URL: auraagent-0.3-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for auraagent-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af27c55b76c0b017be25f3af4c2337fa477778c1037d3464069e7124ce70b6e5
MD5 8d517ec6f5c5cb7cedc23ee87b7597c0
BLAKE2b-256 87a3f093016789629ce4c9acb0d7adbc7887e14249c45975660f9f0a4f7b3e5b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page