Tsc_trainer module

class Tsc_trainer.TSCTrainer(args, logger, gpu=0, cpu=False, name='tsc')

Bases: object

register TSCTrainer

:arg default params

logger:logger gpu:gpu cpu:cpu name:name

create_agents()

used for creating agents :return:

create_env()

used for create an env :return:

create_metric()

used for creating a standard metric

Returns

create_world()

used for creating a new world

Returns

test(drop_load=True)

used for testing :param drop_load: Boolean True or False :return:

train()

used for train an agent :return:

train_test(e)

used for training test :param e: :return:

writeLog(mode, step, travel_time, planned_tt, loss, cur_rwd, cur_queue, cur_delay, cur_throughput)

used for writing logs :param mode: :param step: :param travel_time: :param planned_tt: :param loss: :param cur_rwd: :param cur_queue: :param cur_delay: :param cur_throughput: :return: