Skip to content

Commit

Permalink
fix: call model configure after Agent mutations
Browse files Browse the repository at this point in the history
Co-authored-by: Nels <[email protected]>
  • Loading branch information
aaraney and hellkite500 authored Aug 15, 2024
1 parent f8af4ba commit db0819f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/ngen_cal/src/ngen/cal/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def main(general: General, model_conf: Mapping[str, Any]):

# setup plugins
plugin_manager.hook.ngen_cal_configure(config=general)
# Initialize the starting agent
# WARNING: Agent sets the model workdir, so initialize it before using the model object for anything that may require an accurate workdir
agent = Agent(model, general.workdir, general.log, general.restart, general.strategy.parameters)
model_inner._plugin_manager.hook.ngen_cal_model_configure(config=model_inner)

print("Starting calib")
Expand Down

0 comments on commit db0819f

Please sign in to comment.