Inject new results into self.trials Returns ??? XXX new_tids can be None, in which case new tids will be generated automatically
(self, specs, results, miscs, new_tids=None)
| 734 | return self.trials.trial_attachments(trial=self.current_trial) |
| 735 | |
| 736 | def inject_results(self, specs, results, miscs, new_tids=None): |
| 737 | """Inject new results into self.trials |
| 738 | |
| 739 | Returns ??? XXX |
| 740 | |
| 741 | new_tids can be None, in which case new tids will be generated |
| 742 | automatically |
| 743 | |
| 744 | """ |
| 745 | trial = self.current_trial |
| 746 | assert trial is not None |
| 747 | num_news = len(specs) |
| 748 | assert len(specs) == len(results) == len(miscs) |
| 749 | if new_tids is None: |
| 750 | new_tids = self.trials.new_trial_ids(num_news) |
| 751 | new_trials = self.trials.source_trial_docs( |
| 752 | tids=new_tids, specs=specs, results=results, miscs=miscs, sources=[trial] |
| 753 | ) |
| 754 | for t in new_trials: |
| 755 | t["state"] = JOB_STATE_DONE |
| 756 | return self.trials.insert_trial_docs(new_trials) |
| 757 | |
| 758 | |
| 759 | class Domain: |
nothing calls this directly
no test coverage detected