Skip to content

Commit

Permalink
take out check of taxcalc version bc not saved in cached params pickle
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Jul 21, 2022
1 parent cb601b9 commit c093ee5
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions ogusa/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def get_tax_function_parameters(
if not run_micro:
dict_params, run_micro = self.read_tax_func_estimate(p, tax_func_path)
if run_micro:
micro_data, taxcalc_version = get_micro_data.get_data(
micro_data, _ = get_micro_data.get_data(
baseline=p.baseline,
start_year=p.start_year,
reform=iit_reform,
Expand Down Expand Up @@ -281,7 +281,6 @@ def get_tax_function_parameters(
"etr_params": etr_params,
"mtrx_params": mtrx_params,
"mtry_params": mtry_params,
"taxcalc_version": taxcalc_version,
"mean_income_data": mean_income_data,
"frac_tax_payroll": frac_tax_payroll,
}
Expand All @@ -308,23 +307,6 @@ def read_tax_func_estimate(self, p, tax_func_path):
print("Tax Function Path Exists")
dict_params = safe_read_pickle(tax_func_path)
# check to see if tax_functions compatible
current_taxcalc = pkg_resources.get_distribution("taxcalc").version
try:
if current_taxcalc != dict_params["tax_calc_version"]:
print(
"WARNING: Tax function parameters estimated"
+ " from Tax Calculator version that is not "
+ " the one currently installed on this machine."
)
print(
"Current TC version is ",
current_taxcalc,
", Estimated tax functions from version ",
dict_params.get("tax_calc_version", None),
)
flag = 1
except KeyError:
pass
try:
if p.start_year != dict_params["start_year"]:
print(
Expand All @@ -339,7 +321,7 @@ def read_tax_func_estimate(self, p, tax_func_path):
print(
"Model budget window length is "
+ str(p.BW)
+ "but the tax function parameter "
+ " but the tax function parameter "
+ "estimates have a budget window length of "
+ str(dict_params["BW"])
)
Expand Down

0 comments on commit c093ee5

Please sign in to comment.