Skip to content
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: Optimizer #461

Merged
merged 30 commits into from
Dec 12, 2017
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5c170c8
adaptive sparse grid, sobol working
PaulTalbot-INL Dec 5, 2017
e9c9347
Adaptive sampling, plus Dummy-based rlz updates from input, output
PaulTalbot-INL Dec 5, 2017
bbdbbf9
cleanup
PaulTalbot-INL Dec 5, 2017
27699ed
added cluster labeling to outstream print, will be tested with optimizer
PaulTalbot-INL Dec 6, 2017
ac9feb3
optimizers working, but need to fix reading from CSV before merging
PaulTalbot-INL Dec 6, 2017
80ceb1b
stash
PaulTalbot-INL Dec 6, 2017
f51566d
fixed prefix as numpy array
PaulTalbot-INL Dec 6, 2017
c60f110
loading CSV correctly now, so optimizer can find optimal solns
PaulTalbot-INL Dec 6, 2017
cf9aab1
cleanup
PaulTalbot-INL Dec 6, 2017
4465ee1
now handling infs and nans
PaulTalbot-INL Dec 6, 2017
58b9fdb
Merge branch 'talbpaul/csv-read-fix' into talbpaul/optimizer
PaulTalbot-INL Dec 6, 2017
1583e10
mergefixes
PaulTalbot-INL Dec 6, 2017
5e5a150
cleanup
PaulTalbot-INL Dec 7, 2017
e563371
added the option to avoid to reprint the files in case their content …
alfoa Dec 8, 2017
97aac72
reverted 101 tests modified by the conversion scripts (by mistake)
alfoa Dec 8, 2017
6efb5ad
reverted other tests
alfoa Dec 8, 2017
f384661
reverted tests user guide
alfoa Dec 8, 2017
8db4e86
reverted all the other tests
alfoa Dec 8, 2017
5dc8ea2
Update beale.xml
alfoa Dec 8, 2017
068ecb9
removed "
alfoa Dec 8, 2017
a39aec0
Merge branch 'talbpaul/optimizer' of https://github.com/idaholab/rave…
alfoa Dec 8, 2017
0f2eab5
Merge branch 'dataobject-rework' of https://github.com/idaholab/raven…
alfoa Dec 8, 2017
82af4fc
removed abstract method that has been removed from the XDataSet
alfoa Dec 8, 2017
b3a8a6a
fixed with respect to the new prefix strategy
alfoa Dec 8, 2017
b9d437a
fixed loading of dataset in case no metadata are found in the xml (fi…
alfoa Dec 8, 2017
e1bd4d4
fixed type in ROM causing a failure
alfoa Dec 8, 2017
7336602
fixed another typo that was making the Dummy.py model to fail
alfoa Dec 8, 2017
480ce33
removed whitespace that was added from another commit
PaulTalbot-INL Dec 11, 2017
c1609c1
updated to use pd.isnull instead of np.isnan in unordered CSV differ
PaulTalbot-INL Dec 11, 2017
70a2a99
test files for differ
PaulTalbot-INL Dec 11, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions framework/DataObjects/XDataSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,11 +918,11 @@ def _fromCSVXML(self,fName):
# check if we have anything from which to read
try:
meta,_ = xmlUtils.loadToTree(fName+'.xml')
self.raiseADebug('Reading metadata from "{}.xml"'.format(fName))
haveMeta = True
except IOError:
haveMeta = False
finally:
self.raiseADebug('Reading metadata from "{}.xml"'.format(fName))
haveMeta = True

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this change actually changes anything ...

Copy link
Collaborator

@alfoa alfoa Dec 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does...

finally: is always executed and you were setting the haveMeta = True in there.
So even if the except was setting the haveMeta = False the finally was always resetting it to True causing the code to crash right below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it should definitely be "else" instead of "finally". True. We should avoid putting too many things in the "try" though, as that is prone to misguided error statements.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope self.raiseADebug never fails :)

# if nothing to load, return nothing
if not haveMeta:
return metadata
Expand Down