return self.sessions[-1] experiment = Experiment() # Experiment defaults experiment.name = 'experiment' experiment.tags = [] experiment.samples = 0 experiment.model = {'fn': None, 'args': [], 'kwargs': {}} experiment.optimizer = {'fn': None, 'args': [], 'kwargs': {}} experiment.sessions = [] # Session defaults session = AutoMunch() session.losses = {'solubility': 0, 'l1': 0} session.seed = random.randint(0, 99) session.cpus = multiprocessing.cpu_count() - 1 session.device = 'cuda' if torch.cuda.is_available() else 'cpu' session.log = {'when': []} session.checkpoint = {'when': []} # Experiment configuration for string in args.experiment: if '=' in string: update = parse_dotted(string) else: with open(string, 'r') as f: update = yaml.safe_load(f) # If the current session is defined inside the experiment update the session instead if 'session' in update:
return self.sessions[-1] experiment = Experiment() # Experiment defaults experiment.name = 'experiment' experiment.tags = [] experiment.samples = 0 experiment.model = {'fn': None, 'args': [], 'kwargs': {}} experiment.optimizer = {'fn': None, 'args': [], 'kwargs': {}} experiment.sessions = [] # Session defaults session = AutoMunch() session.losses = {'nodes': 0, 'count': 0, 'l1': 0} session.seed = random.randint(0, 99) session.cpus = multiprocessing.cpu_count() - 1 session.device = 'cuda' if torch.cuda.is_available() else 'cpu' session.log = {'when': []} session.checkpoint = {'when': []} # Experiment configuration for string in args.experiment: if '=' in string: update = parse_dotted(string) else: with open(string, 'r') as f: update = yaml.safe_load(f) # If the current session is defined inside the experiment update the session instead if 'session' in update: