Spaces:
No application file
No application file
File size: 1,260 Bytes
d625688 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
from dataclasses import MISSING, dataclass
import typing
import multiprocessing as mp
from hydra.core.config_store import ConfigStore
from map_elites import common as cm
@dataclass
class Config:
"""This class provides a "schema" for the config file, validating types."""
RANDOM_INIT_NETS: int = 10 # INIT Nets to be accepted in archive
INIT_NUM_NETS: int = 10 # INIT Nets created per generation
ROLL_OUTS: int = 4 # For GPU training. ROLL_OUTS * (INIT_NUM_NETS or NUM_NETS) = Total nets created in each generation
NUM_NETS: int = 10 # Mutation and crossover nets to be created
START_FROM_CHECKPOINT: bool = False
RANDOM_NETWORKS: bool = False
MUTATION: str = "codegen-6B-mono"
#MUTATION: str = "codex"
GENERATIONS: int = 200
NET_TRAINING_EPOCHS: int = 50
TEMPERATURE: float = 0.0000000
DEVICE: str = "cuda" # options: ["cuda", "cpu", "both"]
NUM_PROCESSES: int = mp.cpu_count() - 1
RAY: bool = True
NUM_CPUS: int = NUM_PROCESSES
NUM_GPUS: int = 1 # per task
NUM_GPUS_TOTAL: int = 4 # total available
# MAP-ELITES
DIM_MAP: int = 2
N_NICHES: int = 100
SAVE_DIR: str = "./"
cs = ConfigStore.instance()
cs.store(name="base_config", node=Config)
|