Skip to content

Use astral-sh/setup-uv@v7 in GitHub actions#82

Merged
StephenOman merged 1 commit into
NetHack-LE:mainfrom
jbcoe:jbcoe/update-setup-uv
Feb 13, 2026
Merged

Use astral-sh/setup-uv@v7 in GitHub actions#82
StephenOman merged 1 commit into
NetHack-LE:mainfrom
jbcoe:jbcoe/update-setup-uv

Conversation

@jbcoe
Copy link
Copy Markdown
Collaborator

@jbcoe jbcoe commented Feb 7, 2026

Preferred version number taken from uv docs at: https://docs.astral.sh/uv/guides/integration/github/#installation

@jbcoe
Copy link
Copy Markdown
Collaborator Author

jbcoe commented Feb 7, 2026

Failure here (from threaded Python 3.13) looks like a possible race condition.

The same PR under my repo works fine jbcoe#2.

@StephenOman, can we re-trigger failed runs to see if the tests then pass? If so, we have another bug that I'm happy to investigate 🐛 .

=================================== FAILURES ===================================
_______________________ TestDataset.test_sql[threadpool] _______________________

self = <test_dataset.TestDataset object at 0x1025511c0>, db_exists = None
pool = <concurrent.futures.thread.ThreadPoolExecutor object at 0x101776cf0>

    def test_sql(self, db_exists, pool):
        sql = """
            SELECT gameid FROM datasets
            WHERE gameid >=6 AND dataset_name='basictest'
            """
        data = dataset.TtyrecDataset(
            "basictest",
            seq_length=100,
            batch_size=2,
            threadpool=pool,
            shuffle=False,
            subselect_sql=sql,
        )
    
        data2 = dataset.TtyrecDataset(
            "basictest",
            seq_length=100,
            batch_size=2,
            threadpool=pool,
            gameids=[6, 7],
            shuffle=False,
        )
        data.populate_metadata()
        data2.populate_metadata()
        assert len(data.get_meta(6)) == 27
        assert data.get_meta(6) == data2.get_meta(6)
    
        for _, (mb1, mb2) in enumerate(zip(data, data2)):
            for k in mb1.keys():
>               np.testing.assert_array_equal(mb1[k], mb2[k])
E               AssertionError: 
E               Arrays are not equal
E               
E               Mismatched elements: 1440 / 384000 (0.375%)
E               Max absolute difference among violations: 74
E               Max relative difference among violations: 1.94285714
E                ACTUAL: array([[[[ 32,  32,  32, ...,  32,  32,  32],
E                        [ 78, 101, 116, ...,  32,  32,  32],
E                        [ 32,  32,  32, ...,  32,  32,  32],...
E                DESIRED: array([[[[ 32,  32,  32, ...,  32,  32,  32],
E                        [ 78, 101, 116, ...,  32,  32,  32],
E                        [ 32,  32,  32, ...,  32,  32,  32],...

/Users/runner/work/nle/nle/nle/tests/test_dataset.py:295: AssertionError
=========================== short test summary info ============================
FAILED nle/tests/test_dataset.py::TestDataset::test_sql[threadpool] - AssertionError: 
Arrays are not equal

Mismatched elements: 1440 / 384000 (0.375%)
Max absolute difference among violations: 74
Max relative difference among violations: 1.94285714
 ACTUAL: array([[[[ 32,  32,  32, ...,  32,  32,  32],
         [ 78, 101, 116, ...,  32,  32,  32],
         [ 32,  32,  32, ...,  32,  32,  32],...
 DESIRED: array([[[[ 32,  32,  32, ...,  32,  32,  32],
         [ 78, 101, 116, ...,  32,  32,  32],
         [ 32,  32,  32, ...,  32,  32,  32],...
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
=================== 1 failed, 31 passed, 1 skipped in 13.75s ===================

@jbcoe
Copy link
Copy Markdown
Collaborator Author

jbcoe commented Feb 8, 2026

Running

while true ; do uv run --python=3.13 pytest nle/tests/test_dataset.py::TestDataset::test_sql[threadpool]; done

from a docker image did not produce failures. If there is a race condition it might be rare or easier to produce on GitHub action runners.

@StephenOman
Copy link
Copy Markdown
Collaborator

@jbcoe Tests are passing now here. PR #81 fix is causing some merge conflicts here and on your other PRs so I'll hold off on them for now.

@jbcoe jbcoe force-pushed the jbcoe/update-setup-uv branch 2 times, most recently from 3c1cfff to 4ef897c Compare February 9, 2026 22:22
@jbcoe jbcoe force-pushed the jbcoe/update-setup-uv branch from 4ef897c to fe4b14c Compare February 9, 2026 22:23
@jbcoe jbcoe marked this pull request as ready for review February 9, 2026 22:23
@jbcoe
Copy link
Copy Markdown
Collaborator Author

jbcoe commented Feb 9, 2026

The race condition (?) persists but only in this PR. I'll mark it as draft so we don't merge by mistake.

@jbcoe jbcoe marked this pull request as draft February 9, 2026 22:45
@StephenOman
Copy link
Copy Markdown
Collaborator

Tests passing on re-run. I'm curious if you pushed to multiple PRs around the same time that may have caused this?

@jbcoe
Copy link
Copy Markdown
Collaborator Author

jbcoe commented Feb 10, 2026

Odd. Thanks for the re-run.

CI should be isolated so pushing multiple PRs should not cause instability. I suspect that we have a rare race condition. I'll add sanitizers in a future PR. Feel free to add a bug.

@jbcoe jbcoe marked this pull request as ready for review February 10, 2026 23:51
@StephenOman StephenOman merged commit eefdbcd into NetHack-LE:main Feb 13, 2026
31 of 33 checks passed
@StephenOman StephenOman added the maintenance General maintenance and version updates label Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance General maintenance and version updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants