From a0ea3b5c16b9150e113c3545f275dc887a0f6bac Mon Sep 17 00:00:00 2001 From: alfoa Date: Tue, 7 May 2024 21:14:31 -0600 Subject: [PATCH 01/17] Closes #2304 --- ravenframework/JobHandler.py | 12 +- ravenframework/Models/EnsembleModel.py | 9 +- .../ABCDsum.py | 16 ++ .../decayConstantB.py | 6 + ...estGAensembleModelWithCodeAndFunctions.xml | 169 ++++++++++++++++++ 5 files changed, 209 insertions(+), 3 deletions(-) create mode 100644 tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py create mode 100644 tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py create mode 100644 tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/testGAensembleModelWithCodeAndFunctions.xml diff --git a/ravenframework/JobHandler.py b/ravenframework/JobHandler.py index b851deff43..e01a798c8a 100644 --- a/ravenframework/JobHandler.py +++ b/ravenframework/JobHandler.py @@ -702,7 +702,7 @@ def reAddJob(self, runner): runner.trackTime('queue') self.__submittedJobs.append(runner.identifier) - def addClientJob(self, args, functionToRun, identifier, metadata=None, uniqueHandler="any"): + def addClientJob(self, args, functionToRun, identifier, metadata=None, uniqueHandler="any", groupInfo = None): """ Method to add an internal run (function execution), without consuming resources (free spots). This can be used for client handling (see @@ -719,11 +719,19 @@ def addClientJob(self, args, functionToRun, identifier, metadata=None, uniqueHan this runner. For example, if present, to retrieve this runner using the method jobHandler.getFinished, the uniqueHandler needs to be provided. If uniqueHandler == 'any', every "client" can get this runner. + @ In, groupInfo, dict, optional, {id:string, size:int}. + - "id": it is a special keyword attached to + this runner to identify that this runner belongs to a special set of runs that need to be + grouped together (all will be retrievable only when all the runs ended). + - "size", number of runs in this group self.__batching + NOTE: If the "size" of the group is only set the first time a job of this group is added. + Consequentially the size is immutable @ Out, None """ self.addJob(args, functionToRun, identifier, metadata, forceUseThreads = True, uniqueHandler = uniqueHandler, - clientQueue = True) + clientQueue = True, groupInfo = groupInfo) + def addFinishedJob(self, data, metadata=None, uniqueHandler="any", profile=False): """ diff --git a/ravenframework/Models/EnsembleModel.py b/ravenframework/Models/EnsembleModel.py index 235134dc57..0c7450775b 100644 --- a/ravenframework/Models/EnsembleModel.py +++ b/ravenframework/Models/EnsembleModel.py @@ -563,7 +563,14 @@ def submit(self,myInput,samplerType,jobHandler,**kwargs): uniqueHandler=uniqueHandler, forceUseThreads=forceThreads, groupInfo={'id': kwargs['batchInfo']['batchId'], 'size': nRuns} if batchMode else None) else: - jobHandler.addClientJob((self, myInput, samplerType, kwargs), self.__class__.evaluateSample, prefix, kwargs) + # for parallel strategy 2, the ensemble model works as a step => it needs the jobHandler + kw['jobHandler'] = jobHandler + # for parallel strategy 2, we need to make sure that the batchMode is set to False in the inner runs since only the + # ensemble model evaluation should be batched (THIS IS REQUIRED because the CODE does not submit runs like the other models) + kw['batchMode'] = False + jobHandler.addClientJob((self, myInput, samplerType, kw), self.__class__.evaluateSample, prefix, metadata=metadata, + uniqueHandler=uniqueHandler, + groupInfo={'id': kwargs['batchInfo']['batchId'], 'size': nRuns} if batchMode else None) def __retrieveDependentOutput(self,modelIn,listOfOutputs, typeOutputs): """ diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py b/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py new file mode 100644 index 0000000000..d3697f0b12 --- /dev/null +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py @@ -0,0 +1,16 @@ +# Copyright 2017 Battelle Energy Alliance, LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +def run(self, Input): + self.sum = self.A + self.B + self.C + self.D diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py b/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py new file mode 100644 index 0000000000..d603251c19 --- /dev/null +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py @@ -0,0 +1,6 @@ +# Copyright Nucube Energy, Inc. + +def evaluate(self): + return self.decay_A+0.0001 + + diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/testGAensembleModelWithCodeAndFunctions.xml b/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/testGAensembleModelWithCodeAndFunctions.xml new file mode 100644 index 0000000000..f1a29a8f8b --- /dev/null +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/testGAensembleModelWithCodeAndFunctions.xml @@ -0,0 +1,169 @@ + + + + + metaModelWithCodeAndFunctionsAndGenetic + + sampleMC + + metaModelWithCodeAndFunctionsAndGenetic + 1 + + + + referenceInput.xml + + + + + /Users/aalfonsi/projects/raven/tests/framework/user_guide/physicalCode/analyticalbateman/AnalyticalDplMain.py + + + + python + + + A,B,C,D,sum + + + + sumOfABCD + inputPlaceHolderForInternalObjects + sumData + + + testModel + referenceInput.xml + samplesMC + + + + + + + 0 + 1000 + + + 0.00000001 + 0.0000001 + + + + + + + 20 + 42 + every + + + + 2 + rouletteWheel + + + 0.8 + + + 0.9 + + + + fitnessBased + + + + 0.0 + + + + sigma + + + decayConstant + + + sigma + + + decayConstantB + + + sum + finalResponses + MC_samp + + + + + + decay_A + + + + + + + 2 + 20021986 + + + sigma + + + decayConstant + + + sigma + + + decayConstantB + + + + + + + referenceInput.xml + inputPlaceHolderForInternalObjects + codeAndExtModel + GAopt + opt_export + finalResponses + printFinalResults + + + + + + csv + finalResponses + input,output + + + + + + sigma-A,sigma-B,decay_A,decay_B + A,B,C,D + + + A,B,C,D + OutputPlaceHolder + + + A,B,C,D + sum + + + sigma-A,sigma-B,decay_A,decay_B + A,B,C,D,sum + + + trajID + sigma-A,sigma-B,decay_A,decay_B,sum,age,batchId,fitness,iteration,accepted,AHDp,conv_AHDp + + + + From e9feed6efc740d25bff1ac23cc8ddd74fd51bea8 Mon Sep 17 00:00:00 2001 From: alfoa Date: Tue, 7 May 2024 21:52:25 -0600 Subject: [PATCH 02/17] added test --- .../ABCDsum.py | 0 .../decayConstantB.py | 0 ...sembleModel_withGA_Code_and_Functions.xml} | 25 ++++++++---- .../opt_export.csv | 39 +++++++++++++++++++ .../Optimizers/GeneticAlgorithms/tests | 10 +++++ 5 files changed, 67 insertions(+), 7 deletions(-) rename tests/framework/Optimizers/GeneticAlgorithms/continuous/{constrained => unconstrained}/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py (100%) rename tests/framework/Optimizers/GeneticAlgorithms/continuous/{constrained => unconstrained}/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py (100%) rename tests/framework/Optimizers/GeneticAlgorithms/continuous/{constrained/testGAensembleModelWithCodeAndFunctions.xml => unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml} (85%) create mode 100644 tests/framework/Optimizers/GeneticAlgorithms/gold/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/opt_export.csv diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py similarity index 100% rename from tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py rename to tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/ABCDsum.py diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py similarity index 100% rename from tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py rename to tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/testGAensembleModelWithCodeAndFunctions.xml b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml similarity index 85% rename from tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/testGAensembleModelWithCodeAndFunctions.xml rename to tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml index f1a29a8f8b..6669059867 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/continuous/constrained/testGAensembleModelWithCodeAndFunctions.xml +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml @@ -1,10 +1,21 @@ - + + framework/Optimizers/GeneticAlgorithms.GAwithEnsembleModelIncludingCode + mandd + 2024-05-07 + Models.EnsembleModel, Optimizers.GeneticAlgorithm + + This test is aimed to test the usage of the GeneticAlgorithm with an EnsembleModel, including + a model Code. This test has been created to test the modifications performed to address issue + #2304 (see \\url{https://github.com/idaholab/raven/issues/2304}). + + + metaModelWithCodeAndFunctionsAndGenetic - sampleMC + optimize metaModelWithCodeAndFunctionsAndGenetic 1 @@ -16,7 +27,7 @@ - /Users/aalfonsi/projects/raven/tests/framework/user_guide/physicalCode/analyticalbateman/AnalyticalDplMain.py + ../../../../user_guide/physicalCode/analyticalbateman/AnalyticalDplMain.py @@ -124,21 +135,21 @@ - + referenceInput.xml inputPlaceHolderForInternalObjects codeAndExtModel GAopt opt_export finalResponses - printFinalResults + opt_export - + csv - finalResponses + opt_export input,output diff --git a/tests/framework/Optimizers/GeneticAlgorithms/gold/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/opt_export.csv b/tests/framework/Optimizers/GeneticAlgorithms/gold/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/opt_export.csv new file mode 100644 index 0000000000..a6eabfb1da --- /dev/null +++ b/tests/framework/Optimizers/GeneticAlgorithms/gold/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/opt_export.csv @@ -0,0 +1,39 @@ +trajID,sigma-A,sigma-B,decay_A,decay_B,sum,age,batchId,fitness,iteration,accepted,AHDp,conv_AHDp +0,812.997460787,464.508307042,1.255650268e-08,0.000100012556503,3.15760954156,0,1,-3.15760954156,0,first,,False +0,759.507928453,912.545952926,8.14640085566e-08,0.000100081464009,2.90476176926,0,1,-2.90476176926,0,first,,False +0,912.545952926,812.997460787,1.255650268e-08,0.000100012556503,3.15873736407,0,2,-3.15873736407,1,accepted,299.428022512,False +0,464.508307042,759.507928453,8.14640085566e-08,0.000100081464009,2.83929690449,0,2,-2.83929690449,1,accepted,299.428022512,False +0,794.044539517,912.545952926,5.18057476338e-08,0.000100051805748,2.98393998882,1,3,-2.98393998882,2,accepted,261.653404312,False +0,794.044539517,759.507928453,7.83557135608e-08,0.000100078355714,2.9174761674,1,3,-2.9174761674,2,accepted,261.653404312,False +0,912.545952926,464.508307042,8.14640085566e-08,0.000100081464009,2.93136915288,2,4,-2.93136915288,3,accepted,379.964041465,False +0,759.507928453,759.507928453,8.14640085566e-08,0.000100081464009,2.90491165751,2,4,-2.90491165751,3,accepted,379.964041465,False +0,464.508307042,912.545952926,8.14640085566e-08,0.000100081464009,2.83915821533,3,5,-2.83915821533,4,accepted,154.98621892,False +0,794.044539517,759.507928453,7.83557135608e-08,0.000100078355714,2.9174761674,3,5,-2.9174761674,4,accepted,154.98621892,False +0,912.545952926,464.508307042,8.14640085566e-08,0.000100081464009,2.93136915288,3,6,-2.93136915288,5,accepted,484.155218746,False +0,759.507928453,464.508307042,8.14640085566e-08,0.000100081464009,2.90520071484,3,6,-2.90520071484,5,accepted,484.155218746,False +0,912.545952926,464.508307042,8.14640085566e-08,0.000100081464009,2.93136915288,4,7,-2.93136915288,6,accepted,484.155218746,False +0,759.507928453,464.508307042,8.14640085566e-08,0.000100081464009,2.90520071484,4,7,-2.90520071484,6,accepted,484.155218746,False +0,794.044539517,759.507928453,5.18057476338e-08,0.000100051805748,2.98410104597,5,8,-2.98410104597,7,accepted,329.536232476,False +0,794.044539517,912.545952926,5.18057476338e-08,0.000100051805748,2.98393998882,5,8,-2.98393998882,7,accepted,329.536232476,False +0,794.044539517,759.507928453,5.18057476338e-08,0.000100051805748,2.98410104597,6,9,-2.98410104597,8,accepted,261.553081047,False +0,464.508307042,912.545952926,8.14640085566e-08,0.000100081464009,2.83915821533,6,9,-2.83915821533,8,accepted,261.553081047,False +0,794.044539517,912.545952926,5.18057476338e-08,0.000100051805748,2.98393998882,4,10,-2.98393998882,9,accepted,329.536232476,False +0,794.044539517,912.545952926,5.18057476338e-08,0.000100051805748,2.98393998882,4,10,-2.98393998882,9,accepted,329.536232476,False +0,464.508307042,794.044539517,9.21291357633e-08,0.000100092129136,2.81925891819,5,11,-2.81925891819,10,accepted,118.501413408,False +0,464.508307042,794.044539517,9.21291357633e-08,0.000100092129136,2.81925891819,5,11,-2.81925891819,10,accepted,118.501413408,False +0,464.508307042,912.545952926,8.14640085566e-08,0.000100081464009,2.83915821533,0,12,-2.83915821533,11,accepted,118.501413408,False +0,464.508307042,912.545952926,8.14640085566e-08,0.000100081464009,2.83915821533,0,12,-2.83915821533,11,accepted,118.501413408,False +0,464.508307042,794.044539517,9.21291357633e-08,0.000100092129136,2.81925891819,1,13,-2.81925891819,12,accepted,94.054634152,False +0,464.508307042,912.545952926,8.14640085566e-08,0.000100081464009,2.83915821533,1,13,-2.83915821533,12,accepted,94.054634152,False +0,912.545952926,794.044539517,5.18057476338e-08,0.000100051805748,3.00110960171,2,14,-3.00110960171,13,accepted,448.037645884,False +0,912.545952926,794.044539517,5.18057476338e-08,0.000100051805748,3.00110960171,2,14,-3.00110960171,13,accepted,448.037645884,False +0,912.545952926,794.044539517,5.18057476338e-08,0.000100051805748,3.00110960171,3,15,-3.00110960171,14,accepted,448.037645884,False +0,912.545952926,794.044539517,5.18057476338e-08,0.000100051805748,3.00110960171,3,15,-3.00110960171,14,accepted,448.037645884,False +0,794.044539517,464.508307042,9.21291357633e-08,0.000100092129136,2.89183632446,4,16,-2.89183632446,15,accepted,369.891914497,False +0,464.508307042,794.044539517,9.21291357633e-08,0.000100092129136,2.81925891819,4,16,-2.81925891819,15,accepted,369.891914497,False +0,794.044539517,464.508307042,9.21291357633e-08,0.000100092129136,2.89183632446,3,17,-2.89183632446,16,accepted,466.03460926,False +0,794.044539517,464.508307042,9.21291357633e-08,0.000100092129136,2.89183632446,3,17,-2.89183632446,16,accepted,466.03460926,False +0,794.044539517,464.508307042,9.21291357633e-08,0.000100092129136,2.89183632446,4,18,-2.89183632446,17,accepted,466.03460926,False +0,794.044539517,464.508307042,9.21291357633e-08,0.000100092129136,2.89183632446,4,18,-2.89183632446,17,accepted,466.03460926,False +0,464.508307042,912.545952926,8.14640085566e-08,0.000100081464009,2.83915821533,5,19,-2.83915821533,18,accepted,94.054634152,False +0,464.508307042,794.044539517,9.21291357633e-08,0.000100092129136,2.81925891819,5,19,-2.81925891819,18,accepted,94.054634152,False diff --git a/tests/framework/Optimizers/GeneticAlgorithms/tests b/tests/framework/Optimizers/GeneticAlgorithms/tests index 41c8d13124..aa68675636 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/tests +++ b/tests/framework/Optimizers/GeneticAlgorithms/tests @@ -384,4 +384,14 @@ rel_err = 0.001 [../] [../] + + [./GAwithEnsembleModelIncludingCode] + type = 'RavenFramework' + input = 'continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml' + [./csv] + type = OrderedCSV + output = 'continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/opt_export.csv' + rel_err = 0.001 + [../] + [../] [] From 336bae37af4d8495643ecbe99947fe93728bef81 Mon Sep 17 00:00:00 2001 From: Andrea Alfonsi - NuCube Date: Tue, 7 May 2024 21:54:07 -0600 Subject: [PATCH 03/17] Update tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml --- .../test_ensembleModel_withGA_Code_and_Functions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml index 6669059867..493e335c4b 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml @@ -2,7 +2,7 @@ framework/Optimizers/GeneticAlgorithms.GAwithEnsembleModelIncludingCode - mandd + alfoa 2024-05-07 Models.EnsembleModel, Optimizers.GeneticAlgorithm From da32086e95a2098be9e4b5209e4053e836faa455 Mon Sep 17 00:00:00 2001 From: alfoa Date: Tue, 7 May 2024 21:57:56 -0600 Subject: [PATCH 04/17] removed trailing --- .../metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py index d603251c19..23f5ac615b 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py @@ -3,4 +3,4 @@ def evaluate(self): return self.decay_A+0.0001 - + From 6077f56e2b053f60c7e6df7a1cb1726d11775780 Mon Sep 17 00:00:00 2001 From: alfoa Date: Wed, 8 May 2024 07:20:36 -0600 Subject: [PATCH 05/17] added missing input file --- .../referenceInput.xml | 39 +++++++++++++++++++ ...nsembleModel_withGA_Code_and_Functions.xml | 3 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100755 tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/referenceInput.xml diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/referenceInput.xml b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/referenceInput.xml new file mode 100755 index 0000000000..cf7894809f --- /dev/null +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/referenceInput.xml @@ -0,0 +1,39 @@ + + + 300 + 1 1 1 + 1e14 1e14 1e14 + 0 100 200 400 + 100 100 100 + + + N1 + 1.0 + $RAVEN-decay_A|10$ + $RAVEN-sigma-A|10$ + 230 + + + N2 + 1.0 + $RAVEN-decay_B:0.000000006$ + $RAVEN-sigma-B:5$ + 200 + + + N3 + 1.0 + $RAVEN-decay-C:0.000000008$ + $RAVEN-sigma-C:3$ + 150 + + + N4 + 1.0 + $RAVEN-decay-D:0.000000009$ + $RAVEN-sigma-D:1$ + 100 + + + + diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml index 493e335c4b..451d6f8583 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml @@ -34,7 +34,8 @@ python - A,B,C,D,sum + A,B,C,D + sum From c7f27bf40c83d2cf1fbe2bfcffe4e561d3a8913e Mon Sep 17 00:00:00 2001 From: Andrea Alfonsi - NuCube Date: Wed, 8 May 2024 07:34:06 -0600 Subject: [PATCH 06/17] Update tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py --- .../metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py index 23f5ac615b..69a89d3383 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/decayConstantB.py @@ -3,4 +3,3 @@ def evaluate(self): return self.decay_A+0.0001 - From af23869359be99aeef11a84095363112e7692378 Mon Sep 17 00:00:00 2001 From: alfoa Date: Thu, 9 May 2024 07:24:10 -0600 Subject: [PATCH 07/17] isinstance --- ravenframework/Steps/MultiRun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ravenframework/Steps/MultiRun.py b/ravenframework/Steps/MultiRun.py index a5e40dc127..321c3ad72d 100644 --- a/ravenframework/Steps/MultiRun.py +++ b/ravenframework/Steps/MultiRun.py @@ -214,7 +214,7 @@ def _localTakeAstepRun(self, inDictionary): for idx in currentFailures: finishedJobList.pop(idx) - if type(finishedJobObjs).__name__ in 'list': # TODO: should be consistent, if no batching should batch size be 1 or 0 ? + if isinstance(finishedJobObjs, list): # TODO: should be consistent, if no batching should batch size be 1 or 0 ? # if sampler claims it's batching, then only collect once, since it will collect the batch # together, not one-at-a-time # FIXME: IN HERE WE SEND IN THE INSTANCE OF THE FIRST JOB OF A BATCH From ee2f53f3a1f5c71d65ff2940f2908feba664abcb Mon Sep 17 00:00:00 2001 From: alfoa Date: Thu, 9 May 2024 12:36:28 -0600 Subject: [PATCH 08/17] fixed parallel execution --- plugins/BayCal | 2 +- plugins/HERON | 2 +- ravenframework/Models/EnsembleModel.py | 19 +- ...nsembleModel_withGA_Code_and_Functions.xml | 2 +- .../MaxwReplacementDiffDist/opt_export_0.csv | 192 ------------------ .../MaxwoReplacementDiffDist/opt_export_0.csv | 192 ------------------ .../gold/simpleKnapsack/PrintOptOut_1.csv | 135 ------------ .../simpleKnapsack/PrintOptOut_export_1.csv | 2 - .../Optimizers/GeneticAlgorithms/tests | 2 +- 9 files changed, 17 insertions(+), 531 deletions(-) delete mode 100644 tests/framework/Optimizers/GeneticAlgorithms/gold/MaxwReplacementDiffDist/opt_export_0.csv delete mode 100644 tests/framework/Optimizers/GeneticAlgorithms/gold/MaxwoReplacementDiffDist/opt_export_0.csv delete mode 100644 tests/framework/Optimizers/GeneticAlgorithms/gold/simpleKnapsack/PrintOptOut_1.csv delete mode 100644 tests/framework/Optimizers/GeneticAlgorithms/gold/simpleKnapsack/PrintOptOut_export_1.csv diff --git a/plugins/BayCal b/plugins/BayCal index 348b6e57de..276a7a5c43 160000 --- a/plugins/BayCal +++ b/plugins/BayCal @@ -1 +1 @@ -Subproject commit 348b6e57de060bc528be99b8d63f922142948d6e +Subproject commit 276a7a5c43df6c15dab07213de9ebf7255c8bd06 diff --git a/plugins/HERON b/plugins/HERON index febe0ba485..518a099dbe 160000 --- a/plugins/HERON +++ b/plugins/HERON @@ -1 +1 @@ -Subproject commit febe0ba48542b908393c59af0594c72d5e75af00 +Subproject commit 518a099dbefd81fd8bce10686f87987c5cc74c45 diff --git a/ravenframework/Models/EnsembleModel.py b/ravenframework/Models/EnsembleModel.py index 0c7450775b..6d2d53df91 100644 --- a/ravenframework/Models/EnsembleModel.py +++ b/ravenframework/Models/EnsembleModel.py @@ -549,6 +549,7 @@ def submit(self,myInput,samplerType,jobHandler,**kwargs): for index in range(nRuns): if batchMode: kw = kwargs['batchInfo']['batchRealizations'][index] + kw['batchRun'] = index + 1 else: kw = kwargs @@ -667,8 +668,11 @@ def _externalRun(self,inRun, jobHandler = None):#, jobHandler): else: self.raiseAnError(IOError,"No initial conditions provided for variable "+ initialConditionToSet) # set new identifiers - inputKwargs[modelIn]['prefix'] = modelIn+utils.returnIdSeparator()+identifier - inputKwargs[modelIn]['uniqueHandler'] = self.name+identifier + suffix = '' + if 'batchRun' in inputKwargs[modelIn]: + suffix = f"{utils.returnIdSeparator()}{inputKwargs[modelIn]['batchRun']}" + inputKwargs[modelIn]['prefix'] = modelIn+utils.returnIdSeparator()+identifier + suffix + inputKwargs[modelIn]['uniqueHandler'] = self.name + identifier + suffix if metadataToTransfer is not None: inputKwargs[modelIn]['metadataToTransfer'] = metadataToTransfer @@ -742,9 +746,11 @@ def __advanceModel(self, identifier, modelToExecute, origInputList, inputKwargs, @ Out, evaluation, dict, the evaluation dictionary with the "unprojected" data """ returnDict = {} - + suffix = '' + if 'batchRun' in inputKwargs: + suffix = f"{utils.returnIdSeparator()}{inputKwargs['batchRun']}" self.raiseADebug('Submitting model',modelToExecute['Instance'].name) - localIdentifier = modelToExecute['Instance'].name+utils.returnIdSeparator()+identifier + localIdentifier = f"{modelToExecute['Instance'].name}{utils.returnIdSeparator()}{identifier}{suffix}" if self.parallelStrategy == 1: # we evaluate the model directly try: @@ -763,7 +769,7 @@ def __advanceModel(self, identifier, modelToExecute, origInputList, inputKwargs, time.sleep(1.e-3) moveOn = True # get job that just finished to gather the results - finishedRun = jobHandler.getFinished(jobIdentifier = localIdentifier, uniqueHandler=self.name+identifier) + finishedRun = jobHandler.getFinished(jobIdentifier = localIdentifier, uniqueHandler=f"{self.name}{identifier}{suffix}") evaluation = finishedRun[0].getEvaluation() if isinstance(evaluation, rerror): if finishedRun[0].exceptionTrace is not None: @@ -774,7 +780,8 @@ def __advanceModel(self, identifier, modelToExecute, origInputList, inputKwargs, evaluation = None # the model failed for modelToRemove in list(set(self.orderList) - set([modelToExecute['Instance'].name])): - jobHandler.getFinished(jobIdentifier = modelToRemove + utils.returnIdSeparator() + identifier, uniqueHandler = self.name + identifier) + jobHandler.getFinished(jobIdentifier = f"{modelToRemove}{utils.returnIdSeparator()}{identifier}{suffix}", uniqueHandler = f"{self.name}{identifier}{suffix}") + else: # collect the target evaluation modelToExecute['Instance'].collectOutput(finishedRun[0],inRunTargetEvaluations) diff --git a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml index 451d6f8583..16c9e6d553 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml +++ b/tests/framework/Optimizers/GeneticAlgorithms/continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml @@ -18,7 +18,7 @@ optimize metaModelWithCodeAndFunctionsAndGenetic - 1 + 2 diff --git a/tests/framework/Optimizers/GeneticAlgorithms/gold/MaxwReplacementDiffDist/opt_export_0.csv b/tests/framework/Optimizers/GeneticAlgorithms/gold/MaxwReplacementDiffDist/opt_export_0.csv deleted file mode 100644 index 847763b610..0000000000 --- a/tests/framework/Optimizers/GeneticAlgorithms/gold/MaxwReplacementDiffDist/opt_export_0.csv +++ /dev/null @@ -1,192 +0,0 @@ -x1,x2,x3,ans,age,batchId,fitness,iteration,accepted,conv_objective -6.0,6.0,10.0,48.0,0.0,1.0,-0.0104166666667,0.0,first,0.0 -4.0,6.0,8.0,40.0,0.0,1.0,-0.0125,0.0,first,0.0 -2.0,2.0,8.0,30.0,0.0,1.0,-0.0166666666667,0.0,first,0.0 -3.0,5.0,8.0,37.0,0.0,1.0,-0.0135135135135,0.0,first,0.0 -6.0,1.0,9.0,35.0,0.0,1.0,-0.0142857142857,0.0,first,0.0 -2.0,2.0,10.0,36.0,0.0,1.0,-0.0138888888889,0.0,first,0.0 -6.0,6.0,8.0,42.0,0.0,1.0,-0.0119047619048,0.0,first,0.0 -3.0,5.0,9.0,40.0,0.0,1.0,-0.0125,0.0,first,0.0 -3.0,3.0,7.0,30.0,0.0,1.0,-0.0166666666667,0.0,first,0.0 -4.0,4.0,9.0,39.0,0.0,1.0,-0.0128205128205,0.0,first,0.0 -3.0,2.0,8.0,31.0,0.0,2.0,-0.0161290322581,1.0,accepted,0.0 -6.0,6.0,9.0,45.0,0.0,2.0,-0.0111111111111,1.0,accepted,0.0 -5.0,2.0,8.0,33.0,0.0,2.0,-0.0151515151515,1.0,accepted,0.0 -6.0,5.0,8.0,40.0,0.0,2.0,-0.0125,1.0,accepted,0.0 -6.0,2.0,8.0,34.0,0.0,2.0,-0.0147058823529,1.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,2.0,-0.0119047619048,1.0,accepted,0.0 -3.0,6.0,10.0,45.0,0.0,2.0,-0.0111111111111,1.0,accepted,0.0 -6.0,2.0,10.0,40.0,0.0,2.0,-0.0125,1.0,accepted,0.0 -5.0,6.0,9.0,44.0,0.0,2.0,-0.0113636363636,1.0,accepted,0.0 -3.0,5.0,8.0,37.0,0.0,2.0,-0.0135135135135,1.0,accepted,0.0 -3.0,6.0,9.0,42.0,0.0,2.0,-0.0119047619048,1.0,accepted,0.0 -3.0,6.0,10.0,45.0,0.0,2.0,-0.0111111111111,1.0,accepted,0.0 -6.0,6.0,9.0,45.0,0.0,2.0,-0.0111111111111,1.0,accepted,0.0 -3.0,6.0,10.0,45.0,0.0,2.0,-0.0111111111111,1.0,accepted,0.0 -3.0,6.0,8.0,39.0,0.0,2.0,-0.0128205128205,1.0,accepted,0.0 -6.0,5.0,9.0,43.0,0.0,2.0,-0.0116279069767,1.0,accepted,0.0 -3.0,6.0,10.0,45.0,0.0,2.0,-0.0111111111111,1.0,accepted,0.0 -5.0,5.0,10.0,45.0,0.0,2.0,-0.0111111111111,1.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,2.0,-0.0104166666667,1.0,accepted,0.0 -3.0,6.0,10.0,45.0,0.0,2.0,-0.0111111111111,1.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,3.0,-0.0104166666667,2.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,3.0,-0.0104166666667,2.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,3.0,-0.0104166666667,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,3.0,-0.0104166666667,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,3.0,-0.0104166666667,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,3.0,-0.0104166666667,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,3.0,-0.0104166666667,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,3.0,-0.0104166666667,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,8.0,42.0,0.0,3.0,-0.0119047619048,2.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,2.0,4.0,-0.0104166666667,3.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,5.0,-0.0104166666667,4.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,6.0,-0.0104166666667,5.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,7.0,-0.0104166666667,6.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,8.0,-0.0104166666667,7.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,9.0,-0.0104166666667,8.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,accepted,0.0 -6.0,6.0,10.0,48.0,0.0,10.0,-0.0104166666667,9.0,final,0.0 diff --git a/tests/framework/Optimizers/GeneticAlgorithms/gold/MaxwoReplacementDiffDist/opt_export_0.csv b/tests/framework/Optimizers/GeneticAlgorithms/gold/MaxwoReplacementDiffDist/opt_export_0.csv deleted file mode 100644 index d8c8f47063..0000000000 --- a/tests/framework/Optimizers/GeneticAlgorithms/gold/MaxwoReplacementDiffDist/opt_export_0.csv +++ /dev/null @@ -1,192 +0,0 @@ -x1,x2,x3,ans,age,batchId,fitness,iteration,accepted,conv_objective -5.0,6.0,2.0,23.0,0.0,1.0,-0.0217391304348,0.0,first,0.0 -2.0,6.0,3.0,23.0,0.0,1.0,-0.0217391304348,0.0,first,0.0 -6.0,1.0,8.0,32.0,0.0,1.0,-0.015625,0.0,first,0.0 -2.0,6.0,5.0,29.0,0.0,1.0,-0.0172413793103,0.0,first,0.0 -2.0,5.0,9.0,39.0,0.0,1.0,-0.0128205128205,0.0,first,0.0 -4.0,3.0,10.0,40.0,0.0,1.0,-0.0125,0.0,first,0.0 -5.0,1.0,1.0,10.0,0.0,1.0,-0.05,0.0,first,0.0 -3.0,5.0,3.0,22.0,0.0,1.0,-0.0227272727273,0.0,first,0.0 -6.0,1.0,7.0,29.0,0.0,1.0,-0.0172413793103,0.0,first,0.0 -6.0,4.0,1.0,17.0,0.0,1.0,-0.0294117647059,0.0,first,0.0 -1.0,2.0,10.0,35.0,0.0,2.0,-0.0142857142857,1.0,accepted,0.0 -1.0,4.0,9.0,36.0,0.0,2.0,-0.0138888888889,1.0,accepted,0.0 -1.0,4.0,10.0,39.0,0.0,2.0,-0.0128205128205,1.0,accepted,0.0 -2.0,5.0,9.0,39.0,0.0,2.0,-0.0128205128205,1.0,accepted,0.0 -5.0,4.0,10.0,43.0,0.0,2.0,-0.0116279069767,1.0,accepted,0.0 -1.0,6.0,10.0,43.0,0.0,2.0,-0.0116279069767,1.0,accepted,0.0 -2.0,4.0,10.0,40.0,0.0,2.0,-0.0125,1.0,accepted,0.0 -1.0,6.0,9.0,40.0,0.0,2.0,-0.0125,1.0,accepted,0.0 -6.0,5.0,4.0,28.0,0.0,2.0,-0.0178571428571,1.0,accepted,0.0 -3.0,1.0,8.0,29.0,0.0,2.0,-0.0172413793103,1.0,accepted,0.0 -5.0,1.0,9.0,34.0,0.0,2.0,-0.0147058823529,1.0,accepted,0.0 -1.0,6.0,10.0,43.0,0.0,2.0,-0.0116279069767,1.0,accepted,0.0 -2.0,1.0,9.0,31.0,0.0,2.0,-0.0161290322581,1.0,accepted,0.0 -1.0,6.0,9.0,40.0,0.0,2.0,-0.0125,1.0,accepted,0.0 -5.0,1.0,6.0,25.0,0.0,2.0,-0.02,1.0,accepted,0.0 -2.0,5.0,10.0,42.0,0.0,2.0,-0.0119047619048,1.0,accepted,0.0 -4.0,6.0,4.0,28.0,0.0,2.0,-0.0178571428571,1.0,accepted,0.0 -6.0,5.0,4.0,28.0,0.0,2.0,-0.0178571428571,1.0,accepted,0.0 -2.0,1.0,10.0,34.0,0.0,2.0,-0.0147058823529,1.0,accepted,0.0 -5.0,6.0,9.0,44.0,0.0,2.0,-0.0113636363636,1.0,accepted,0.0 -6.0,1.0,2.0,14.0,0.0,3.0,-0.0357142857143,2.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,3.0,-0.025,2.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,3.0,-0.025,2.0,accepted,0.0 -6.0,4.0,7.0,35.0,0.0,3.0,-0.0142857142857,2.0,accepted,0.0 -1.0,5.0,10.0,41.0,0.0,3.0,-0.0121951219512,2.0,accepted,0.0 -6.0,4.0,7.0,35.0,0.0,3.0,-0.0142857142857,2.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,3.0,-0.025,2.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,3.0,-0.0121951219512,2.0,accepted,0.0 -6.0,6.0,2.0,24.0,0.0,3.0,-0.0208333333333,2.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,3.0,-0.0113636363636,2.0,accepted,0.0 -6.0,5.0,2.0,22.0,0.0,3.0,-0.0227272727273,2.0,accepted,0.0 -6.0,4.0,3.0,23.0,0.0,3.0,-0.0217391304348,2.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,3.0,-0.025,2.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,3.0,-0.0121951219512,2.0,accepted,0.0 -6.0,4.0,5.0,29.0,0.0,3.0,-0.0172413793103,2.0,accepted,0.0 -6.0,5.0,4.0,28.0,0.0,3.0,-0.0178571428571,2.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,3.0,-0.025,2.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,3.0,-0.0121951219512,2.0,accepted,0.0 -6.0,5.0,4.0,28.0,0.0,3.0,-0.0178571428571,2.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,3.0,-0.0121951219512,2.0,accepted,0.0 -6.0,2.0,4.0,22.0,0.0,4.0,-0.0227272727273,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,4.0,-0.025,3.0,accepted,0.0 -5.0,6.0,10.0,47.0,0.0,4.0,-0.0106382978723,3.0,accepted,0.0 -6.0,3.0,2.0,18.0,0.0,4.0,-0.0277777777778,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,4.0,-0.025,3.0,accepted,0.0 -6.0,1.0,2.0,14.0,0.0,4.0,-0.0357142857143,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,3.0,10.0,42.0,0.0,4.0,-0.0119047619048,3.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,4.0,-0.025,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,4.0,-0.0113636363636,3.0,accepted,0.0 -6.0,3.0,2.0,18.0,0.0,4.0,-0.0277777777778,3.0,accepted,0.0 -6.0,2.0,10.0,40.0,0.0,4.0,-0.0125,3.0,accepted,0.0 -6.0,4.0,2.0,20.0,0.0,4.0,-0.025,3.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,5.0,-0.0113636363636,4.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,6.0,-0.0113636363636,5.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,5.0,9.0,43.0,0.0,7.0,-0.0116279069767,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,3.0,9.0,39.0,0.0,7.0,-0.0128205128205,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,5.0,10.0,46.0,0.0,7.0,-0.0108695652174,6.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,7.0,-0.0121951219512,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,7.0,-0.0113636363636,6.0,accepted,0.0 -6.0,2.0,9.0,37.0,0.0,7.0,-0.0135135135135,6.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,8.0,-0.0121951219512,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,5.0,9.0,43.0,0.0,8.0,-0.0116279069767,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,1.0,9.0,35.0,0.0,8.0,-0.0142857142857,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,2.0,9.0,37.0,0.0,8.0,-0.0135135135135,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,8.0,-0.0113636363636,7.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,3.0,10.0,42.0,0.0,9.0,-0.0119047619048,8.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,9.0,-0.0121951219512,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,2.0,10.0,40.0,0.0,9.0,-0.0125,8.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,9.0,-0.0121951219512,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,3.0,9.0,39.0,0.0,9.0,-0.0128205128205,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,9.0,-0.0113636363636,8.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,9.0,-0.0121951219512,8.0,accepted,0.0 -6.0,2.0,10.0,40.0,0.0,9.0,-0.0125,8.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,5.0,10.0,46.0,0.0,10.0,-0.0108695652174,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,3.0,9.0,39.0,0.0,10.0,-0.0128205128205,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,5.0,10.0,46.0,0.0,10.0,-0.0108695652174,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,10.0,-0.0121951219512,9.0,accepted,0.0 -6.0,5.0,10.0,46.0,0.0,10.0,-0.0108695652174,9.0,accepted,0.0 -6.0,4.0,10.0,44.0,0.0,10.0,-0.0113636363636,9.0,accepted,0.0 -6.0,5.0,10.0,46.0,0.0,10.0,-0.0108695652174,9.0,accepted,0.0 -6.0,6.0,9.0,45.0,0.0,10.0,-0.0111111111111,9.0,accepted,0.0 -6.0,5.0,10.0,46.0,0.0,10.0,-0.0108695652174,9.0,accepted,0.0 -6.0,4.0,9.0,41.0,0.0,10.0,-0.0121951219512,9.0,accepted,0.0 -5.0,6.0,10.0,47.0,0.0,10.0,-0.0106382978723,9.0,final,0.0 diff --git a/tests/framework/Optimizers/GeneticAlgorithms/gold/simpleKnapsack/PrintOptOut_1.csv b/tests/framework/Optimizers/GeneticAlgorithms/gold/simpleKnapsack/PrintOptOut_1.csv deleted file mode 100644 index 8f133488cb..0000000000 --- a/tests/framework/Optimizers/GeneticAlgorithms/gold/simpleKnapsack/PrintOptOut_1.csv +++ /dev/null @@ -1,135 +0,0 @@ -proj1,proj2,proj3,proj4,proj5,proj6,proj7,proj8,proj9,proj10,planValue,validPlan,ProbabilityWeight-proj8,ProbabilityWeight-proj3,ProbabilityWeight-proj2,ProbabilityWeight-proj7,ProbabilityWeight-proj9,ProbabilityWeight-proj1,ProbabilityWeight,ProbabilityWeight-proj6,ProbabilityWeight-proj4,ProbabilityWeight-proj10,PointProbability,prefix,ProbabilityWeight-proj5,batchId -0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,5,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,1,0.5,1 -0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,4,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,1,0.5,1 -0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,8,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,1,0.5,1 -0.0,1.0,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765625,5,0.5,5 -0.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,7,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,5,0.5,5 -0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,6,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,5,0.5,5 -0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,6,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,5,0.5,5 -0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,5,1.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,5,0.5,5 -0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,1,1.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,5,0.5,5 -0.0,0.0,0.0,1.0,0.0,1.0,0.0,0.0,0.0,0.0,4,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,5,0.5,5 -0.0,0.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,6,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,5,0.5,5 -0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,6,0.0,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,0.5,0.0009765625,5,0.5,5 diff --git a/tests/framework/Optimizers/GeneticAlgorithms/gold/simpleKnapsack/PrintOptOut_export_1.csv b/tests/framework/Optimizers/GeneticAlgorithms/gold/simpleKnapsack/PrintOptOut_export_1.csv deleted file mode 100644 index 46dbd37daf..0000000000 --- a/tests/framework/Optimizers/GeneticAlgorithms/gold/simpleKnapsack/PrintOptOut_export_1.csv +++ /dev/null @@ -1,2 +0,0 @@ -trajID,proj1,proj2,proj3,proj4,proj5,proj6,proj7,proj8,proj9,proj10,planValue -0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,7 diff --git a/tests/framework/Optimizers/GeneticAlgorithms/tests b/tests/framework/Optimizers/GeneticAlgorithms/tests index aa68675636..1e172bb00d 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/tests +++ b/tests/framework/Optimizers/GeneticAlgorithms/tests @@ -389,7 +389,7 @@ type = 'RavenFramework' input = 'continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml' [./csv] - type = OrderedCSV + type = UnorderedCsv output = 'continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/opt_export.csv' rel_err = 0.001 [../] From 7fba8070f08ad4a637e209481070cff79e910e9b Mon Sep 17 00:00:00 2001 From: alfoa Date: Thu, 9 May 2024 12:54:12 -0600 Subject: [PATCH 09/17] readded heron and baycal? --- plugins/BayCal | 2 +- plugins/HERON | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/BayCal b/plugins/BayCal index 276a7a5c43..348b6e57de 160000 --- a/plugins/BayCal +++ b/plugins/BayCal @@ -1 +1 @@ -Subproject commit 276a7a5c43df6c15dab07213de9ebf7255c8bd06 +Subproject commit 348b6e57de060bc528be99b8d63f922142948d6e diff --git a/plugins/HERON b/plugins/HERON index 518a099dbe..febe0ba485 160000 --- a/plugins/HERON +++ b/plugins/HERON @@ -1 +1 @@ -Subproject commit 518a099dbefd81fd8bce10686f87987c5cc74c45 +Subproject commit febe0ba48542b908393c59af0594c72d5e75af00 From 9f077b8f789dd6707613d71a155a1180115e62ec Mon Sep 17 00:00:00 2001 From: alfoa Date: Thu, 9 May 2024 12:54:46 -0600 Subject: [PATCH 10/17] removed trailing spaces --- ravenframework/Models/EnsembleModel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ravenframework/Models/EnsembleModel.py b/ravenframework/Models/EnsembleModel.py index 6d2d53df91..42360dffbb 100644 --- a/ravenframework/Models/EnsembleModel.py +++ b/ravenframework/Models/EnsembleModel.py @@ -670,7 +670,7 @@ def _externalRun(self,inRun, jobHandler = None):#, jobHandler): # set new identifiers suffix = '' if 'batchRun' in inputKwargs[modelIn]: - suffix = f"{utils.returnIdSeparator()}{inputKwargs[modelIn]['batchRun']}" + suffix = f"{utils.returnIdSeparator()}{inputKwargs[modelIn]['batchRun']}" inputKwargs[modelIn]['prefix'] = modelIn+utils.returnIdSeparator()+identifier + suffix inputKwargs[modelIn]['uniqueHandler'] = self.name + identifier + suffix if metadataToTransfer is not None: @@ -781,7 +781,7 @@ def __advanceModel(self, identifier, modelToExecute, origInputList, inputKwargs, # the model failed for modelToRemove in list(set(self.orderList) - set([modelToExecute['Instance'].name])): jobHandler.getFinished(jobIdentifier = f"{modelToRemove}{utils.returnIdSeparator()}{identifier}{suffix}", uniqueHandler = f"{self.name}{identifier}{suffix}") - + else: # collect the target evaluation modelToExecute['Instance'].collectOutput(finishedRun[0],inRunTargetEvaluations) From ab60b733356e96e595f9d72ac8ca2a7c7084e13e Mon Sep 17 00:00:00 2001 From: alfoa Date: Thu, 9 May 2024 13:04:50 -0600 Subject: [PATCH 11/17] some cleaning --- ravenframework/Models/EnsembleModel.py | 39 +++++++++++++++----------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/ravenframework/Models/EnsembleModel.py b/ravenframework/Models/EnsembleModel.py index 42360dffbb..49cd72645b 100644 --- a/ravenframework/Models/EnsembleModel.py +++ b/ravenframework/Models/EnsembleModel.py @@ -11,9 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -""" -Module where the base class and the specialization of different type of Model are -""" + #for future compatibility with Python 3-------------------------------------------------------------- from __future__ import division, print_function, unicode_literals, absolute_import #End compatibility block for Python 3---------------------------------------------------------------- @@ -38,7 +36,8 @@ class EnsembleModel(Dummy): """ - EnsembleModel class. This class is aimed to create a comunication 'pipe' among different models in terms of Input/Output relation + EnsembleModel class. This class is aimed to create a comunication 'pipe' among + different models in terms of Input/Output relation """ @classmethod def specializeValidateDict(cls): @@ -118,7 +117,9 @@ def localInputAndChecks(self,xmlNode): # list(metadataToTranfer, ModelSource,Alias (optional)) if 'source' not in childChild.attrib.keys(): self.raiseAnError(IOError, 'when metadataToTransfer XML block is defined, the "source" attribute must be inputted!') - self.modelsInputDictionary[modelName][childChild.tag].append([childChild.text.strip(),childChild.attrib['source'],childChild.attrib.get("alias",None)]) + self.modelsInputDictionary[modelName][childChild.tag].append([childChild.text.strip(), + childChild.attrib['source'], + childChild.attrib.get("alias",None)]) else: try: self.modelsInputDictionary[modelName][childChild.tag].append(childChild.text.strip()) @@ -158,7 +159,7 @@ def __readSettings(self, xmlNode): elif child.tag == 'initialConditions': for var in child: if "repeat" in var.attrib.keys(): - self.initialConditions[var.tag] = np.repeat([float(var.text.split()[0])], int(var.attrib['repeat'])) #np.array([float(var.text.split()[0]) for _ in range(int(var.attrib['repeat']))]) + self.initialConditions[var.tag] = np.repeat([float(var.text.split()[0])], int(var.attrib['repeat'])) else: try: values = var.text.split() @@ -342,7 +343,8 @@ def initialize(self,runInfo,inputs,initDict=None): self.raiseAnError(IOError,"Picard's iterations mode activated but no initial conditions provided!") else: if len(self.initialStartModels) !=0: - self.raiseAnError(IOError, "The 'initialStartModels' xml node is not needed for non-Picard calculations, since the running sequence can be automatically determined by the code! Please delete this node to avoid a mistake.") + self.raiseAnError(IOError, "The 'initialStartModels' xml node is not needed for non-Picard calculations, " + "since the running sequence can be automatically determined by the code! Please delete this node to avoid a mistake.") self.raiseAMessage("EnsembleModel connections determined a linear system. Picard's iterations not activated!") for modelIn in self.modelsDictionary.keys(): @@ -395,7 +397,7 @@ def __selectInputSubset(self,modelName, kwargs): for key in kwargs["SampledVars"].keys(): if key in self.modelsDictionary[modelName]['Input']: selectedkwargs['SampledVars'][key] = kwargs["SampledVars"][key] - selectedkwargs['SampledVarsPb'][key] = kwargs["SampledVarsPb"][key] if 'SampledVarsPb' in kwargs.keys() and key in kwargs["SampledVarsPb"].keys() else 1.0 + selectedkwargs['SampledVarsPb'][key] = kwargs["SampledVarsPb"][key] if 'SampledVarsPb' in kwargs and key in kwargs["SampledVarsPb"] else 1. return selectedkwargs def createNewInput(self,myInput,samplerType,**kwargs): @@ -422,7 +424,7 @@ def createNewInput(self,myInput,samplerType,**kwargs): for modelIn, specs in self.modelsDictionary.items(): for inp in specs['Input']: if inp not in allCoveredVariables: - self.raiseAnError(RuntimeError,"for sub-model "+ modelIn + " the input "+inp+" has not been found among other models' outputs and sampled variables!") + self.raiseAnError(RuntimeError,f"for sub-model {modelIn} the input {inp} has not been found among other models' outputs and sampled variables!") ## Now prepare the new inputs for each model for modelIn, specs in self.modelsDictionary.items(): @@ -488,8 +490,8 @@ def collectOutput(self,finishedJob,output): def getAdditionalInputEdits(self,inputInfo): """ - Collects additional edits for the sampler to use when creating a new input. In this case, it calls all the getAdditionalInputEdits methods - of the sub-models + Collects additional edits for the sampler to use when creating a new input. In this case, + it calls all the getAdditionalInputEdits methods of the sub-models @ In, inputInfo, dict, dictionary in which to add edits @ Out, None. """ @@ -671,8 +673,8 @@ def _externalRun(self,inRun, jobHandler = None):#, jobHandler): suffix = '' if 'batchRun' in inputKwargs[modelIn]: suffix = f"{utils.returnIdSeparator()}{inputKwargs[modelIn]['batchRun']}" - inputKwargs[modelIn]['prefix'] = modelIn+utils.returnIdSeparator()+identifier + suffix - inputKwargs[modelIn]['uniqueHandler'] = self.name + identifier + suffix + inputKwargs[modelIn]['prefix'] = f"{modelIn}{utils.returnIdSeparator()}{identifier}{suffix}" + inputKwargs[modelIn]['uniqueHandler'] = f"{self.name}{identifier}{suffix}" if metadataToTransfer is not None: inputKwargs[modelIn]['metadataToTransfer'] = metadataToTransfer @@ -680,7 +682,7 @@ def _externalRun(self,inRun, jobHandler = None):#, jobHandler): inputKwargs[modelIn]["SampledVars" ][key] = dependentOutput[key] ## FIXME it is a mistake (Andrea). The SampledVarsPb for this variable should be transferred from outside ## Who has this information? -- DPM 4/11/17 - inputKwargs[modelIn]["SampledVarsPb"][key] = 1.0 + inputKwargs[modelIn]["SampledVarsPb"][key] = 1. self._replaceVariablesNamesWithAliasSystem(inputKwargs[modelIn]["SampledVars" ],'input',False) self._replaceVariablesNamesWithAliasSystem(inputKwargs[modelIn]["SampledVarsPb"],'input',False) ## FIXME: this will come after we rework the "runInfo" collection in the code @@ -707,8 +709,10 @@ def _externalRun(self,inRun, jobHandler = None):#, jobHandler): if iterationCount == 1: residueContainer[modelIn]['iterValues'][1][out] = np.zeros(len(residueContainer[modelIn]['iterValues'][0][out])) for out in gotOutputs[modelCnt].keys(): - residueContainer[modelIn]['residue'][out] = abs(np.asarray(residueContainer[modelIn]['iterValues'][0][out]) - np.asarray(residueContainer[modelIn]['iterValues'][1][out])) - residueContainer[modelIn]['Norm'] = np.linalg.norm(np.asarray(list(residueContainer[modelIn]['iterValues'][1].values()))-np.asarray(list(residueContainer[modelIn]['iterValues'][0].values()))) + residueContainer[modelIn]['residue'][out] = abs(np.asarray(residueContainer[modelIn]['iterValues'][0][out]) - + np.asarray(residueContainer[modelIn]['iterValues'][1][out])) + residueContainer[modelIn]['Norm'] = np.linalg.norm(np.asarray(list(residueContainer[modelIn]['iterValues'][1].values()))- + np.asarray(list(residueContainer[modelIn]['iterValues'][0].values()))) # if nonlinear system, check the total residue and convergence if self.activatePicard: @@ -780,7 +784,8 @@ def __advanceModel(self, identifier, modelToExecute, origInputList, inputKwargs, evaluation = None # the model failed for modelToRemove in list(set(self.orderList) - set([modelToExecute['Instance'].name])): - jobHandler.getFinished(jobIdentifier = f"{modelToRemove}{utils.returnIdSeparator()}{identifier}{suffix}", uniqueHandler = f"{self.name}{identifier}{suffix}") + jobHandler.getFinished(jobIdentifier = f"{modelToRemove}{utils.returnIdSeparator()}{identifier}{suffix}", + uniqueHandler = f"{self.name}{identifier}{suffix}") else: # collect the target evaluation From 54f43a494c608c57e208b6cbef926883660c58ea Mon Sep 17 00:00:00 2001 From: alfoa Date: Thu, 9 May 2024 13:32:40 -0600 Subject: [PATCH 12/17] fixed test name and rook error message --- rook/main.py | 3 +++ tests/framework/Optimizers/GeneticAlgorithms/tests | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rook/main.py b/rook/main.py index f5ad258b43..f5fc1c0bed 100644 --- a/rook/main.py +++ b/rook/main.py @@ -471,6 +471,9 @@ def term_handler(signum, _): for child in node.children: #print(test_name,"child",child) child_type = child.attrib['type'] + if child_type not in differs: + raise IOError("Differ type '" + child_type + "' unknown! Available are: " + ', '.join(list(differs.keys())) + + ". Test file: "+ test_file) child_param_handler = differs[child_type].get_valid_params() if not child_param_handler.check_for_required(child.attrib): raise IOError("Missing Parameters in: " + child.tag + "/" + node.tag + diff --git a/tests/framework/Optimizers/GeneticAlgorithms/tests b/tests/framework/Optimizers/GeneticAlgorithms/tests index 1e172bb00d..8701e76540 100644 --- a/tests/framework/Optimizers/GeneticAlgorithms/tests +++ b/tests/framework/Optimizers/GeneticAlgorithms/tests @@ -389,7 +389,7 @@ type = 'RavenFramework' input = 'continuous/unconstrained/test_ensembleModel_withGA_Code_and_Functions.xml' [./csv] - type = UnorderedCsv + type = UnorderedCSV output = 'continuous/unconstrained/metaModelWithCodeAndFunctionsAndGenetic/opt_export.csv' rel_err = 0.001 [../] From a5224933340163c14c345221e573e9c3fe2e6d92 Mon Sep 17 00:00:00 2001 From: alfoa Date: Fri, 10 May 2024 12:26:32 -0600 Subject: [PATCH 13/17] module ensemble doc --- ravenframework/Models/EnsembleModel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ravenframework/Models/EnsembleModel.py b/ravenframework/Models/EnsembleModel.py index 49cd72645b..ef295b2fe6 100644 --- a/ravenframework/Models/EnsembleModel.py +++ b/ravenframework/Models/EnsembleModel.py @@ -11,7 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +""" + EnsembleModel module, containing the class and methods to create a comunication 'pipeline' among + different models in terms of Input/Output relation +""" #for future compatibility with Python 3-------------------------------------------------------------- from __future__ import division, print_function, unicode_literals, absolute_import #End compatibility block for Python 3---------------------------------------------------------------- From 5856f6b47dba2d5733013a4fcaa5ab62f37f8702 Mon Sep 17 00:00:00 2001 From: Andrea Alfonsi - NuCube Date: Mon, 13 May 2024 15:42:38 -0600 Subject: [PATCH 14/17] Apply suggestions from code review --- rook/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rook/main.py b/rook/main.py index f5fc1c0bed..67fe6f309a 100644 --- a/rook/main.py +++ b/rook/main.py @@ -472,8 +472,8 @@ def term_handler(signum, _): #print(test_name,"child",child) child_type = child.attrib['type'] if child_type not in differs: - raise IOError("Differ type '" + child_type + "' unknown! Available are: " + ', '.join(list(differs.keys())) + - ". Test file: "+ test_file) + raise IOError("Differ type '" + child_type + "' unknown! Available are: " + + ', '.join(list(differs.keys())) + ". Test file: "+ test_file) child_param_handler = differs[child_type].get_valid_params() if not child_param_handler.check_for_required(child.attrib): raise IOError("Missing Parameters in: " + child.tag + "/" + node.tag + From f83fb3048b8a72f9a78bb8de807437745cbd77f1 Mon Sep 17 00:00:00 2001 From: alfoa Date: Mon, 13 May 2024 15:45:45 -0600 Subject: [PATCH 15/17] removed trailing whitespaces --- rook/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rook/main.py b/rook/main.py index 67fe6f309a..4cf4584d7e 100644 --- a/rook/main.py +++ b/rook/main.py @@ -472,7 +472,7 @@ def term_handler(signum, _): #print(test_name,"child",child) child_type = child.attrib['type'] if child_type not in differs: - raise IOError("Differ type '" + child_type + "' unknown! Available are: " + + raise IOError("Differ type '" + child_type + "' unknown! Available are: " + ', '.join(list(differs.keys())) + ". Test file: "+ test_file) child_param_handler = differs[child_type].get_valid_params() if not child_param_handler.check_for_required(child.attrib): From d3c7069be99dea3f491e0be1ffa2d2e5bd45ff66 Mon Sep 17 00:00:00 2001 From: alfoa Date: Mon, 13 May 2024 17:03:08 -0600 Subject: [PATCH 16/17] fix for 'cvxpy'...this is not a very maintainable way to handle such exceptions --- scripts/library_handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/library_handler.py b/scripts/library_handler.py index 64c0187e9d..ebc709002c 100644 --- a/scripts/library_handler.py +++ b/scripts/library_handler.py @@ -54,7 +54,7 @@ # some bad actors can't use the metadata correctly # and so need special treatment # -> see findLibAndVersion -metaExceptions = ['pyside2', 'AMSC', 'PIL'] +metaExceptions = ['pyside2', 'AMSC', 'PIL', 'cvxpy'] # load up the ravenrc if it's present ## TODO we only want to do this once, but does it need to get updated? @@ -215,6 +215,8 @@ def findLibAndVersion(lib, version=None): return findLibAndVersionSubprocess('AMSC') elif lib == 'PIL': return findLibAndVersionSubprocess('PIL') + elif lib == 'cvxpy': + return findLibAndVersionSubprocess('cvxpy') else: raise NotImplementedError('Library "{}" on exception list, but no exception implemented!'.format(lib)) return found, output, foundVersion From 7ff765916d50c843a6a4357b206dc219bbda3bd0 Mon Sep 17 00:00:00 2001 From: alfoa Date: Mon, 13 May 2024 17:13:31 -0600 Subject: [PATCH 17/17] changed approach --- scripts/library_handler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/library_handler.py b/scripts/library_handler.py index ebc709002c..8f8c84f5ed 100644 --- a/scripts/library_handler.py +++ b/scripts/library_handler.py @@ -54,7 +54,7 @@ # some bad actors can't use the metadata correctly # and so need special treatment # -> see findLibAndVersion -metaExceptions = ['pyside2', 'AMSC', 'PIL', 'cvxpy'] +metaExceptions = ['pyside2', 'AMSC', 'PIL'] # load up the ravenrc if it's present ## TODO we only want to do this once, but does it need to get updated? @@ -170,6 +170,9 @@ def checkSingleLibrary(lib, version=None, useImportCheck=False): ## this avoids actually importing the modules if usePackageMeta and not useImportCheck: found, msg, foundVersion = findLibAndVersion(lib, version=version) + if not found: + # try slower approach + found, msg, foundVersion = findLibAndVersionSubprocess(lib, version=version) # otherwise, use the slower subprocess method else: found, msg, foundVersion = findLibAndVersionSubprocess(lib, version=version) @@ -215,8 +218,6 @@ def findLibAndVersion(lib, version=None): return findLibAndVersionSubprocess('AMSC') elif lib == 'PIL': return findLibAndVersionSubprocess('PIL') - elif lib == 'cvxpy': - return findLibAndVersionSubprocess('cvxpy') else: raise NotImplementedError('Library "{}" on exception list, but no exception implemented!'.format(lib)) return found, output, foundVersion