@@ -230,11 +230,12 @@ class CompilationRunnerStub(metaclass=abc.ABCMeta):
230
230
"""The interface of a stub to CompilationRunner, for type checkers."""
231
231
232
232
@abc .abstractmethod
233
- def collect_results (self ,
234
- module_spec : corpus .ModuleSpec ,
235
- tf_policy_path : str ,
236
- collect_default_result : bool ,
237
- reward_only : bool = False ) -> Tuple [Dict , Dict ]:
233
+ def collect_results (
234
+ self ,
235
+ module_spec : corpus .ModuleSpec ,
236
+ tf_policy_path : str ,
237
+ collect_default_result : bool ,
238
+ reward_only : bool = False ) -> Tuple [Optional [Dict ], Optional [Dict ]]:
238
239
raise NotImplementedError ()
239
240
240
241
@abc .abstractmethod
@@ -290,11 +291,12 @@ def get_rewards(result: Dict) -> List[float]:
290
291
return []
291
292
return [v [1 ] for v in result .values ()]
292
293
293
- def collect_results (self ,
294
- module_spec : corpus .ModuleSpec ,
295
- tf_policy_path : str ,
296
- collect_default_result : bool ,
297
- reward_only : bool = False ) -> Tuple [Dict , Dict ]:
294
+ def collect_results (
295
+ self ,
296
+ module_spec : corpus .ModuleSpec ,
297
+ tf_policy_path : str ,
298
+ collect_default_result : bool ,
299
+ reward_only : bool = False ) -> Tuple [Optional [Dict ], Optional [Dict ]]:
298
300
"""Collect data for the given IR file and policy.
299
301
300
302
Args:
0 commit comments