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.2.1.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.2.1.3-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: auraagent-0.2.1.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.2.1.3.tar.gz
Algorithm Hash digest
SHA256 aac2dd0c6337c2405a9f42a32fa71e85dbdf2352fefa007bad1d2cd4cabc0f86
MD5 149674e998ccc41e3d4044b2576014b8
BLAKE2b-256 416ea4b4e4aa5775cf2006080c96642dfa04b33b4b8ea652c2284c4060b9c592

See more details on using hashes here.

File details

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

File metadata

  • Download URL: auraagent-0.2.1.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.2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 efb3c6caa9197f369ef3b8f1a6d12b2ff1a0c537f27493b4e4038a9307af8c56
MD5 8eeeaf7385a9e225b1d8a58971a8e99f
BLAKE2b-256 ebb459fa97a2a60699b86bf36d9892919af924c4652c5698c3dfce1df3fb5d90

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