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

[Snyk] Security upgrade requests from 2.31.0 to 2.32.0 #600

Closed
wants to merge 1 commit into from

fix: doc/requirements.txt to reduce vulnerabilities

1683abc
Select commit
Loading
Failed to load commit list.
Closed

[Snyk] Security upgrade requests from 2.31.0 to 2.32.0 #600

fix: doc/requirements.txt to reduce vulnerabilities
1683abc
Select commit
Loading
Failed to load commit list.
Azure Pipelines / bashtage.linearmodels succeeded May 23, 2024 in 25m 12s

Build #20240523.1 had test failures

Details

Tests

  • Failed: 4 (0.00%)
  • Passed: 162,305 (83.26%)
  • Other: 32,619 (16.73%)
  • Total: 194,928
Code coverage

  • 17217 of 17269 line covered (99.70%)

Annotations

Check failure on line 953 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

Build log #L953

Bash exited with code '1'.

Check failure on line 1 in test_notebook[iv_advanced-examples]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

test_notebook[iv_advanced-examples]

nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
from statsmodels.api import OLS, add_constant

data["const"] = 1
controls = ["const"] + controls
------------------


#x1B[0;31m---------------------------------------------------------------------------#x1B[0m
#x1B[0;31mValueError#x1B[0m                                Traceback (most recent call last)
Cell #x1B[0;32mIn[6], line 1#x1B[0m
#x1B[0;32m----> 1#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01mstatsmodels#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m OLS, add_constant
#x1B[1;32m      3#x1B[0m data[#x1B[38;5;124m"#x1B[39m#x1B[38;5;124mconst#x1B[39m#x1B[38;5;124m"#x1B[39m] #x1B[38;5;241m=#x1B[39m #x1B[38;5;241m1#x1B[39m
#x1B[1;32m      4#x1B[0m controls #x1B[38;5;241m=#x1B[39m [#x1B[38;5;124m"#x1B[39m#x1B[38;5;124mconst#x1B[39m#x1B[38;5;124m"#x1B[39m] #x1B[38;5;241m+#x1B[39m controls

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/api.py:123#x1B[0m
#x1B[1;32m    112#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgenmod#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m api #x1B[38;5;28;01mas#x1B[39;00m genmod
#x1B[1;32m    113#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgenmod#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m (
#x1B[1;32m    114#x1B[0m     GEE,
#x1B[1;32m    115#x1B[0m     GLM,
#x1B[0;32m   (...)#x1B[0m
#x1B[1;32m    121#x1B[0m     families,
#x1B[1;32m    122#x1B[0m )
#x1B[0;32m--> 123#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgraphics#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m api #x1B[38;5;28;01mas#x1B[39;00m graphics
#x1B[1;32m    124#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgraphics#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgofplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m ProbPlot, qqline, qqplot, qqplot_2samples
#x1B[1;32m    125#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mimputation#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mbayes_mi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m MI, BayesGaussMI

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/graphics/api.py:9#x1B[0m
#x1B[1;32m      7#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgofplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m qqplot
#x1B[1;32m      8#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mplottools#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m rainbow
#x1B[0;32m----> 9#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mregressionplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m (
#x1B[1;32m     10#x1B[0m     abline_plot,
#x1B[1;32m     11#x1B[0m     influence_plot,
#x1B[1;32m     12#x1B[0m     plot_ccpr,
#x1B[1;32m     13#x1B[0m     plot_ccpr_grid,
#x1B[1;32m     14#x1B[0m     plot_fit,
#x1B[1;32m     15#x1B[0m     plot_leverage_resid2,
#x1B[1;32m     16#x1B[0m     plot_partregress,
#x1B[1;32m     17#x1B[0m     plot_partregress_grid,
#x1B[1;32m     18#x1B[0m     plot_regress_exog,
#x1B[1;32m     19#x1B[0m )
#x1B[1;32m     21#x1B[0m __all__ #x1B[38;5;241m=#x1B[39m [
#x1B[1;32m     22#x1B[0m     #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mabline_plot#x1B[39m#x1B[38;5;124m"#x1B[39m,
#x1B[1;32m     23#x1B[0m     #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mbeanplot#x1B[39m#x1B[38;5;124m"#x1B[39m,
#x1B[0;32m   (...)#x1B[0m
#x1B[1;32m     42#x1B[0m     #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mviolinplot#x1B[39m#x1B[38;5;124m"#x1B[39m,
#x1B[1;32m     43#x1B[0m ]

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/graphics/regressionplots.py:23#x1B[0m
#x1B[1;32m     21#x1B[0m #
Raw output
notebook = '/home/vsts/work/1/s/examples/iv_advanced-examples.ipynb'

    @pytest.mark.slow
    @pytest.mark.example
    @pytest.mark.skipif(SKIP, reason="Required packages not available")
    def test_notebook(notebook):
        nb_name = os.path.split(notebook)[-1]
        if MISSING_XARRAY and nb_name in NOTEBOOKS_USING_XARRAY:
            pytest.skip(f"xarray is required to test {notebook}")
    
        nb = nbformat.read(notebook, as_version=4)
        ep = ExecutePreprocessor(allow_errors=False, timeout=120, kernel_name=kernel_name)
