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

Failing tests #4344

Open
smurfd opened this issue Apr 28, 2024 · 1 comment
Open

Failing tests #4344

smurfd opened this issue Apr 28, 2024 · 1 comment

Comments

@smurfd
Copy link
Contributor

smurfd commented Apr 28, 2024

Update: Still an issue as of commit: 10cf8e4 (17th may)

Hey, im running into some errors when i run pytest like below.
Are these known problems or issue behind my keyboard ;)
Simple fix: update README.md at the bottom to say: python3 -m pytest -n=auto test/
Using latest master, as of writing...
Same problem if i run all tests until test_gc.py

MAC:
$ python3 -m pytest test/

============================================ test session starts ============================================
platform darwin -- Python 3.12.3, pytest-8.1.2, pluggy-1.5.0
rootdir: /Users/user/tinygrad
plugins: hypothesis-6.100.1, xdist-3.5.0
collected 1524 items                                                                                        

FAILED test/test_gc.py::TestGC::test_gc - ReferenceError: weakly-referenced object no longer exists
FAILED test/test_gc.py::TestGC::test_gc_complex - ReferenceError: weakly-referenced object no longer exists
============= 2 failed, 1390 passed, 129 skipped, 3 xfailed, 181 warnings in 101.12s (0:01:41) ==============

If i run it by itself, it passes.
$ python3 -m pytest test/test/test_gc.py

Ubuntu 20.04 AMDgpu, using clang provided by ROCM(if i dont use CLANG=1, i get a ton of HSA errors):

$ CLANG=1 python3 -m pytest test/
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.2.0, pluggy-1.5.0
rootdir: /home/user/tinygrad
plugins: hypothesis-6.100.2, xdist-3.6.1
collected 1524 items                
FAILED test/models/test_real_world.py::TestRealWorld::test_train_cifar - AssertionError: train_cifar used more than 154 kernels
FAILED test/test_copy_speed.py::TestCopySpeed::testCopySHMtoDefault - BlockingIOError: [Errno 11] Resource temporarily unavailable
FAILED test/test_gc.py::TestGC::test_gc - ReferenceError: weakly-referenced object no longer exists
FAILED test/test_gc.py::TestGC::test_gc_complex - ReferenceError: weakly-referenced object no longer exists
FAILED test/unit/test_shm_tensor.py::TestRawShmBuffer::test_e2e_big - BlockingIOError: [Errno 11] Resource temporarily unavailable
======================== 5 failed, 1373 passed, 143 skipped, 3 xfailed, 184 warnings in 701.13s (0:11:41) =========================

Mac python3.8

$ /opt/homebrew/bin/python3.8 -m pytest test/
============================================ test session starts ============================================
platform darwin -- Python 3.8.19, pytest-8.2.0, pluggy-1.5.0
rootdir: /Users/user/tinygrad
plugins: hypothesis-6.100.1, xdist-3.5.0
collected 1520 items / 1 error                                                                              

================================================== ERRORS ===================================================
_______________________________ ERROR collecting test/test_fuzz_shape_ops.py ________________________________
test/test_fuzz_shape_ops.py:21: in <module>
    def st_shape(draw) -> tuple[int, ...]:
E   TypeError: 'type' object is not subscriptable

this one is easy fix, use Union instead of | for typing, python below 3.10 does not allow this.

  def test_split(self, s:tuple[int, ...], dim:int, sizes:int|list[int]):
@smurfd
Copy link
Contributor Author

smurfd commented Apr 29, 2024

for mac and linux, solution for GC errors is to add : -n=auto or -n >= 4
python3 -m pytest -n=auto test/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant