This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
generated from minerllabs/basalt_2022_competition_submission_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train.py
64 lines (50 loc) · 1.55 KB
/
train.py
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from xirl_zero.main_trainer import Config
from train_xirl_zero import run_train_loop
from xirl_zero.trainers.muzero_dynamics import MuZeroDynamicsConfig
from xirl_zero.trainers.tcc_representation import TCCConfig
EVAL_STEPS = 0 # no eval (?)
USE_WANDB = False
WATERFALL_CONFIG = Config(
minerl_env_id="MineRLBasaltMakeWaterfall-v0",
train_steps=0, # TODO
eval_every=1,
eval_steps=EVAL_STEPS,
checkpoint_every=10, # TODO
use_wandb=USE_WANDB,
representation_config=TCCConfig(),
dynamics_config=MuZeroDynamicsConfig(),
)
CAVE_CONFIG = Config(
minerl_env_id="MineRLBasaltFindCave-v0",
train_steps=0, # TODO
eval_every=1,
eval_steps=EVAL_STEPS,
checkpoint_every=10, # TODO
use_wandb=USE_WANDB,
representation_config=TCCConfig(),
dynamics_config=MuZeroDynamicsConfig(),
)
ANIMAL_PEN_CONFIG = Config(
minerl_env_id="MineRLBasaltCreateVillageAnimalPen-v0",
train_steps=0, # TODO
eval_every=1,
eval_steps=EVAL_STEPS,
checkpoint_every=10, # TODO
use_wandb=USE_WANDB,
representation_config=TCCConfig(),
dynamics_config=MuZeroDynamicsConfig(),
)
HOUSE_CONFIG = Config(
minerl_env_id="MineRLBasaltBuildVillageHouse-v0",
train_steps=0, # TODO
eval_every=1,
eval_steps=EVAL_STEPS,
checkpoint_every=10, # TODO
use_wandb=USE_WANDB,
representation_config=TCCConfig(),
dynamics_config=MuZeroDynamicsConfig(),
)
CONFIGS = [WATERFALL_CONFIG, CAVE_CONFIG, ANIMAL_PEN_CONFIG, HOUSE_CONFIG]
def main():
for config in CONFIGS:
run_train_loop(config)