def _get_dataset_root(self, path="", name=""): assert name or path, ("Must provide either a path to the dataset or the name of the dataset, in which case load will try to find the dataset") if name: dataset_root = filesystem.find_directory("datasets") + "/" + name if path: dataset_root = path #print("Loading dataset from {}".format(dataset_root)) assert os.path.isfile(dataset_root + "/description.json"), ("The dataset does not contain a description.json") return dataset_root
from enum import Enum # Arguments #---------------------------------------------------------------------------- args = arguments.parse() # Settings & Files #---------------------------------------------------------------------------- settings.load("settings.json") timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S") fs = Filesystem(settings.project.path + "history/" + timestamp + "/") datasets_root = "." if args.datasets_root: datasets_root = args.datasets_root else: datasets_root = filesystem.find_directory("datasets") data_fs = Filesystem(datasets_root + "/" + args.dataset + "/") def main(): autoencoder_desc = None # Dataset #---------------------------------------------------------------------------- dataset = ds.DataSet() dataset.load(path=data_fs[""], blocks=["pressure_static", "pressure_dynamic"], norm_factors={ "pressure_static": settings.dataset.pressure_static_normalization_factor, "pressure_dynamic":