added the controlsClass#10
Merged
DrPaulSharp merged 15 commits intoRascalSoftware:mainfrom Sep 25, 2023
Merged
Conversation
DrPaulSharp
reviewed
Sep 19, 2023
Collaborator
DrPaulSharp
left a comment
There was a problem hiding this comment.
This looks good and should do the job well. I think though that we should look to implement the procedure classes in pydantic - we will get all of the same functionality and save a LOT of lines of code. You can see how it works in "RAT/models.py"
41 tasks
edf088d to
01d29de
Compare
DrPaulSharp
reviewed
Sep 22, 2023
Collaborator
DrPaulSharp
left a comment
There was a problem hiding this comment.
You've done a great job of using pydantic here, and it definitely makes for some cleaner code. Have a look at the comments here, and one they're sorted I'll have a closer look at the tests.
DrPaulSharp
approved these changes
Sep 25, 2023
Collaborator
DrPaulSharp
left a comment
There was a problem hiding this comment.
This looks great, well done. Just a couple of minor points to address and then we're there!
DrPaulSharp
added a commit
that referenced
this pull request
Sep 25, 2023
This reverts commit 6f329ed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task List
ParallelOptionsProceduresDisplayOptionsBoundHandlingOptionsStrategyOptionsBaseProcedurewith following properties:- parallel
- calcSldDuringFit
- resamPars
- display
Calculatewith following properties:- procedure
Simplexwith following properties:- procedure
- tolX
- tolFun
- maxFunEvals
- maxIter
- updateFreq
- updatePlotFreq
DEwith following properties:- procedure
- populationSize
- fWeight
- crossoverProbability
- strategy
- targetValue
- numGenerations
NSwith following properties:- procedure
- Nlive
- Nmcmc
- propScale
- nsTolerance
Dreamwith following properties:- procedure
- nSamples
- nChains
- jumpProb originally named
lambdain MATLAB- pUnitGamma
- boundHandling
ControlsClass.__repr__method.What kind of change does this PR introduce ?
What is the current behaviour ?
pythonversion of RAT lacked thecontrolClass. Closes Add thecontrolsClass#7What is the new behaviour ?
ControlsClassin the python version of RAT which allows users to define the calculation settings.Does this PR introduce a breaking change ?
lambdavariable from MATLAB class is renamed in python version tojumpProb.NoneinboundHandlingOptionsenum from MATLAB is renamed in python version tooff.Other Information
setProceduremethod from the MATLAB class is dropped in the python version.Usage
Create
ControlsClassby passing procedure. If no procedure is provided then it is set toProcedures.Calculate.Properties can be updated individually after
ControlsClassis created.Properties can also be set when
ControlsClassis created by passing**kwargs.