From db7ea1fcf64ae61a76bddb3be0b5b794937964f9 Mon Sep 17 00:00:00 2001 From: "David L. Woodruff" Date: Fri, 15 Nov 2024 15:43:37 -0800 Subject: [PATCH 1/3] move the APH boolean to the cfg 'block' for aph commands --- mpisppy/generic_cylinders.py | 9 +-------- mpisppy/utils/config.py | 6 +++++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/mpisppy/generic_cylinders.py b/mpisppy/generic_cylinders.py index fc07be4c..90bcf725 100644 --- a/mpisppy/generic_cylinders.py +++ b/mpisppy/generic_cylinders.py @@ -29,7 +29,6 @@ from mpisppy import MPI - def _parse_args(m): # m is the model file module cfg = config.Config() @@ -46,12 +45,6 @@ def _parse_args(m): description="The string used for a directory of ouput along with a csv and an npv file (default None, which means no soltion output)", domain=str, default=None) - cfg.add_to_config(name="run_async", - description="Use APH instead of PH (default False)", - domain=bool, - default=False) - - m.inparser_adder(cfg) # many models, e.g., farmer, need num_scens_required # in which case, it should go in the inparser_adder function @@ -136,7 +129,7 @@ def _do_decomp(module, cfg, scenario_creator, scenario_creator_kwargs, scenario_ # Things needed for vanilla cylinders beans = (cfg, scenario_creator, scenario_denouement, all_scenario_names) - if cfg.run_async: + if cfg.APH: # Vanilla APH hub hub_dict = vanilla.aph_hub(*beans, scenario_creator_kwargs=scenario_creator_kwargs, diff --git a/mpisppy/utils/config.py b/mpisppy/utils/config.py index 629f63bc..453e0b22 100644 --- a/mpisppy/utils/config.py +++ b/mpisppy/utils/config.py @@ -387,7 +387,11 @@ def mip_options(self): def aph_args(self): - + + solf.add_to_config(name="APH", + description="Use APH instead of PH (default False)", + domain=bool, + default=False) self.add_to_config('aph_gamma', description='Gamma parameter associated with asychronous projective hedging (default 1.0)', domain=float, From 535dc24cc6f3eb0dd50f555fa8d32976ad3669b1 Mon Sep 17 00:00:00 2001 From: "David L. Woodruff" Date: Fri, 15 Nov 2024 15:55:15 -0800 Subject: [PATCH 2/3] fix a typo in config.py --- mpisppy/utils/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpisppy/utils/config.py b/mpisppy/utils/config.py index 453e0b22..408a0e7b 100644 --- a/mpisppy/utils/config.py +++ b/mpisppy/utils/config.py @@ -388,7 +388,7 @@ def mip_options(self): def aph_args(self): - solf.add_to_config(name="APH", + self.add_to_config(name="APH", description="Use APH instead of PH (default False)", domain=bool, default=False) From c6d5cae6001a4486e9fb8428af660a619747b643 Mon Sep 17 00:00:00 2001 From: David L Woodruff Date: Tue, 19 Nov 2024 15:25:55 -0800 Subject: [PATCH 3/3] Update config.py to trigger re-running tests --- mpisppy/utils/config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/mpisppy/utils/config.py b/mpisppy/utils/config.py index 408a0e7b..1a6695b9 100644 --- a/mpisppy/utils/config.py +++ b/mpisppy/utils/config.py @@ -385,7 +385,6 @@ def mip_options(self): domain=float, default=None) - def aph_args(self): self.add_to_config(name="APH",