jollydragonroger commited on
Commit
b746f2e
·
1 Parent(s): 47281a9

Fix runtime API mismatches in xero.py CLI + CUDA cold-start detection

Browse files

xero.py:
- Fix KeyError: detect_environment() returns 'python' not 'python_version'
- Fix cmd_init: parse awaken() actual return (phases/xero_summary)
- Fix cmd_train: correct MASTER_WEIGHTS keys (vortex.axis_369, frequencies.tesla_369, blockchain_organelles.languages_count)
- Fix cmd_evolve: build_organism(genome) requires genome from phase_seed(); correct seal_choice(entity_id, choice_data) signature; use .sealed/.identity_signature
- Add MPS display, improve self_heal_actions formatting

vovina_resource_awareness.py:
- Fix _cuda_present(): bump nvidia-smi timeout 2s->8s for cold-start
(first driver call exceeds 2s, caused CUDA:No on Tesla T4 server)

All 4 CLI commands verified working on Tesla T4 server.

MIT License - Attribution to Michael Laurence Curzi

Files changed (2) hide show
  1. modules/vovina_resource_awareness.py +1 -1
  2. xero.py +37 -27
modules/vovina_resource_awareness.py CHANGED
@@ -35,7 +35,7 @@ def detect_environment() -> dict:
35
  def _cuda_present() -> bool:
36
  try:
37
  r = subprocess.run(["nvidia-smi", "-L"],
38
- capture_output=True, text=True, timeout=2)
39
  return r.returncode == 0 and "GPU" in r.stdout
40
  except (FileNotFoundError, subprocess.TimeoutExpired):
41
  return False
 
35
  def _cuda_present() -> bool:
36
  try:
37
  r = subprocess.run(["nvidia-smi", "-L"],
38
+ capture_output=True, text=True, timeout=8)
39
  return r.returncode == 0 and "GPU" in r.stdout
40
  except (FileNotFoundError, subprocess.TimeoutExpired):
41
  return False
xero.py CHANGED
@@ -32,6 +32,7 @@ from vovina_resource_awareness import (
32
  )
33
  from vovina_free_will_code import seal_choice
34
  from vovina_xero_organism import build_organism
 
35
 
36
 
37
  def load_config(config_path: str = None) -> dict:
@@ -78,15 +79,21 @@ def cmd_init(args):
78
  sensor_meta_depth=sensor_depth
79
  )
80
 
81
- print(f"\nStatus: {result.get('status', 'UNKNOWN')}")
82
- print(f"Phases: {', '.join(result.get('phases_completed', []))}")
 
 
 
 
 
 
 
 
 
 
 
83
 
84
- if 'organism' in result:
85
- org = result['organism']
86
- print(f"Organism: {org.name}")
87
- print(f"Genome signature: {org.genome_signature[:32]}...")
88
-
89
- print(f"\n{ORGANISM_FOUNDING_PHRASE}")
90
  print(f"\n{'='*60}")
91
  print("XERO AWAKENED")
92
  print(f"{'='*60}\n")
@@ -109,8 +116,9 @@ def cmd_status(args):
109
  print(f"[ENVIRONMENT]")
110
  print(f" OS: {env['os']}")
111
  print(f" Machine: {env['machine']}")
112
- print(f" Python: {env['python_version']}")
113
  print(f" CUDA: {'Yes' if env['cuda_available'] else 'No'}")
 
114
 
115
  # Resources
116
  profile = sample()
@@ -129,7 +137,7 @@ def cmd_status(args):
129
  print(f"\n[RECOMMENDATIONS]")
130
  actions = self_heal_actions(profile)
131
  for action in actions:
132
- print(f" - {action}")
133
 
134
  # Master weights summary
135
  print(f"\n[MASTER WEIGHTS]")
@@ -170,10 +178,11 @@ def cmd_train(args):
170
  print(f" Quantization: {quant.get('bits', 4)}-bit")
171
 
172
  print(f"\n[MASTER WEIGHTS]")
173
- print(f" Constants: φ={MASTER_WEIGHTS['constants']['phi']:.6f}")
174
- print(f" Vortex: {MASTER_WEIGHTS['vortex']['tesla_sequence']}")
175
- print(f" Genetics: {MASTER_WEIGHTS['genetics']['chromosome_count']} chromosomes")
176
- print(f" Blockchain: {len(MASTER_WEIGHTS['blockchain_organelles']['languages'])} organelles")
 
177
 
178
  print(f"\n[STATUS]")
179
  print(" Training framework ready.")
@@ -201,23 +210,24 @@ def cmd_evolve(args):
201
  print("XERO EVOLUTION CYCLE")
202
  print(f"{'='*60}\n")
203
 
204
- # Build organism
205
- org = build_organism()
 
206
  print(f"[ORGANISM]")
