Skip to content

Releases: harshitthek/paint-code-rl

v0.2.0: Multi-Signal Visual RL, Dual-GPU Saturation & Interactive Cyclic Training

Choose a tag to compare

@harshitthek harshitthek released this 04 Sep 11:09

What's Changed in v0.2.0

🎨 Multi-Signal Verifiable Visual Reward Matrix

  • 5-Tier Hierarchical Scoring Engine: Evaluates generated generative art with linear weighted composite signals:
    1. Compile Gate (0.10): Categorizes outcomes (SUCCESS, PARSE_ERROR, RUNTIME_ERROR, NO_CANVAS, TIMEOUT).
    2. Prompt Alignment CLIP (0.35): Zero-cost ViT-B/32 multimodal semantic cosine similarity.
    3. Visual Richness (0.25): Edge variance ($\nabla^2 I$), color entropy, palette spread, and anti-barcode anisotropy.
    4. Brush Utilization (0.15): Validates authentic natural media brush primitives with anti-cheat protections.
    5. Global Aesthetic (0.15): Compositional harmony and color richness scoring.
  • Explainable Diagnostic Scorecards: Real-time critique explaining why generated artwork passed or failed.

⚡ Dual-GPU Saturation & --max Mode

  • Dual-GPU Distributed Training: Auto-probes multiple GPUs (e.g. Kaggle 2x Tesla T4), distributing policy generation and CLIP evaluation across ranks with NCCL gradient synchronization.
  • Hardware Optimizer: Dynamically configures PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True", TF32 tensor cores, and CuDNN benchmarking.
  • Per-Rank VRAM Scaling: Batch sizes ($G=4 \rightarrow 6/8$) and token budgets scale to available single-device VRAM.

🔄 Interactive Cyclic Continuous Training

  • Human-in-the-Loop Cycles: Train in discrete, inspectable cycles (--steps-per-cycle 25).
  • Dynamic Temperature Annealing: Smooth exponential decay from $T=0.85$ (creative exploration) down to $T=0.55$ (stable convergence).
  • Live HTML Dashboard: Auto-refreshing visual dashboard (artifacts/dashboard.html) with interactive loss/temperature charts and rendered artwork galleries.

🛡️ Headless WebGL Sandbox Hardening

  • Concurrent Batch Renderer: High-throughput Puppeteer daemon (POST /render_batch) with in-memory base64 streaming.
  • Lexical Sandbox & Token Balancing: JavaScript tokenizer balances nested delimiters while ignoring delimiters in strings, regex literals, and comments.
  • Source Exfiltration Protection: Interception blocks outbound HTTP requests and local filesystem exfiltration (server.js).
  • Token-Authenticated Shutdown: Direct container invocation enforces fail-fast token authentication.

🚀 Hub Models & Cloud Workflows


🧪 Verification & Test Coverage

  • 148 / 148 Tests Passing (100% Green):
    • 107 Python Unit, Integration, Hardening & Telemetry Tests (pytest)
    • 10 Node.js Sandbox Security Smoke Tests (npm test)
    • 10 WebGL / p5.brush Visual Corpus Tests (node test_corpus.js)
    • 21 WebGL Adversarial Stress Tests (node test_adversarial_corpus.js)
    • 0 Secrets Found (python scripts/tools/secret_scan.py)