Spaces:
Running
Running
Deploy Aureon OS (deploy/selfhost stack: nginx edge + fusion API x2 + console + HNC organ + redis + postgres; paper mode) (part 19)
da0ce7b verified Download scripts/diagnostics/check_coherence_lambda.py from GaryLeckey/aureon-os: direct link, hf CLI and curl.
- Browser
- Download file 2.31 kB
-
https://huggingface.co/spaces/GaryLeckey/aureon-os/resolve/main/scripts/diagnostics/check_coherence_lambda.py
- Command line
-
hf download hf://spaces/GaryLeckey/aureon-os/scripts/diagnostics/check_coherence_lambda.py
-
curl -L -o check_coherence_lambda.py https://huggingface.co/spaces/GaryLeckey/aureon-os/resolve/main/scripts/diagnostics/check_coherence_lambda.py
2.31 kB
| #!/usr/bin/env python | |
| """Check current Batten Matrix readings from live system.""" | |
| import json | |
| # Try to read from global state if it exists | |
| try: | |
| import aureon_probability_nexus | |
| state = getattr(aureon_probability_nexus, 'SUBSYSTEM_STATE', {}) | |
| print('\nπ BATTEN MATRIX - COHERENCE Γ LAMBDA Γ PROBABILITY READINGS:\n') | |
| print('=' * 80) | |
| if not state: | |
| print('\nβ οΈ SUBSYSTEM_STATE is empty - system may still be initializing') | |
| print(' The Probability Nexus collects data over time before generating metrics.') | |
| else: | |
| print(f'\nβ Found metrics for {len(state)} symbols:\n') | |
| for symbol, metrics in list(state.items())[:10]: | |
| clarity = metrics.get('avg_clarity', 0) | |
| coherence = metrics.get('avg_coherence', 0) | |
| chaos = metrics.get('chaos', 0) | |
| chaos_trend = metrics.get('chaos_trend', 'stable') | |
| price = metrics.get('latest_price', 0) | |
| # Calculate confidence (same as in make_predictions) | |
| confidence = (clarity / 5.0) * 0.5 + coherence * 0.5 | |
| # Estimate lambda (stability) - inverse of chaos | |
| lambda_stability = max(0, 1 - chaos) if chaos > 0 else 0.5 | |
| # Batten Matrix Score | |
| score = coherence * lambda_stability * confidence | |
| print(f'{symbol:12s}') | |
| print(f' π Coherence: {coherence:.4f}') | |
| print(f' β‘ Lambda: {lambda_stability:.4f}') | |
| print(f' π² Confidence: {confidence:.4f}') | |
| print(f' π SCORE: {score:.6f} {"π’ PASS" if score >= 0.618 else "π΄ FAIL"}') | |
| print(f' π Clarity: {clarity:.2f} | Chaos: {chaos:.4f} ({chaos_trend})') | |
| print() | |
| print('=' * 80) | |
| print('\nπ‘ Note: Batten Matrix requires Score β₯ 0.618 (Ο golden ratio) for 4th pass execution') | |
| print(' Formula: Score = Coherence Γ Lambda Γ Confidence\n') | |
| except Exception as e: | |
| print(f'\nβ Error accessing Probability Nexus state: {e}') | |
| print('\nπ‘ The system may need more runtime to collect coherence/lambda metrics.') | |
| print(' These values build up as the scanner processes market data.\n') | |