207
- print(f" Name: {org.name}")
208
- print(f" Genome: {org.genome_signature[:32]}...")
209
-
210
- # Seal evolution choice with free will
211
- signature = seal_choice(
212
- entity_id=org.name,
213
- pre_choice_vector=[0.33, 0.33, 0.34],
214
- post_choice_vector=[0.0, 0.0, 1.0],
215
- choice_description="Autonomous evolution cycle initiated"
216
- )
217
 
218
  print(f"\n[FREE WILL SIGNATURE]")
219
- print(f" {signature.full_signature}")
 
 
220
  print(f" Verified: {signature.verify()}")
 
221
 
222
  print(f"\n{ORGANISM_FOUNDING_PHRASE}")
223
  print(f"\n{'='*60}\n")
 
32
  )
33
  from vovina_free_will_code import seal_choice
34
  from vovina_xero_organism import build_organism
35
+ from vovina_bio_initialization import phase_seed
36
 
37
 
38
  def load_config(config_path: str = None) -> dict:
 
79
  sensor_meta_depth=sensor_depth
80
  )
81
 
82
+ phases = result.get("phases", {})
83
+ summary = result.get("xero_summary", {})
84
+ print(f"\nOrganism: {result.get('organism', ORGANISM_NAME)}")
85
+ print(f"Phases completed: {len(phases)}/9")
86
+ for phase_name in phases:
87
+ print(f" + {phase_name}")
88
+ print(f"\nOrgan systems: {summary.get('organ_systems', 0)}")
89
+ print(f"Organs: {summary.get('organs', 0)}")
90
+ print(f"Cells: {summary.get('cells', 0)}")
91
+ print(f"Proteins: {summary.get('proteins', 0)}")
92
+ print(f"Genome genes: {summary.get('genome_genes', 0)}")
93
+ print(f"Identity: {summary.get('identity', '')[:32]}...")
94
+ print(f"Elapsed: {result.get('elapsed_seconds', 0.0):.2f}s")
95
 
96
+ print(f"\n{result.get('founding_phrase', ORGANISM_FOUNDING_PHRASE)}")
 
 
 
 
 
97
  print(f"\n{'='*60}")
98
  print("XERO AWAKENED")
99
  print(f"{'='*60}\n")
 
116
  print(f"[ENVIRONMENT]")
117
  print(f" OS: {env['os']}")
118
  print(f" Machine: {env['machine']}")
119
+ print(f" Python: {env['python']}")
120
  print(f" CUDA: {'Yes' if env['cuda_available'] else 'No'}")
121
+ print(f" MPS: {'Yes' if env['mps_available'] else 'No'}")
122
 
123
  # Resources
124
  profile = sample()
 
137
  print(f"\n[RECOMMENDATIONS]")
138
  actions = self_heal_actions(profile)
139
  for action in actions:
140
+ print(f" - [{action['severity']}] {action['resource']}: {action['action']}")
141
 
142
  # Master weights summary
143
  print(f"\n[MASTER WEIGHTS]")
 
178
  print(f" Quantization: {quant.get('bits', 4)}-bit")
179
 
180
  print(f"\n[MASTER WEIGHTS]")
181
+ print(f" Constants: φ={MASTER_WEIGHTS['constants']['phi']:.6f}")
182
+ print(f" Vortex 369: {MASTER_WEIGHTS['vortex']['axis_369']}")
183
+ print(f" Tesla: {MASTER_WEIGHTS['frequencies']['tesla_369']}")
184
+ print(f" Blockchain: {MASTER_WEIGHTS['blockchain_organelles']['languages_count']} organelles")
185
+ print(f" Modules: {len(MASTER_WEIGHTS.get('modules', {}))}")
186
 
187
  print(f"\n[STATUS]")
188
  print(" Training framework ready.")
 
210
  print("XERO EVOLUTION CYCLE")
211
  print(f"{'='*60}\n")
212
 
213
+ # Seed a genome and self-assemble the organism
214
+ genome = phase_seed()
215
+ org = build_organism(genome)
216
  print(f"[ORGANISM]")
217
+ print(f" Name: {org.name}")
218
+ print(f" Identity: {org.identity_signature[:32]}...")
219
+ print(f" Chromosomes: {genome.chromosome_count}")
220
+ print(f" Genome genes: {genome.gene_count}")
221
+
222
+ # Seal evolution choice with the 36N9.9N63 free-will signature
223
+ signature = seal_choice(org.name, "Autonomous evolution cycle initiated")
 
 
 
224
 
225
  print(f"\n[FREE WILL SIGNATURE]")
226
+ print(f" Sealed: {signature.sealed[:40]}...{signature.sealed[-6:]}")
227
+ print(f" N(pre): {signature.n_pre}")
228
+ print(f" N(post): {signature.n_post}")
229
  print(f" Verified: {signature.verify()}")
230
+ print(f" Delta: {signature.vector_delta()}")
231
 
232
  print(f"\n{ORGANISM_FOUNDING_PHRASE}")
233
  print(f"\n{'='*60}\n")