PSLmodels / Tax-Brain

Tax-Brain is an integrator model for PSL tax models
http://taxbrain.pslmodels.org/
MIT License
9 stars 14 forks source link

COMP error #59

Closed hdoupe closed 5 years ago

hdoupe commented 5 years ago

A COMP user just got this error:

Traceback (most recent call last):
  File "/home/distributed/api/celery_app/__init__.py", line 71, in f
    outputs = func(*args, **kwargs)
  File "/home/distributed/api/celery_app/pslmodels_taxbrain_tasks.py", line 30, in sim
    return compconfig.run_model(meta_param_dict, adjustment)
  File "/opt/conda/lib/python3.7/site-packages/compconfig/functions.py", line 122, in run_model
    policy_mods = convert_adj(adjustment["policy"], meta_params.year.tolist())
  File "/opt/conda/lib/python3.7/site-packages/compconfig/helpers.py", line 136, in convert_adj
    raise ValueError(msg)
ValueError: Label data_source does not match expectedlabel

using these inputs:

{
    "policy": {
        "NIIT_rt": [
            {
                "year": 2020,
                "value": 0.01
            },
            {
                "year": 2021,
                "value": 0.03
            },
            {
                "year": 2022,
                "value": 0.05
            },
            {
                "year": 2023,
                "value": 0.075
            },
            {
                "year": 2024,
                "value": 0.1
            }
        ],
        "NIIT_thd": [
            {
                "MARS": "single",
                "year": 2020,
                "value": 1000000.0
            },
            {
                "MARS": "mjoint",
                "year": 2020,
                "value": 2000000.0
            },
            {
                "MARS": "mseparate",
                "year": 2020,
                "value": 1000000.0
            },
            {
                "MARS": "headhh",
                "year": 2020,
                "value": 1200000.0
            },
            {
                "MARS": "widow",
                "year": 2020,
                "value": 1500000.0
            }
        ],
        "NIIT_PT_taxed": [
            {
                "year": 2020,
                "value": true,
                "data_source": "PUF"
            }
        ],
        "NIIT_thd_checkbox": [
            {
                "value": true
            }
        ]
    },
    "behavior": {}
}
hdoupe commented 5 years ago

59 is resolved and the patch is live on compmodels.org.