-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
38 lines (30 loc) · 862 Bytes
/
test.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
from dataclasses import asdict, astuple
import numpy as np
from gym.spaces import flatten, unflatten
from stable_baselines3.common.vec_env import DummyVecEnv
import torch
from agent.envs import VecPyTorch
from agent.policy import GNNPolicy, get_size
from envs.ast_env import ASTEnv
from agent.base import GNNBase, TestBase
from agent.arguments import get_args
from agent.wrapper import FlattenObservation, Obs
from agent.distributions import QKV
from agent.batch import collate
from agent.arguments import read_params
import ipdb
import gym
import yaml
from trainer import TestTrainer
def main():
params = read_params('params.yaml')
testTrainer = TestTrainer()
testTrainer.train(
logger=None,
params=params,
log_name="test",
render=False,
save_dir=None,
)
if __name__ == "__main__":
main()