def _add_results(self, results, trial_id): """Add a list of results into db. Args: results: A list of json results. trial_id: Id of the trial. """ for result in results: self.logger.debug("Appending result: %s" % result) result["trial_id"] = trial_id result_record = ResultRecord.from_json(result) result_record.save()
def _add_results(self, results, trial_id): """Add a list of results into db. Args: results (list): A list of json results. trial_id (str): Id of the trial. """ for result in results: self.logger.debug("Appending result: %s" % result) result["trial_id"] = trial_id result_record = ResultRecord.from_json(result) result_record.save()