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

Uploaded Python 3

File details

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

File metadata

  • Download URL: auraagent-0.2.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 65f2b3b926f70374c402fa491f203674d3568957e351459e25fe5a0a70e4c0e2
MD5 1aba795ce7055e8bd18eca5cace64a30
BLAKE2b-256 917c4faf121a092a7fb7c88589aceebe513e56744b3d81737031c80111549ba5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: auraagent-0.2.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08021e254f7f5a739ff60f7dac570eb2e9f67eadfd12036d264fb58428f6759a
MD5 d643d16ee0208db9056964523a459fb4
BLAKE2b-256 97c95632da89c99b8aa5de1e8517de30ee1aa936edc785a5741596d7ea4de501

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