Skip to content

Commit

Permalink
Closes #52: summary_csv compatible with development_stage_id
Browse files Browse the repository at this point in the history
  • Loading branch information
TarekAbouChakra committed Jan 24, 2024
1 parent d6ce79a commit 8a0ebd8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions neps/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8a0ebd8

Please sign in to comment.