Skip to content

ENH: Add Hansen-Lee misspecification-robust J-test to IVGMM#701

Open
hass-nation wants to merge 1 commit into
bashtage:mainfrom
hass-nation:gmm/hansen-lee-j-test
Open

ENH: Add Hansen-Lee misspecification-robust J-test to IVGMM#701
hass-nation wants to merge 1 commit into
bashtage:mainfrom
hass-nation:gmm/hansen-lee-j-test

ENH: Add Hansen-Lee misspecification-robust J-test to IVGMM

299e3d1
Select commit
Loading
Failed to load commit list.
Azure Pipelines / bashtage.linearmodels failed Jun 28, 2026 in 36m 31s

Build #20260628.1 had test failures

Details

Tests

  • Failed: 1 (0.00%)
  • Passed: 186,265 (83.19%)
  • Other: 37,636 (16.81%)
  • Total: 223,902
Code coverage

  • 17475 of 17532 line covered (99.67%)

Annotations

Check failure on line 60 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

Build log #L60

Bash exited with code '1'.

Check failure on line 60 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

Build log #L60

Bash exited with code '1'.

Check failure on line 60 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

Build log #L60

Bash exited with code '1'.

Check failure on line 60 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

Build log #L60

Bash exited with code '1'.

Check failure on line 1 in test_notebook[iv_absorbing-regression]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / bashtage.linearmodels

test_notebook[iv_absorbing-regression]

nbclient.exceptions.CellTimeoutError: A cell timed out while it was being executed, after 120 seconds.
The message was: Cell execution timed out.
Here is a preview of the cell contents:
-------------------
from linearmodels.iv.absorbing import AbsorbingLS

mod = AbsorbingLS(y, x, absorb=cats)
print(mod.fit())
-------------------
Raw output
self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x00000187D2C49910>
msg_id = '556117af-83cee410ab0d862b8ceae743_4960_8'
cell = {'cell_type': 'code', 'execution_count': 2, 'metadata': {'execution': {'iopub.status.busy': '2026-06-28T13:34:07.35566...source': 'from linearmodels.iv.absorbing import AbsorbingLS\n\nmod = AbsorbingLS(y, x, absorb=cats)\nprint(mod.fit())'}
timeout = 120
task_poll_output_msg = <Task finished name='Task-13' coro=<NotebookClient._async_poll_output_msg() done, defined at C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\nbclient\client.py:808> result=None>
task_poll_kernel_alive = <Task cancelled name='Task-12' coro=<NotebookClient._async_poll_kernel_alive() done, defined at C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\nbclient\client.py:821>>

    async def _async_poll_for_reply(
        self,
        msg_id: str,
        cell: NotebookNode,
        timeout: int | None,
        task_poll_output_msg: asyncio.Future[t.Any],
        task_poll_kernel_alive: asyncio.Future[t.Any],
    ) -> dict[str, t.Any]:
        msg: dict[str, t.Any]
        assert self.kc is not None
        new_timeout: float | None = None
        if timeout is not None:
            deadline = monotonic() + timeout
            new_timeout = float(timeout)
        error_on_timeout_execute_reply = None
        while True:
            try:
                if error_on_timeout_execute_reply:
                    msg = error_on_timeout_execute_reply
                    msg["parent_header"] = {"msg_id": msg_id}
                else:
>                   msg = await ensure_async(self.kc.shell_channel.get_msg(timeout=new_timeout))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\nbclient\client.py:782: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\jupyter_core\utils\__init__.py:214: in ensure_async
    result = await obj
             ^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.channels.AsyncZMQSocketChannel object at 0x00000187D4130C10>
timeout = 120.0

    async def get_msg(  # type:ignore[override]
        self, timeout: float | None = None
    ) -> t.Dict[str, t.Any]:
        """Gets a message if there is one that is ready."""
        assert self.socket is not None
        timeout_ms = None if timeout is None else int(timeout * 1000)  # seconds to ms
        ready = await self.socket.poll(timeout_ms)
        if ready:
            res = await self._recv()
            return res
        else:
>           raise Empty
E           _queue.Empty

C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\jupyter_client\channels.py:330: Empty

During handling of the above exception, another exception occurred:

notebook = 'D:\\a\\1\\s\\examples\\iv_absorbing-regression.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: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\nbconvert\preprocessors\execute.py:103: in preprocess
    self.prepr
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]