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

[Bug] test suite fails with ...AttributeError: '<SOME_CLASS>' object has no attribute 'runTest' #1575

Open
2 tasks done
GaetanLepage opened this issue Sep 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@GaetanLepage
Copy link

GaetanLepage commented Sep 20, 2024

Prerequisite

Environment

OrderedDict([('sys.platform', 'linux'),
             ('Python', '3.12.5 (main, Aug  6 2024, 19:08:49) [GCC 13.3.0]'),
             ('CUDA available', False),
             ('MUSA available', False),
             ('numpy_random_seed', 2147483648),
             ('GCC', 'gcc (GCC) 13.3.0'),
             ('PyTorch', '2.4.0'),
             ('PyTorch compiling details',
              'PyTorch built with:\n'
              '  - GCC 13.3\n'
              '  - C++ Version: 201703\n'
              '  - Intel(R) MKL-DNN v3.4.2 (Git Hash N/A)\n'
              '  - OpenMP 201511 (a.k.a. OpenMP 4.5)\n'
              '  - LAPACK is enabled (usually provided by MKL)\n'
              '  - CPU capability usage: AVX2\n'
              '  - Build settings: BLAS_INFO=open, BUILD_TYPE=Release, '
              'CXX_COMPILER=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gcc-wrapper-13.3.0/bin/g++, '
              'CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=1 '
              '-fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG '
              '-DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER '
              '-DUSE_FBGEMM -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK '
              '-DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra '
              '-Werror=return-type -Werror=non-virtual-dtor '
              '-Werror=range-loop-construct -Werror=bool-operation -Wnarrowing '
              '-Wno-missing-field-initializers -Wno-type-limits '
              '-Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter '
              '-Wno-unused-function -Wno-unused-result -Wno-strict-overflow '
              '-Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override '
              '-Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast '
              '-Wno-missing-braces -fdiagnostics-color=always -faligned-new '
              '-Wno-unused-but-set-variable -Wno-maybe-uninitialized '
              '-fno-math-errno -fno-trapping-math -Werror=format '
              '-Wno-stringop-overflow, LAPACK_INFO=open, PERF_WITH_AVX=1, '
              'PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.4.0, '
              'USE_CUDA=OFF, USE_CUDNN=OFF, USE_CUSPARSELT=OFF, '
              'USE_EIGEN_FOR_BLAS=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, '
              'USE_GLOG=OFF, USE_GLOO=ON, USE_MKL=OFF, USE_MKLDNN=1, '
              'USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=0, USE_OPENMP=ON, '
              'USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF, \n'),
             ('OpenCV', '4.9.0'),
             ('MMEngine', '0.10.5')])

Reproduces the problem - code sample

Not relevant.

Reproduces the problem - command or script

pytest

Reproduces the problem - error message

=========================== short test summary info ============================
ERROR tests/test_hooks/test_sync_buffers_hook.py::MultiProcessTestCase - AttributeError: 'MultiProcessTestCase' object has no attribute 'runTest'. D...
ERROR tests/test_hooks/test_sync_buffers_hook.py::TestSyncBuffersHook - AttributeError: 'TestSyncBuffersHook' object has no attribute 'runTest'. Di...
ERROR tests/test_model/test_wrappers/test_model_wrapper.py::MultiProcessTestCase - AttributeError: 'MultiProcessTestCase' object has no attribute 'runTest'. D...
ERROR tests/test_model/test_wrappers/test_model_wrapper.py::TestDistributedDataParallel - AttributeError: 'TestDistributedDataParallel' object has no attribute 'runT...
ERROR tests/test_model/test_wrappers/test_model_wrapper.py::TestMMSeparateDistributedDataParallel - AttributeError: 'TestMMSeparateDistributedDataParallel' object has no attri...
ERROR tests/test_model/test_wrappers/test_model_wrapper.py::TestMMFullyShardedDataParallel - AttributeError: 'TestMMFullyShardedDataParallel' object has no attribute 'r...
ERROR tests/test_optim/test_optimizer/test_optimizer.py::MultiProcessTestCase - AttributeError: 'MultiProcessTestCase' object has no attribute 'runTest'. D...
ERROR tests/test_optim/test_optimizer/test_optimizer.py::TestZeroOptimizer - AttributeError: 'TestZeroOptimizer' object has no attribute 'runTest'. Did ...
ERROR tests/test_optim/test_optimizer/test_optimizer_wrapper.py::MultiProcessTestCase - AttributeError: 'MultiProcessTestCase' object has no attribute 'runTest'. D...
ERROR tests/test_optim/test_optimizer/test_optimizer_wrapper.py::TestOptimWrapper - AttributeError: 'TestOptimWrapper' object has no attribute 'runTest'. Did y...
!!!!!!!!!!!!!!!!!!! Interrupted: 10 errors during collection !!!!!!!!!!!!!!!!!!!
================ 64 deselected, 18 warnings, 10 errors in 5.03s ================

Additional information

Context: Fixing mmengine in the nixpkgs repository: NixOS/nixpkgs#343207

Could this be caused by a missing test dependency ?

Thank you very much in advance for your help !

@GaetanLepage GaetanLepage added the bug Something isn't working label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant