Skip to content

Fix statsmodels deprecation in demo extension #55

@daniel-thom

Description

@daniel-thom

CI reported this failure when it used statsmodels v0.13.0. Jade now restricts it to v0.12.

    def test_autoregression_analysis(test_data_dir):
        """Should return csv result and png plot"""
        country = "Mock Country"
        data = os.path.join(test_data_dir, "demo", "mock_country.csv")
        output = os.path.join(tempfile.gettempdir(), "jade-unit-test-dir")
        os.makedirs(output, exist_ok=True)
    
>       result_file, plot_file = autoregression_analysis(country, data, output)

tests/unit/extensions/demo/test_autoregression_execution.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
jade/extensions/demo/autoregression_execution.py:40: in autoregression_analysis
    model = AR(train)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <statsmodels.tsa.ar_model.AR object at 0x7f4837017c70>
args = (array([ 100,  200,  300,  400,  500,  550,  600,  650,  700,  750,  800,
        900, 1000, 1100, 1200, 1300, 1350, 1400, 1450]),)
kwargs = {}

    def __init__(self, *args, **kwargs):
>       raise NotImplementedError(
            "AR has been removed from statsmodels and replaced with "
            "statsmodels.tsa.ar_model.AutoReg."
        )
E       NotImplementedError: AR has been removed from statsmodels and replaced with statsmodels.tsa.ar_model.AutoReg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions