from sim_src.sim_env.sim_agent import SimAgent from sim_src.sim_env.sim_env import SimEnvTxBinary_RewardShaping from sim_src.tb_logger import GLOBAL_LOGGER env_c = env_config_helper() drl_c = ddpg_config_helper(env_c.N_UE, env_c.N_STEP * env_c.N_EPISODE) env_c.reload_config() drl_c.reload_config() import os log_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) folder_name = "tb-data" experiment_name = "ka" GLOBAL_LOGGER.set_log_path(log_path, folder_name, experiment_name) scalar_list = [] scalar = 'TX_DELAY_' scalar_list.append(scalar) scalar = 'N_RLCTX_' scalar_list.append(scalar) scalar = 'N_DISCARD_' scalar_list.append(scalar) scalar = 'RLC_REWARD_' scalar_list.append(scalar) scalar = 'N_CH_TX_OK_' scalar_list.append(scalar)
SctpServer.__init__(self, 'TBServer', server_bind_ip, server_bind_port, 100) self.logger = logger self.tb_client_listener_thread_list = [] def connection_handler(self, conn): print('TBServer get conn from', conn) c = TBClientListener(conn, self.logger) c.start() self.tb_client_listener_thread_list.append(c) if __name__ == '__main__': from sim_src.tb_logger import GLOBAL_LOGGER GLOBAL_LOGGER.set_log_path('/tmp/aaaaa/', 'test_tensor_board_server', 'test_tensor_board_server') t = scalar() t.tti = 1213 t.name = 'hello' ts = Timestamp() t.timestamp.seconds = 10 t.timestamp.nanos = 112310 print(t.timestamp.ToMicroseconds()) print(t.name) print(t.timestamp) print(t.tti) print(t.value) server = TBServer(server_bind_ip='127.0.1.100', server_bind_port=TENSORBOARD_SERVER_PORT,