def __init__(self, exp_name): self.dir = Paths.exp_dir(exp_name, get_only=True) self.sub_exp_results = [ SubExperimentResults(exp_name, sub_exp) for sub_exp in Paths.list_only_dirs(self.dir) ] return
def __init__(self, exp_name): self.sub_exp_results = list() for sub_exp in Paths.list_only_dirs( Paths.exp_dir(exp_name, get_only=True)): self.sub_exp_results.append(SubExperimentResults( exp_name, sub_exp)) return
def __init__(self, exp_name, conf, dataset, rep_dir): rep_i = Paths.rep_idx_from_dir_name(rep_dir) self.info = (exp_name, conf, dataset, rep_i) self.strategy_results = [ StrategyResults(exp_name, conf, dataset, rep_i, strategy_name) for strategy_name in Paths.list_only_dirs(self.path()) ] return
def __init__(self, exp_name, conf, dataset, rep_dir): self.rep_i = Paths.rep_idx_from_dir_name(rep_dir) self.strategies = [ StrategyResults(exp_name, conf, dataset, self.rep_i, strategy_name) for strategy_name in Paths.list_only_dirs( Paths.rep_dir( exp_name, conf, dataset, self.rep_i, get_only=True)) ] self.details = (exp_name, conf, dataset, self.rep_i) return
def __init__(self, exp_name, conf, dataset): self.rep_results = [ RepetitionResults(exp_name, conf, dataset, rep_dir) for rep_dir in Paths.list_only_dirs( Paths.sub_exp_dataset_dir( exp_name, conf, dataset, get_only=True)) if rep_dir != Paths.AVERAGE_RESULTS_DIR_NAME ] self.rep_ids = [rep.rep_i for rep in self.rep_results] self.details = (exp_name, conf, dataset) return
def __init__(self, exp_name, sub_exp): self.dir = Paths.sub_exp_dir(exp_name, sub_exp, get_only=True) self.conf = Configuration.from_json_path( os.path.join(self.dir, Paths.CONFIG_FILENAME)) self.dataset_names = [ f for f in Paths.list_only_dirs(self.dir) if f != Paths.MERGED_RESULTS_DIR_NAME ] self.datasets_results = [ DatasetResults(exp_name, self.conf, dataset) for dataset in self.dataset_names ] return
def __init__(self, exp_name, conf, dataset, rep_i, strategy_name): self.strategy_name = strategy_name self.filenames = os.listdir( os.path.join( Paths.rep_dir(exp_name, conf, dataset, rep_i, get_only=True), strategy_name)) return
def __init__(self, exp_name, conf, dataset): self.sub_exp_info = (exp_name, conf) self.dataset_name = dataset self.rep_results = [ RepetitionResults(exp_name, conf, dataset, rep_dir) for rep_dir in Paths.list_only_dirs(self.path()) if rep_dir != Paths.AVERAGE_RESULTS_DIR_NAME ] return
def get_path(self): return Paths.rep_dir(self.exp_name, self.conf, self.dataset, self.iter_number, get_only=True)
def get_path(self): return Paths.sub_exp_dataset_dir(self.exp_name, self.conf, self.dataset, get_only=True)
def path(self): return Paths.sub_exp_dataset_dir(*self.sub_exp_info, self.dataset_name, get_only=True)
def path(self): return Paths.rep_dir(*self.info, get_only=True)
def __init__(self, exp_name, conf, dataset, rep_i, strategy_name): self.strategy_name = strategy_name self.dir = join( Paths.rep_dir(exp_name, conf, dataset, rep_i, get_only=True), strategy_name) return