[ana6, com8]: Add ana6Optimisation Module, apply changes in com8MoTPSA#1245
[ana6, com8]: Add ana6Optimisation Module, apply changes in com8MoTPSA#1245RolandFischbacher wants to merge 3 commits into
Conversation
Analysis for project
|
| Tool | Category | Rule | Count | |
|---|---|---|---|---|
| black | Style | Incorrect formatting, autoformat by running qlty fmt. |
3 | ❌ |
@qltysh one-click actions:
- Auto-fix formatting (
qlty fmt && git push)
f66f702 to
38e42ca
Compare
Squash of 20 commits from RF_com8MoTPSA branch including: - com8MoTPSA workflow improvements (chunked multiprocessing, path handling) - Bayesian optimisation integration (ana6Optimisation module) - Morris sensitivity analysis scripts - AIMEC runout reference implementation - probAna pickle saving and bounds - Plotting and config improvements
|
Coverage Impact ⬇️ Merging this pull request will decrease total coverage on Modified Components (1)
Modified Files with Diff Coverage (2)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
awirb
left a comment
There was a problem hiding this comment.
first comments, more to come
awirb
left a comment
There was a problem hiding this comment.
comments for the optimisation part and plotting still missing
- fix(probAna): restore missing bounds and config writing after merge - Add bounds to paramValuesD in createSamplesWithVariation (StandardParameters) - Add writing of visualisation scenario and sampling method to com8MoTPSACfg.ini - refactor(runScripts): `runPlotAreaRefDiffs`,removing unused conditions and checks - fix: handle new _L1/_L2 naming in merging logic and rename some variables - change function name, move parameter to ini file, change values of ini file, delete redundant code - Add: if __name__ == '__main__' - Fix: remove duplicate in com8MoTPSAMain and read chunkSize from avaframeCfg.ini nCPU - Implement a direct call of com8MoTPSAMain with updated cfgs (writeCfgFiles in optimisationUtils.py), add possibility to RUN writeCfgFiles with counter - Use logging instead of print in optimisationUtils.py - Add sklearn (scikit-learn) to the requirements in pyproject.toml and clean header - Implement modName to make code general and remove adjustText package - Initialize index and sampleMethod with np.nan to avoid UnboundLocalError and stale values and remove copy paste error. - Add a check if 'VISUALISATION' exists in cfgStart, if not, it will be added to cfgStart. - And read sample method with fallback; meaning if 'PROBANA' or 'sampleMethod' is missing sample_method contains an empty string - Make optimisationType case-insensitive, add raise ValueErrors, update docstring, tidy up code, add if __name__='__main__': in runPlotMorrisConvergence.py and improve BOConvergencePlot. - Add description of Loss function to README_ana6.md and add parameter names from paper to com8MoTPSACfg.ini. - Add description of Loss function to README_ana6.md. - Add more info and layer handling in Cfg.ini files,swap scenario 1 and 2 (1 more important), - Revise README_ana6.md - Use cfg.getint(...) instead of int(cfg(...)), swap scenario 1 and 2 (consistent with runOptimisationCfg.ini) and add comments. - Improve documentation, construct the filename of AIMEC results from AIMECcfg.ini settings and not pass AIMEC module for calcArealIndicatorsAndAIMEC - Add definition of chunkSize to probAnaCfg.ini, if left empty 10 is used as default - Fix typo in com8MoTPSACfg.ini and Fix cfg handling in runPlotMorrisConvergence.py - Add y scaled boxplot and boxplot of simulations with no PSC - Add information about sample size - Add function: plotComparisonBoxplots
- adjust to work for com1DFA too - simplify workflow so that not full aimec analysis is performed but just runoutLineDiff comparison and only for one simulation not all always - move to separate functions, fix bugs - add override settings required for aimec in optimisation - move to config - update README, adjust ini file, runscript, loop over sims, choose result layer - adjust runscript - adjust ini file - loop over sims - chose also result layer - RF added: Move GP surrogate variables to ini file and update README_ana6.md
| # Read scenario flag | ||
| scenario = cfgOpt.getint('PARAM_BOUNDS', 'scenario') | ||
|
|
||
| avaName = avaDir.split('/')[-1] |
There was a problem hiding this comment.
| avaName = avaDir.split('/')[-1] | |
| avaName = pathlib.Path(avaDir).name |

This PR introduces a new optimisation module
ana6Optimisationforcom8MoTPSAand updates the simulation workflow.The module ana6Optimisation includes:
New files in ana6Opitmisaton:
runMorrisSA.py(configuration:runMorrisSACfg.ini)runPlotMorrisConvergence.py(usesrunMorrisSACfg.ini)runOptimisation.py(configuration:runOptimisationCfg.ini)optimisationUtils.pyREADME_ana6.md(contains usage instructions)New file in out3Plot:
outAna6Plots.pyChanged workflow of runing com8MoTPSA: