def _delete_past_log_files(self, steps_not_to_delete): _dir = ospj(self._t_prof.path_log_storage, self._t_prof.name) all_dir_names = file_util.get_all_dirs_in_dir(_dir) dir_names_to_delete = [ e for e in all_dir_names if e not in [str(s) for s in steps_not_to_delete] ] for step in dir_names_to_delete: shutil.rmtree(ospj(_dir, step))
TESTING=True, n_units_final_br=128, n_units_final_avg=128, n_merge_and_table_layer_units_br=128, n_merge_and_table_layer_units_avg=128, first_and_third_units=1024, second_and_fourth_units=512, mini_batch_size_br_per_la=128, mini_batch_size_avg_per_la=128, history_args=HistoryArgs(100, 100)) ctrl = Driver( t_prof, eval_methods={}, #"history": 990}, n_iterations=40) #, #iteration_to_import=40, #name_to_import="nine_player_limit") ctrl.run() #obs_interp = LimitObsInterpreter(t_prof) #buffer = obs_interp.GetActionAndHandBuffer() #for i in range(1, 5): # file_name = '/home/robert/poker_ai_data/testing/export_hands/nine_player_limit/{}/LearnerActor_0_General.pkl'.format(i) # print(file_name) # buffer.load_from_file(file_name) # print(buffer._pub_obs_buffer) # print(buffer._range_idxs_buffer) # for j in range(buffer._top): # obs_interp.InterpretObs(buffer._pub_obs_buffer[j].numpy()) eval_dir = ospj(t_prof.path_agent_export_storage, str(t_prof.name)) dirs = file_util.get_all_dirs_in_dir(eval_dir) print(dirs)