コード例 #1
0
ファイル: tasktester.py プロジェクト: U0001F3A2/golem
 def __init__(self, task: Task, root_path, success_callback,
              error_callback):
     super(TaskTester, self).__init__(
         root_path=root_path,
         success_callback=success_callback,
         error_callback=error_callback,
         get_compute_task_def=task.query_extra_data_for_test_task,
         check_mem=True,
         comp_failed_warning=TaskTester.TESTER_WARNING,
         comp_success_message=TaskTester.TESTER_SUCCESS,
         resources=task.get_resources())
     self.task = task
コード例 #2
0
ファイル: benchmarkrunner.py プロジェクト: U0001F3A2/golem
    def __init__(self, task: Task, root_path, success_callback, error_callback,
                 benchmark: CoreBenchmark) -> None:
        def get_compute_task_def():
            return task.query_extra_data(10000).ctd

        super().__init__(root_path=root_path,
                         success_callback=success_callback,
                         error_callback=error_callback,
                         get_compute_task_def=get_compute_task_def,
                         check_mem=True,
                         comp_failed_warning=BenchmarkRunner.RUNNER_WARNING,
                         comp_success_message=BenchmarkRunner.RUNNER_SUCCESS,
                         resources=task.get_resources())
        # probably this could be done differently
        self.benchmark = benchmark