Skip to content

Commit

Permalink
remove the quick fix from estimation parameters (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mridul Seth authored Mar 5, 2020
1 parent b1b14ad commit 614a551
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions HARK/SolvingMicroDSOPs/Calibration/EstimationParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
'''
from __future__ import print_function

# ---------------------------------------------------------------------------------
# Debugging flags
# ---------------------------------------------------------------------------------

show_PermGroFacAgg_error = False
# Error Notes:
# This sets a "quick fix" to the error, AttributeError: 'TempConsumerType' object has no attribute 'PermGroFacAgg'
# If you set this flag to "True" you will see the error. A more thorough fix is to
# fix the place where this error was introduced (Set to "True" and it will appear;
# this was almost certainly introduced when the code was extended to be used in the
# GE setting). An even more thorough solution, which moves beyond the scope of
# fixing this error, is adding unit tests to ID when changes to some code will
# break things elsewhere.
# Note: alternatively, decide that the "init_consumer_objects['PermGroFacAgg'] = 1.0"
# line below fixes it properly ('feature not a bug') and remove all this text.

# ---------------------------------------------------------------------------------
# - Define all of the model parameters for SolvingMicroDSOPs and ConsumerExamples -
# ---------------------------------------------------------------------------------
Expand Down Expand Up @@ -159,12 +143,6 @@
'CubicBool':CubicBool
}

if show_PermGroFacAgg_error:
pass # do nothing
else:
print("***NOTE: using a 'quick fix' for an attribute error. See 'Error Notes' in EstimationParameter.py for further discussion.***")
init_consumer_objects['PermGroFacAgg'] = 1.0


if __name__ == '__main__':
print("Sorry, EstimationParameters doesn't actually do anything on its own.")
Expand Down

0 comments on commit 614a551

Please sign in to comment.