def save(self, *args, **kwargs): if len(args) >= 1: file_name = args[0] else: file_name = '{}'.format(self.node) data_manager = dataManager.DataManager() data_manager.file_path = '{}{}'.format(data_manager.file_path, self.extra_path) data_manager.save(file_name, self.get_weights_dictionary(), **kwargs)
def save(self, *args, **kwargs): if len(args) >= 1: file_name = args[0] else: file_name = '%s' % self.node data_manager = dataManager.DataManager() data_manager.file_path = '{}{}'.format(data_manager.file_path, self.extra_path) data_manager.save(file_name, self.get_repr_dict(), **kwargs)
def save(self, *args, **kwargs): if len(args) >= 1: file_name = args[0] else: file_name = '%s' % self.node data_manager = dataManager.DataManager() data_manager.scene_path = self.save_folder data_dict = self.get_data_dictionary() data_manager.save(file_name, data_dict, **kwargs)
def load(self, *args, **kwargs): if len(args) >= 1: file_name = args[0] else: file_name = '%s' % self.node data_manager = dataManager.DataManager() data_manager.scene_path = self.save_folder self.data = data_manager.load(file_name, **kwargs) self.set_data_dictionary() return self.data
def load(self, *args, **kwargs): if len(args) >= 1: file_name = args[0] else: file_name = '{}'.format(self.node) data_manager = dataManager.DataManager() data_manager.file_path = '{}{}'.format(data_manager.file_path, self.extra_path) print 'path to search = {}'.format(data_manager.file_path) self.weights_dict = data_manager.load(file_name, **kwargs) return self.weights_dict
def load(self, *args, **kwargs): try: if len(args) >= 1: file_name = args[0] else: file_name = '%s' % self.node data_manager = dataManager.DataManager() data_manager.file_path = '{}{}'.format(data_manager.file_path, self.extra_path) self.repr_dict = data_manager.load(file_name, **kwargs) return self.repr_dict except IOError: if len(args) >= 1: file_name = args[0] else: file_name = '%s' % self.node print "couldn't load file name: {}".format(file_name)
def __init__(self, *args, **kwargs): super(GeneralData, self).__init__() self.node = kwargs.pop('node') data_manager = dataManager.DataManager() self.save_folder = '{}'.format(data_manager.file_path) self.data = {}