Skip to content
Snippets Groups Projects
Commit b23927ad authored by Tim Tobias Bauerle's avatar Tim Tobias Bauerle
Browse files

Added test run after training

parent bab27540
Branches
No related tags found
2 merge requests!18Merge in main,!14Experiment configs
......@@ -5,6 +5,7 @@ import numpy.random
import torch
from omegaconf import DictConfig
from edml.controllers.test_controller import TestController
from edml.core.start_device import launch_device
from edml.helpers.config_helpers import preprocess_config, instantiate_controller
from multiprocessing import Process
......@@ -37,6 +38,8 @@ def main(cfg):
p.terminate()
p.join()
_run_test_evaluation(cfg)
def _start_controller(cfg: DictConfig):
controller = instantiate_controller(cfg)
......@@ -54,6 +57,22 @@ def _start_device(cfg: DictConfig, device_id: str):
launch_device(cfg)
def _run_test_evaluation(cfg):
cfg.experiment.job = "test"
cfg.experiment.partition = "False"
cfg.experiment.latency = None
cfg.num_devices = 1
device_id = cfg.topology.devices[0].device_id
p = Process(target=_start_device, args=(cfg, device_id), name=device_id)
p.start()
controller = TestController(cfg)
controller.train()
p.terminate()
p.join()
def _make_deterministic(seed_cfg: DictConfig):
seed = seed_cfg.value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment