diff --git a/neps/api.py b/neps/api.py index d035a5b5..e1579624 100644 --- a/neps/api.py +++ b/neps/api.py @@ -98,8 +98,11 @@ def write_loss_and_config(file_handle, loss_, config_id_, config_): def run( run_pipeline: Callable, root_directory: str | Path, - pipeline_space: dict[str, Parameter | CS.ConfigurationSpace] | str | Path | - CS.ConfigurationSpace | None = None, + pipeline_space: dict[str, Parameter | CS.ConfigurationSpace] + | str + | Path + | CS.ConfigurationSpace + | None = None, overwrite_working_directory: bool = False, post_run_summary: bool = False, development_stage_id=None, @@ -277,13 +280,18 @@ def run( pre_load_hooks=pre_load_hooks, ) - if post_run_summary: + if post_run_summary and development_stage_id: + optimization_dir = Path(root_directory) / f"dev_{development_stage_id}" + post_run_csv(optimization_dir, logger) + elif post_run_summary: post_run_csv(root_directory, logger) def _run_args( searcher_info: dict, pipeline_space: dict[str, Parameter | CS.ConfigurationSpace] + | str + | Path | CS.ConfigurationSpace | None = None, max_cost_total: int | float | None = None,