Beispiel #1
0
 def get_experiment_by_name(self, name):
     self._check_root_dir()
     all_experiments = list_subdirs(self.root_directory, full_path=True)
     for experiment_dir in all_experiments:
         experiment = self._get_experiment(experiment_dir)
         if experiment.name == name:
             return experiment
     return None
Beispiel #2
0
 def _find_run_root(self, run_uuid):
     self._check_root_dir()
     all_experiments = list_subdirs(self.root_directory, full_path=True)
     for experiment_dir in all_experiments:
         runs = find(experiment_dir, run_uuid, full_path=True)
         if len(runs) == 0:
             continue
         return runs[0]
     return None
Beispiel #3
0
 def _get_deleted_experiments(self, full_path=False):
     return list_subdirs(self.trash_folder, full_path)
Beispiel #4
0
 def _get_active_experiments(self, full_path=False):
     exp_list = list_subdirs(self.root_directory, full_path)
     return [
         exp for exp in exp_list
         if not exp.endswith(FileStore.TRASH_FOLDER_NAME)
     ]
Beispiel #5
0
 def list_experiments(self):
     self._check_root_dir()
     return [
         self.get_experiment(exp_id)
         for exp_id in list_subdirs(self.root_directory)
     ]
Beispiel #6
0
 def _list_run_uuids(self, experiment_id):
     self._check_root_dir()
     experiment_dir = find(self.root_directory,
                           str(experiment_id),
                           full_path=True)[0]
     return list_subdirs(experiment_dir, full_path=False)
Beispiel #7
0
 def _list_run_uuids(self, experiment_id):
     self._check_root_dir()
     experiment_dir = self._get_experiment_path(experiment_id)[0]
     return list_subdirs(experiment_dir, full_path=False)