コード例 #1
0
ファイル: collector.py プロジェクト: tchordia/ray
    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()
コード例 #2
0
ファイル: collector.py プロジェクト: jamescasbon/ray
    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()