malkhut: configurable friction per scenario + 5h learning test

This commit is contained in:
Codex
2026-07-19 05:47:34 +02:00
parent 3b1dae6cbe
commit db844c775a
3 changed files with 20 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ ASSETS = ["BTCUSDT", "ETHUSDT", "SOLUSDT", "DOGEUSDT", "ADAUSDT",
"AVAXUSDT", "UNIUSDT", "LINKUSDT", "BNBUSDT"]
STEPS_PER_EPISODE = 20
SEED = 42
N_OPPONENTS = 1500
N_OPPONENTS = 500
class ResourceMonitor:
@@ -248,6 +248,11 @@ def main():
except Exception as e:
print(f" Error: {e}", flush=True)
# Memory management: gc.collect every 100 episodes
if fq_n_reports % 100 == 0:
import gc
gc.collect()
# CMA-ES every 15 reports
if fq_n_reports % 15 == 0 and remaining > 600:
try:

View File

@@ -0,0 +1,5 @@
#!/bin/bash
cd /mnt/dolphinng5_predict/MALKHUT
export PYTHONUNBUFFERED=1
export NUMBA_CACHE_DIR=/tmp/numba_cache
python -m malkhut.long_learning_5h >> malkhut/results/long_learning_5h_log.txt 2>&1

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env python3
import os, sys
os.environ['PYTHONUNBUFFERED'] = '1'
os.environ['NUMBA_CACHE_DIR'] = '/tmp/numba_cache'
log = open('/mnt/dolphinng5_predict/MALKHUT/malkhut/results/long_learning_5h_log.txt', 'w')
os.dup2(log.fileno(), 1)
os.dup2(log.fileno(), 2)
os.chdir('/mnt/dolphinng5_predict/MALKHUT')
os.execv(sys.executable, [sys.executable, '-m', 'malkhut.long_learning_5h'])