-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataobject rework - future RAVEN v 1.1 #598
Conversation
* dummy, external model both nominally working * test_Lorentz needs to pass for externalModel; however, we need hdf5 to work as output first * test_Lorentz runs, using ExternalModel, so external model and dummy both running for hist and point set
…into alfoa/dataobject-rework
Loading dataset fully from dict
…into alfoa/dataobject-rework
outstreams and performance -> dataobject-rework
* works, but ProbabilityWeight is not always provided by the sampler, like in test_Lorentz using MC * merging in developments * stash * addMetaKeys works, proved with Samplers adding ProbabilityWeight * cleanup
…into dataobject-rework
fixed write...but the history set does not work yet
…into dataobject-rework
…/raven into alfoa/dataobject-rework
…dered and consequentially a spurious diff can happen
…m_exponential PolyExponential, Spline and DMD ROMs
* expand install script for conda 4.4 and beyond * added explanatory comments
* Optimizer inherits from Sampler * first implementation: by default copy value to all entries in vector variable, works * finished test and implementation of simple repeat-value vector variable sampling * added InputSpecs for optimizer, tests pass * got input params working for optimizer * first implementation: by default copy value to all entries in vector variable, works * finished test and implementation of simple repeat-value vector variable sampling * added InputSpecs for optimizer, tests pass * got input params working for optimizer * stash * fixed gradient calculation to include vectors, all non-vector tests passing * fixed gradient calculation to include vectors, all non-vector tests passing, conditional sizing for vector grad * boundary condition checking, all passing * redundant trajectories, all passing * same coordinate check * dot product step sizing * stochastic engine is incorrectly sized; currently each entry in vector is being perturbed identically. Needs work. * working on constraints, convergence is really poor, needs more help * first boundary conditions (internal) working, although type change in precond test * constraints fully done, only precond has a problem still, vector still not converging well * debugging difference between all scalars and vector * vector * time parabola model * fixed initial step size * working, although as a vector is a bit slower than all scalars * vector is faster than scalar, reduced scale of tests (and better solution) * all passing, but precond, which is having the type error still * cleaned up, removed scalar comparison test, fixed precond test * cleanup * last bit of cleanup, all tests passing * stash, it appears customsampler and datasets are not yet compatible * xsd * stash, <what> cannot handle specific requests * reloading from dataset csv works be default * fixed unit test, vector test * xsd * CustomSampler handles Point,History,Data sets * cleanup * cleanup * updated custom sampler description docs * Optimizer uses Custom sampler with vector variables for initial points * unnecessarily-tested file * initial round of review comments * script for disclaimer adding, also added to models in optimizing test dir * increased verbosity for test debug * more verbosity for debugging * gold standard agrees with all test machines, personal cluster profile (my desktop find minimum in traj 1 of 36 instead of 220ish) * new golds
* exposed RNG to RAVEN python...swig * fixed for now dist stoch enviroment
* shape from node to attribute * constants can now be vectors too * necessary Sampler and Optimizer changes * extracted common constant reading for sampler, optimizer * including string custom vector vars * vector constant works in rrr with optimizer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finishing a review part to make sure it's placing comments in the right places.
backend_run_tests
Outdated
try: | ||
interpolationND = utils.findCrowModule('randomENG') | ||
print("randomENG","\n",randomENG) | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the "no except without an exception" rule apply to this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
framework/DataObjects/DataSet.py
Outdated
else: | ||
# need the sampleTag meta to load histories | ||
# BY DEFAULT keep everything needed to reload this entity. Inheritors can define _neededForReload to specify what that is. | ||
keep = set(self._inputs + self._outputs + self._metavars + self._neededForReload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1804 1840: Is this [:] needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this noted on the right line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, 1840 instead of 1804. That's what I get for trusting my memory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's needed. Removed.
Any comment I leave in DataSet.py after about line 1400 is placed near line 1400 on this page and not placed at all when viewing the files changed view. I will put line numbers in all my comments, but that is going to be really annoying for anyone reading my review. Any suggestions on how to fix this would be helpful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completing partial review to make sure comments in other files go where they should.
framework/DataObjects/DataSet.py
Outdated
else: | ||
# need the sampleTag meta to load histories | ||
# BY DEFAULT keep everything needed to reload this entity. Inheritors can define _neededForReload to specify what that is. | ||
keep = set(self._inputs + self._outputs + self._metavars + self._neededForReload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1842: This seems like a lot of conversion steps. Can it be reduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line in question, for reference:
fromColl = list( dict(zip(self._orderedVars,c)) for c in fromColl )
I need a list of realizations that contain hierarchal path endings, where each realization is a dictionary mapping variable names to values for that ending. I'm not sure if there'a a more abbreviated way to do this here, but I'm open to ideas.
framework/DataObjects/Factory.py
Outdated
@@ -26,7 +26,8 @@ | |||
|
|||
################################################################################ | |||
from utils import utils | |||
from DataObjects.Data import Data | |||
from DataObjects.DataObject import DataObject as Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine this is imported as Data in order to avoid a bunch of name changes throughout the file. Would it be better long term to just make all those changes? A search and replace would make very quick work of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All references already removed; so I trivially removed the alias now. Fixed.
framework/DataObjects/HistorySet.py
Outdated
|
||
#External Modules------------------------------------------------------------------------------------ | ||
import sys,os |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better separated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
framework/DataObjects/HistorySet.py
Outdated
__builtin__.profile | ||
except AttributeError: | ||
# profiler not preset, so pass through | ||
def profile(func): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This try/except seems off. If __builtin__.profile exists, then it still needs to be called as __builtin__.profile, while if it doens't, profile will exist in the main name space. If profile is already in the main name space from __builtin__, why bother importing __builtin__ to test it instead of just testing the one in the main name space? Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the accepted answer to this inquiry, where I got it from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is in that answer is exactly what I would expect here, but isn't what is here. Either the try needs to read "profile = __builtin__.profile", or the except needs to have "__builtin__.profile = profile". As written, profile is in one of two different namespaces depending on whether the try fails or not. Unless I'm missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Fixed using your first suggestion.
* pre-merge review comments addressed for modules in framework/DataObjects, with the exception of merging DataObject into DataSet * removed hierarchal unecessary use of [:] * remainder of comments addressed
For Change Control Board: Change Request ReviewThe following review must be completed by an authorized member of the Change Control Board.
|
We addressed what he asked for or postpone the comments to a subsequential PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Targets met, and both internal and external reviews passed. Tests passing. Approving for merge.
Pull Request Description
What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)
Closes #182
Closes #363
Closes #225
Closes #568 (obsolete with respect to the new DataObject)
Closes #56 (obsolete with respect to the new DataObject)
Closes #112
Closes #589
Closes #319
Closes #305
Closes #252
Closes #573
Closes #551
Closes #73
Closes #551 (overcome by establish_conda_env.sh script)
Closes #627
Closes #258
Closes #129
Closes #93
Closes #91
Closes #83
Closes #77
Closes #58
Closes #43
Closes #68
What are the significant changes in functionality due to this change request?
This PR addresses multiple Issues.
The following new features have been added:
THIS PULL REQUEST (AND THE NEW DEVEL) WILL BE THE RAVEN V 1.1 RELEASE
For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.
<internalParallel>
to True.