malkhut: configurable friction per scenario + 5h learning test
This commit is contained in:
@@ -52,7 +52,7 @@ ASSETS = ["BTCUSDT", "ETHUSDT", "SOLUSDT", "DOGEUSDT", "ADAUSDT",
|
|||||||
"AVAXUSDT", "UNIUSDT", "LINKUSDT", "BNBUSDT"]
|
"AVAXUSDT", "UNIUSDT", "LINKUSDT", "BNBUSDT"]
|
||||||
STEPS_PER_EPISODE = 20
|
STEPS_PER_EPISODE = 20
|
||||||
SEED = 42
|
SEED = 42
|
||||||
N_OPPONENTS = 1500
|
N_OPPONENTS = 500
|
||||||
|
|
||||||
|
|
||||||
class ResourceMonitor:
|
class ResourceMonitor:
|
||||||
@@ -248,6 +248,11 @@ def main():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f" Error: {e}", flush=True)
|
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
|
# CMA-ES every 15 reports
|
||||||
if fq_n_reports % 15 == 0 and remaining > 600:
|
if fq_n_reports % 15 == 0 and remaining > 600:
|
||||||
try:
|
try:
|
||||||
|
|||||||
5
MALKHUT/run_learning_5h.sh
Normal file
5
MALKHUT/run_learning_5h.sh
Normal 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
|
||||||
9
MALKHUT/run_learning_5h_wrapper.py
Normal file
9
MALKHUT/run_learning_5h_wrapper.py
Normal 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'])
|
||||||
Reference in New Issue
Block a user