def last_data_set(self) -> DataSet: return load_by_id(get_last_run(self.conn, self.exp_id))
def test_get_last_run(dataset): assert dataset.run_id == mut.get_last_run(dataset.conn, dataset.exp_id)
def test_get_last_run_no_runs(experiment): assert None is mut.get_last_run(experiment.conn, experiment.exp_id)
def last_data_set(self) -> DataSet: """Get the last dataset of this experiment""" run_id = get_last_run(self.conn, self.exp_id) if run_id is None: raise ValueError('There are no runs in this experiment') return load_by_id(run_id)