Skip to content

Configuration

Abhishek Gahlot edited this page Mar 27, 2026 · 1 revision

Configuration

Environment variables

Daytona

Variable Required What
DAYTONA_API_KEY For Daytona mode API key from app.daytona.io or self-hosted
DAYTONA_API_URL Self-hosted only API endpoint (cloud is the default)

API Server

Variable Required What
DEEPGYM_API_KEY Production API key for X-API-Key auth
DEEPGYM_NO_AUTH Dev only true to disable auth
DEEPGYM_ALLOW_LOCAL_EXEC Dev only true to allow local subprocess execution

Example .env

DAYTONA_API_KEY=sk-your-daytona-key
DAYTONA_API_URL=http://localhost:3000  # only for self-hosted
DEEPGYM_API_KEY=your-secret-api-key

.env is already in .gitignore.


Timeouts

Where Default How to set
Per-environment 30s Environment(timeout=60)
CLI 30s deepgym run --timeout 60
Multi-turn per-step 30s MultiTurnEnvironment(timeout_per_step=60)
AsyncDeepGym default 30s AsyncDeepGym(default_timeout=60)

Exceeding a timeout raises TimeoutError and sets result.truncated = True.


Directories

~/.deepgym/
  |-- environments/           # downloaded/imported benchmarks
  |   |-- humaneval/
  |   |-- mbpp/
  |   |-- humaneval_plus/
  |   |-- mbpp_plus/
  |   |-- bigcodebench/
  |   |-- registry.json       # environment index
  |-- exploits.db             # adversarial audit results (SQLite)

Parallel limits

Mode Recommended max_parallel
Local 4-8 (match CPU cores)
Daytona (self-hosted) 10-20
Daytona (cloud) 20-100

Logging

import logging
logging.getLogger('deepgym').setLevel(logging.DEBUG)
Level What you see
WARNING (default) Errors and warnings
INFO Sandbox lifecycle, scoring summaries
DEBUG Full payloads, verifier output

API keys and sandbox contents are never logged at INFO. DEBUG only.

Clone this wiki locally