Skip to content

Warm start: results.json and configs.json (from live json_result_logger) do not contain results from previous runs #92

@rosea-tf

Description

@rosea-tf

Hi, here's an abbreviated example of the problem described in the topic:

for run in range(3):
     loaded_from_json = hpres.logged_results_to_HBS_result(...) if run > 0 else None
     logger = hpres.json_result_logger(...)
     bohb = BOHB(..., result_logger=logger, previous_result=loaded_from_json)
     result = bohb.run(...)
  • Run 0: result contains results from run 0, *.json files contain results from run 0
  • Run 1: result contains results from run 0 and 1, *.json files contain results from run 1
  • Run 2: result contains results from run 1 and 2, *.json files contain results from run 2

So by run 2, the results from run 0 have been lost.

If instead we pass the Result object directly (or via a pickle) instead of using the live-logged JSONs, then the results from run 0 can be retained:

for run in range(3):
     previous_result = result if run > 0 else None
     logger = hpres.json_result_logger(...)
     bohb = BOHB(..., result_logger=logger, previous_result=previous_result)
     result = bohb.run(...)
  • Run 0: result contains results from run 0, *.json files contain results from run 0
  • Run 1: result contains results from run 0 and 1, *.json files contain results from run 1
  • Run 2: result contains results from run 0 and 1 and 2, *.json files contain results from run 2

However, this won't work if the any of the runs crash or need to be aborted part way through, which makes the process kind of fragile.

Expected behaviour: the previous runs are included (with shifted timestamps and iteration stamps) in the JSONs, the same as in the Result object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions