-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Retiarii] Export topk models #3464
[Retiarii] Export topk models #3464
Conversation
@@ -257,16 +259,30 @@ def stop(self) -> None: | |||
self._dispatcher_thread = None | |||
_logger.info('Experiment stopped') | |||
|
|||
def export_top_models(self, top_n: int = 1): | |||
def export_top_models(self, top_k: int = 1, optimize_mode: str = 'maximize', formatter: str = 'code') -> Any: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is better to obtain optimize_mode
from strategy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires re-designing of strategy as some strategy does not need to know what mode it is by design (e.g., random). I'll add a comment that optimize_mode
is likely to be removed and defined in strategy in future.
@@ -43,6 +44,12 @@ def submit_models(*models: Model) -> None: | |||
engine.submit_models(*models) | |||
|
|||
|
|||
def list_models(*models: Model) -> Iterable[Model]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good to make return type concrete, unless it's likely to change in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think iterable is fine. Some execution engine might favor to return a generator since there are a lot of models.
No description provided.