>       ep.preprocess(nb, {"metadata": {"path": NOTEBOOK_DIR}})

linearmodels/tests/test_examples.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
    self.preprocess_cell(cell, resources, index)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
    cell = self.execute_cell(cell, index, store_history=True)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
    return loop.run_until_complete(inner)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
    return future.result()
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
    await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7fb1b9e87b90>
cell = {'cell_type': 'code', 'execution_count': 6, 'metadata': {'execution': {'iopub.status.busy': '2024-05-23T00:42:08.61322...t']}], 'source': 'from statsmodels.api import OLS, add_constant\n\ndata["const"] = 1\ncontrols = ["const"] + controls'}
cell_index = 12
exec_reply = {'buffers': [], 'content': {'ename': 'ValueError', 'engine_info': {'engine_id': -1, 'engine_uuid': '2ce97d22-7460-4690...e, 'engine': '2ce97d22-7460-4690-a29d-8fba8cc58b7a', 'started': '2024-05-23T00:42:08.613975Z', 'status': 'error'}, ...}

    async def _check_raise_for_error(
        self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
    ) -> None:
        if exec_reply is None:
            return None
    
        exec_reply_content = exec_reply["content"]
        if exec_reply_content["status"] != "error":
            return None
    
        cell_allows_errors = (not self.force_raise_errors) and (
            self.allow_errors
            or exec_reply_content.get("ename") in self.allow_error_names
            or "raises-exception" in cell.metadata.get("tags", [])
        )
        await run_hook(
            self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
        )
        if not cell_allows_errors:
>           raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E           nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E           ------------------
E           from statsmodels.api import OLS, add_constant
E           
E           data["const"] = 1
E           controls = ["const"] + controls
E           ------------------
E           
E           
E           #x1B[0;31m---------------------------------------------------------------------------#x1B[0m
E           #x1B[0;31mValueError#x1B[0m                                Traceback (most recent call last)
E           Cell #x1B[0;32mIn[6], line 1#x1B[0m
E           #x1B[0;32m----> 1#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01mstatsmodels#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m OLS, add_constant
E           #x1B[1;32m      3#x1B[0m data[#x1B[38;5;124m"#x1B[39m#x1B[38;5;124mconst#x1B[39m#x1B[38;5;124m"#x1B[39m]

Check failure on line 1 in test_notebook[iv_basic-examples]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

test_notebook[iv_basic-examples]

nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
import numpy as np
from linearmodels.datasets import mroz
from statsmodels.api import add_constant

print(mroz.DESCR)
data = mroz.load()
data = data.dropna()
data = add_constant(data, has_constant="add")
------------------


#x1B[0;31m---------------------------------------------------------------------------#x1B[0m
#x1B[0;31mValueError#x1B[0m                                Traceback (most recent call last)
Cell #x1B[0;32mIn[1], line 3#x1B[0m
#x1B[1;32m      1#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mnumpy#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m #x1B[38;5;21;01mnp#x1B[39;00m
#x1B[1;32m      2#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01mlinearmodels#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mdatasets#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m mroz
#x1B[0;32m----> 3#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01mstatsmodels#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m add_constant
#x1B[1;32m      5#x1B[0m #x1B[38;5;28mprint#x1B[39m(mroz#x1B[38;5;241m.#x1B[39mDESCR)
#x1B[1;32m      6#x1B[0m data #x1B[38;5;241m=#x1B[39m mroz#x1B[38;5;241m.#x1B[39mload()

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/api.py:123#x1B[0m
#x1B[1;32m    112#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgenmod#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m api #x1B[38;5;28;01mas#x1B[39;00m genmod
#x1B[1;32m    113#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgenmod#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m (
#x1B[1;32m    114#x1B[0m     GEE,
#x1B[1;32m    115#x1B[0m     GLM,
#x1B[0;32m   (...)#x1B[0m
#x1B[1;32m    121#x1B[0m     families,
#x1B[1;32m    122#x1B[0m )
#x1B[0;32m--> 123#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgraphics#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m api #x1B[38;5;28;01mas#x1B[39;00m graphics
#x1B[1;32m    124#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgraphics#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgofplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m ProbPlot, qqline, qqplot, qqplot_2samples
#x1B[1;32m    125#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mimputation#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mbayes_mi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m MI, BayesGaussMI

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/graphics/api.py:9#x1B[0m
#x1B[1;32m      7#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgofplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m qqplot
#x1B[1;32m      8#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mplottools#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m rainbow
#x1B[0;32m----> 9#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mregressionplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m (
#x1B[1;32m     10#x1B[0m     abline_plot,
#x1B[1;32m     11#x1B[0m     influence_plot,
#x1B[1;32m     12#x1B[0m     plot_ccpr,
#x1B[1;32m     13#x1B[0m     plot_ccpr_grid,
#x1B[1;32m     14#x1B[0m     plot_fit,
#x1B[1;32m     15#x1B[0m     plot_leverage_resid2,
#x1B[1;32m     16#x1B[0m     plot_partregress,
#x1B[1;32m     17#x1B[0m     plot_partregress_grid,
#x1B[1;32m     18#x1B[0m     plot_regress_exog,
#x1B[1;32m     19#x1B[0m )
#x1B[1;32m     21#x1B[0m __all__ #x1B[38;5;241m=#x1B[39m [
#x1B[1;32m     22#x1B[0m     #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mabline_plot#x1B[39m#x1B[38;5;124m"#x1B[39m,
#x1B[1;32m     23#x1B[0m     #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mbeanplot#x1B[39m#x1B[38;5;124m"#x1B[39m,
#x1B[0;32m   (.
Raw output
notebook = '/home/vsts/work/1/s/examples/iv_basic-examples.ipynb'

    @pytest.mark.slow
    @pytest.mark.example
    @pytest.mark.skipif(SKIP, reason="Required packages not available")
    def test_notebook(notebook):
        nb_name = os.path.split(notebook)[-1]
        if MISSING_XARRAY and nb_name in NOTEBOOKS_USING_XARRAY:
            pytest.skip(f"xarray is required to test {notebook}")
    
        nb = nbformat.read(notebook, as_version=4)
        ep = ExecutePreprocessor(allow_errors=False, timeout=120, kernel_name=kernel_name)
>       ep.preprocess(nb, {"metadata": {"path": NOTEBOOK_DIR}})

linearmodels/tests/test_examples.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
    self.preprocess_cell(cell, resources, index)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
    cell = self.execute_cell(cell, index, store_history=True)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
    return loop.run_until_complete(inner)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
    return future.result()
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
    await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7fb1b9923080>
cell = {'cell_type': 'code', 'execution_count': 1, 'metadata': {'execution': {'iopub.status.busy': '2024-05-23T00:42:12.94646...onstant\n\nprint(mroz.DESCR)\ndata = mroz.load()\ndata = data.dropna()\ndata = add_constant(data, has_constant="add")'}
cell_index = 3
exec_reply = {'buffers': [], 'content': {'ename': 'ValueError', 'engine_info': {'engine_id': -1, 'engine_uuid': 'aa3aa8c8-a01c-43b9...e, 'engine': 'aa3aa8c8-a01c-43b9-bdb3-193c56cce434', 'started': '2024-05-23T00:42:12.947326Z', 'status': 'error'}, ...}

    async def _check_raise_for_error(
        self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
    ) -> None:
        if exec_reply is None:
            return None
    
        exec_reply_content = exec_reply["content"]
        if exec_reply_content["status"] != "error":
            return None
    
        cell_allows_errors = (not self.force_raise_errors) and (
            self.allow_errors
            or exec_reply_content.get("ename") in self.allow_error_names
            or "raises-exception" in cell.metadata.get("tags", [])
        )
        await run_hook(
            self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
        )
        if not cell_allows_errors:
>           raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E           nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E           ------------------
E           import numpy as np
E           from linearmodels.datasets import mroz
E           from statsmodels.api import add_constant
E           
E           print(mroz.DESCR)
E           data = mroz.load()
E           data = data.dropna()
E           data = add_constant(data, has_constant="add")
E           ------------------
E           
E           
E           #x1B[0;31m---------------------------------------------------------------------------#x1B[0m
E           #x1B[0;31mValueError#x1B[0m                                Traceback (most recent call last)
E           Cell #x1B[0;32mIn[1], line 3#x1B[0m
E           #x1B[1;32m      1#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mnumpy#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m #x1B[38;5;21;01mnp#x1B[39;00m
E           #x1B[1;

Check failure on line 1 in test_notebook[panel_examples]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

test_notebook[panel_examples]

nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
import statsmodels.api as sm
from linearmodels.panel import PooledOLS

exog_vars = ["black", "hisp", "exper", "expersq", "married", "educ", "union", "year"]
exog = sm.add_constant(data[exog_vars])
mod = PooledOLS(data.lwage, exog)
pooled_res = mod.fit()
print(pooled_res)
------------------


#x1B[0;31m---------------------------------------------------------------------------#x1B[0m
#x1B[0;31mValueError#x1B[0m                                Traceback (most recent call last)
Cell #x1B[0;32mIn[2], line 1#x1B[0m
#x1B[0;32m----> 1#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mstatsmodels#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m #x1B[38;5;21;01msm#x1B[39;00m
#x1B[1;32m      2#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01mlinearmodels#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mpanel#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m PooledOLS
#x1B[1;32m      4#x1B[0m exog_vars #x1B[38;5;241m=#x1B[39m [#x1B[38;5;124m"#x1B[39m#x1B[38;5;124mblack#x1B[39m#x1B[38;5;124m"#x1B[39m, #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mhisp#x1B[39m#x1B[38;5;124m"#x1B[39m, #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mexper#x1B[39m#x1B[38;5;124m"#x1B[39m, #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mexpersq#x1B[39m#x1B[38;5;124m"#x1B[39m, #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mmarried#x1B[39m#x1B[38;5;124m"#x1B[39m, #x1B[38;5;124m"#x1B[39m#x1B[38;5;124meduc#x1B[39m#x1B[38;5;124m"#x1B[39m, #x1B[38;5;124m"#x1B[39m#x1B[38;5;124munion#x1B[39m#x1B[38;5;124m"#x1B[39m, #x1B[38;5;124m"#x1B[39m#x1B[38;5;124myear#x1B[39m#x1B[38;5;124m"#x1B[39m]

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/api.py:123#x1B[0m
#x1B[1;32m    112#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgenmod#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m api #x1B[38;5;28;01mas#x1B[39;00m genmod
#x1B[1;32m    113#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgenmod#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m (
#x1B[1;32m    114#x1B[0m     GEE,
#x1B[1;32m    115#x1B[0m     GLM,
#x1B[0;32m   (...)#x1B[0m
#x1B[1;32m    121#x1B[0m     families,
#x1B[1;32m    122#x1B[0m )
#x1B[0;32m--> 123#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgraphics#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m api #x1B[38;5;28;01mas#x1B[39;00m graphics
#x1B[1;32m    124#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgraphics#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgofplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m ProbPlot, qqline, qqplot, qqplot_2samples
#x1B[1;32m    125#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mimputation#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mbayes_mi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m MI, BayesGaussMI

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/graphics/api.py:9#x1B[0m
#x1B[1;32m      7#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgofplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m qqplot
#x1B[1;32m      8#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mplottools#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m rainbow
#x1B[0;32m----> 9#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mregressionplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m (
#x1B[1;32m     10#x1B[0m     abline_plot,
#x1B[1;32m     11#x1B[0m     influence_plot,
#x1B[1;32m     12#x1B[0m     plot_ccpr,
#x1B[1;32m     13#x1B[0m     plot_ccpr_grid,
#x1B[1;32m     14#x1B[0m     plot_fit,
#x1B[1;32m     15#x1B[0m     plot_leverage_resid2,
#x1B[1;32m     16#x1B[0m     plot_partregress
Raw output
notebook = '/home/vsts/work/1/s/examples/panel_examples.ipynb'

    @pytest.mark.slow
    @pytest.mark.example
    @pytest.mark.skipif(SKIP, reason="Required packages not available")
    def test_notebook(notebook):
        nb_name = os.path.split(notebook)[-1]
        if MISSING_XARRAY and nb_name in NOTEBOOKS_USING_XARRAY:
            pytest.skip(f"xarray is required to test {notebook}")
    
        nb = nbformat.read(notebook, as_version=4)
        ep = ExecutePreprocessor(allow_errors=False, timeout=120, kernel_name=kernel_name)
>       ep.preprocess(nb, {"metadata": {"path": NOTEBOOK_DIR}})

linearmodels/tests/test_examples.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
    self.preprocess_cell(cell, resources, index)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
    cell = self.execute_cell(cell, index, store_history=True)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
    return loop.run_until_complete(inner)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
    return future.result()
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
    await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7fb1b9efa6c0>
cell = {'cell_type': 'code', 'execution_count': 2, 'metadata': {'execution': {'iopub.status.busy': '2024-05-23T00:42:31.25640...exog = sm.add_constant(data[exog_vars])\nmod = PooledOLS(data.lwage, exog)\npooled_res = mod.fit()\nprint(pooled_res)'}
cell_index = 4
exec_reply = {'buffers': [], 'content': {'ename': 'ValueError', 'engine_info': {'engine_id': -1, 'engine_uuid': 'be76d54a-d048-42d6...e, 'engine': 'be76d54a-d048-42d6-9e84-785cbf15c7a1', 'started': '2024-05-23T00:42:31.258327Z', 'status': 'error'}, ...}

    async def _check_raise_for_error(
        self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
    ) -> None:
        if exec_reply is None:
            return None
    
        exec_reply_content = exec_reply["content"]
        if exec_reply_content["status"] != "error":
            return None
    
        cell_allows_errors = (not self.force_raise_errors) and (
            self.allow_errors
            or exec_reply_content.get("ename") in self.allow_error_names
            or "raises-exception" in cell.metadata.get("tags", [])
        )
        await run_hook(
            self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
        )
        if not cell_allows_errors:
>           raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E           nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E           ------------------
E           import statsmodels.api as sm
E           from linearmodels.panel import PooledOLS
E           
E           exog_vars = ["black", "hisp", "exper", "expersq", "married", "educ", "union", "year"]
E           exog = sm.add_constant(data[exog_vars])
E           mod = PooledOLS(data.lwage, exog)
E           pooled_res = mod.fit()
E           print(pooled_res)
E           ------------------
E           
E           
E           #x1B[0;31m---------------------------------------------------------------------------#x1B[0m
E           #x1B[0;31mValueError#x1B[0m                                Traceback (most recent call last)
E           Cell #x1B[0;32mIn[2], line 1#x1B[0m
E           #x1B[0;32m----> 1#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mstatsmodels#x1B[39;00m#x1B[38;5

Check failure on line 1 in test_notebook[system_examples]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

test_notebook[system_examples]

nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
# Common libraries
%matplotlib inline
import numpy as np
import pandas as pd
import statsmodels.api as sm
------------------


#x1B[0;31m---------------------------------------------------------------------------#x1B[0m
#x1B[0;31mValueError#x1B[0m                                Traceback (most recent call last)
Cell #x1B[0;32mIn[1], line 5#x1B[0m
#x1B[1;32m      3#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mnumpy#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m #x1B[38;5;21;01mnp#x1B[39;00m
#x1B[1;32m      4#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mpandas#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m #x1B[38;5;21;01mpd#x1B[39;00m
#x1B[0;32m----> 5#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mstatsmodels#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m #x1B[38;5;21;01msm#x1B[39;00m

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/api.py:123#x1B[0m
#x1B[1;32m    112#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgenmod#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m api #x1B[38;5;28;01mas#x1B[39;00m genmod
#x1B[1;32m    113#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgenmod#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mapi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m (
#x1B[1;32m    114#x1B[0m     GEE,
#x1B[1;32m    115#x1B[0m     GLM,
#x1B[0;32m   (...)#x1B[0m
#x1B[1;32m    121#x1B[0m     families,
#x1B[1;32m    122#x1B[0m )
#x1B[0;32m--> 123#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgraphics#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m api #x1B[38;5;28;01mas#x1B[39;00m graphics
#x1B[1;32m    124#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgraphics#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgofplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m ProbPlot, qqline, qqplot, qqplot_2samples
#x1B[1;32m    125#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mimputation#x1B[39;00m#x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mbayes_mi#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m MI, BayesGaussMI

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/graphics/api.py:9#x1B[0m
#x1B[1;32m      7#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mgofplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m qqplot
#x1B[1;32m      8#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mplottools#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m rainbow
#x1B[0;32m----> 9#x1B[0m #x1B[38;5;28;01mfrom#x1B[39;00m #x1B[38;5;21;01m.#x1B[39;00m#x1B[38;5;21;01mregressionplots#x1B[39;00m #x1B[38;5;28;01mimport#x1B[39;00m (
#x1B[1;32m     10#x1B[0m     abline_plot,
#x1B[1;32m     11#x1B[0m     influence_plot,
#x1B[1;32m     12#x1B[0m     plot_ccpr,
#x1B[1;32m     13#x1B[0m     plot_ccpr_grid,
#x1B[1;32m     14#x1B[0m     plot_fit,
#x1B[1;32m     15#x1B[0m     plot_leverage_resid2,
#x1B[1;32m     16#x1B[0m     plot_partregress,
#x1B[1;32m     17#x1B[0m     plot_partregress_grid,
#x1B[1;32m     18#x1B[0m     plot_regress_exog,
#x1B[1;32m     19#x1B[0m )
#x1B[1;32m     21#x1B[0m __all__ #x1B[38;5;241m=#x1B[39m [
#x1B[1;32m     22#x1B[0m     #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mabline_plot#x1B[39m#x1B[38;5;124m"#x1B[39m,
#x1B[1;32m     23#x1B[0m     #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mbeanplot#x1B[39m#x1B[38;5;124m"#x1B[39m,
#x1B[0;32m   (...)#x1B[0m
#x1B[1;32m     42#x1B[0m     #x1B[38;5;124m"#x1B[39m#x1B[38;5;124mviolinplot#x1B[39m#x1B[38;5;124m"#x1B[39m,
#x1B[1;32m     43#x1B[0m ]

File #x1B[0;32m/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/statsmodels/graphics/regressionplots.py:23#x1B[0m
#x1B[1;32m     21#x1B[
Raw output
notebook = '/home/vsts/work/1/s/examples/system_examples.ipynb'

    @pytest.mark.slow
    @pytest.mark.example
    @pytest.mark.skipif(SKIP, reason="Required packages not available")
    def test_notebook(notebook):
        nb_name = os.path.split(notebook)[-1]
        if MISSING_XARRAY and nb_name in NOTEBOOKS_USING_XARRAY:
            pytest.skip(f"xarray is required to test {notebook}")
    
        nb = nbformat.read(notebook, as_version=4)
        ep = ExecutePreprocessor(allow_errors=False, timeout=120, kernel_name=kernel_name)
>       ep.preprocess(nb, {"metadata": {"path": NOTEBOOK_DIR}})

linearmodels/tests/test_examples.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
    self.preprocess_cell(cell, resources, index)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
    cell = self.execute_cell(cell, index, store_history=True)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
    return loop.run_until_complete(inner)
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
    return future.result()
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
    await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7fb1b9923ad0>
cell = {'cell_type': 'code', 'execution_count': 1, 'metadata': {'execution': {'iopub.status.busy': '2024-05-23T00:42:40.42557...urce': '# Common libraries\n%matplotlib inline\nimport numpy as np\nimport pandas as pd\nimport statsmodels.api as sm'}
cell_index = 1
exec_reply = {'buffers': [], 'content': {'ename': 'ValueError', 'engine_info': {'engine_id': -1, 'engine_uuid': '78df8f61-cffd-421f...e, 'engine': '78df8f61-cffd-421f-a383-67851f7c0beb', 'started': '2024-05-23T00:42:40.426287Z', 'status': 'error'}, ...}

    async def _check_raise_for_error(
        self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
    ) -> None:
        if exec_reply is None:
            return None
    
        exec_reply_content = exec_reply["content"]
        if exec_reply_content["status"] != "error":
            return None
    
        cell_allows_errors = (not self.force_raise_errors) and (
            self.allow_errors
            or exec_reply_content.get("ename") in self.allow_error_names
            or "raises-exception" in cell.metadata.get("tags", [])
        )
        await run_hook(
            self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
        )
        if not cell_allows_errors:
>           raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E           nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E           ------------------
E           # Common libraries
E           %matplotlib inline
E           import numpy as np
E           import pandas as pd
E           import statsmodels.api as sm
E           ------------------
E           
E           
E           #x1B[0;31m---------------------------------------------------------------------------#x1B[0m
E           #x1B[0;31mValueError#x1B[0m                                Traceback (most recent call last)
E           Cell #x1B[0;32mIn[1], line 5#x1B[0m
E           #x1B[1;32m      3#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mnumpy#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m #x1B[38;5;21;01mnp#x1B[39;00m
E           #x1B[1;32m      4#x1B[0m #x1B[38;5;28;01mimport#x1B[39;00m #x1B[38;5;21;01mpandas#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m #x1B[38;5;21;01mpd#x