Args: pred (OfflinePredictor): state -> [#action]
(pred, nr_eval, get_player_fn)
| 102 | |
| 103 | |
| 104 | def eval_model_multithread(pred, nr_eval, get_player_fn): |
| 105 | """ |
| 106 | Args: |
| 107 | pred (OfflinePredictor): state -> [#action] |
| 108 | """ |
| 109 | NR_PROC = min(multiprocessing.cpu_count() // 2, 8) |
| 110 | with pred.sess.as_default(): |
| 111 | mean, max = eval_with_funcs( |
| 112 | [pred] * NR_PROC, nr_eval, |
| 113 | get_player_fn, verbose=True) |
| 114 | logger.info("Average Score: {}; Max Score: {}".format(mean, max)) |
| 115 | |
| 116 | |
| 117 | class Evaluator(Callback): |
no test coverage detected
searching dependent graphs…