Closed AbSaifi closed 4 years ago
As per https://pytorch.org/docs/stable/distributed.html#backends-that-come-with-pytorch torch.distributed
is only supported for linux systems. I would skip the tests and test commands with environment variable CUDA_VISIBLE_DEVICES=0
set. Let us know if that doesn't work. I am closing this issue as it is more related to pytorch rather than mmf.
Steps :
Result --> 8 tests failed, 57 passed, 18 warnings and 2 error. Problem can be seen majorly as AttributeError: module 'torch.distributed' has no attribute 'is_nccl_available' E AssertionError: '0ms' != '000ms' E - 0ms E + 000ms E ? ++
O/p of pytest :
pytest ./tests/ ============================================================================================== test session starts =============================================================================================== platform win32 -- Python 3.7.4, pytest-5.2.1, py-1.8.0, pluggy-0.13.0 rootdir: F:\Python\DD_HM\mmf plugins: arraydiff-0.3, doctestplus-0.4.0, openfiles-0.4.0, remotedata-0.3.2 collected 67 items
tests\common\test_sample.py ... [ 4%] tests\configs\test_configs_for_keys.py .. [ 7%] tests\configs\test_zoo_urls.py . [ 8%] tests\datasets\test_base_dataset.py . [ 10%] tests\datasets\test_processors.py ... [ 14%] tests\models\test_cnn_lstm.py . [ 16%] tests\models\interfaces\test_interfaces.py F [ 17%] tests\modules\test_fusions.py .......... [ 32%] tests\modules\test_layers.py ..... [ 40%] tests\modules\test_losses.py .. [ 43%] tests\modules\test_metrics.py .......... [ 58%] tests\utils\test_checkpoint.py FFFFF.. [ 68%] tests\utils\test_configuration.py . [ 70%] tests\utils\test_distributed.py . [ 71%] tests\utils\test_download.py ... [ 76%] tests\utils\test_file_io.py .... [ 82%] tests\utils\test_general.py .. [ 85%] tests\utils\test_logger.py EE [ 88%] tests\utils\test_text.py ..... [ 95%] tests\utils\test_timer.py F.F [100%]
===================================================================================================== ERRORS ===================================================================================================== __ ERROR at setup of TestLogger.test_log_writer __
cls = <class 'tests.utils.test_logger.TestLogger'>
tests\utils\test_logger.py:31:
mmf\utils\logger.py:19: in init self._is_master = is_master() mmf\utils\distributed.py:39: in is_master return get_rank() == 0
mmf\utils\distributed.py:31: AttributeError --------------------------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------------------------- Overriding option env.save_dir to C:\Users\ABDURR~1\AppData\Local\Temp\tmpjpb0tpp3 Overriding option model to cnnlstm Overriding option datasets to clevr ____ ERROR at setup of TestLogger.test_loggerfiles ____
cls = <class 'tests.utils.test_logger.TestLogger'>
tests\utils\test_logger.py:31:
mmf\utils\logger.py:19: in init self._is_master = is_master() mmf\utils\distributed.py:39: in is_master return get_rank() == 0
mmf\utils\distributed.py:31: AttributeError ==================================================================================================== FAILURES ==================================================================================================== ___ TestModelInterfaces.test_mmbt_hm_interface ___
self =
tests\models\interfaces\test_interfaces.py:14:
mmf\models\mmbt.py:514: in from_pretrained model = super().from_pretrained(model_name, *args, kwargs) mmf\models\base_model.py:196: in from_pretrained output = load_pretrained_model(model_name, *args, *kwargs) mmf\utils\checkpoint.py:40: in load_pretrained_model download_path = download_pretrained_model(model_name_or_path, args, kwargs) mmf\utils\download.py:378: in download_pretrained_model if is_master(): mmf\utils\distributed.py:39: in is_master return get_rank() == 0
mmf\utils\distributed.py:31: AttributeError _ TestUtilsCheckpoint.test_finalize_and_restore_from_it __
self =
tests\utils\test_checkpoint.py:218:
mmf\utils\checkpoint.py:358: in save if not is_master(): mmf\utils\distributed.py:39: in is_master return get_rank() == 0
mmf\utils\distributed.py:31: AttributeError ___ TestUtilsCheckpoint.test_finalize_and_resume_file ____
self =
tests\utils\test_checkpoint.py:273:
mmf\utils\checkpoint.py:415: in finalize if is_master(): mmf\utils\distributed.py:39: in is_master return get_rank() == 0
mmf\utils\distributed.py:31: AttributeError ____ TestUtilsCheckpoint.test_pretrained_load ____
self =
tests\utils\test_checkpoint.py:471:
mmf\utils\checkpoint.py:358: in save if not is_master(): mmf\utils\distributed.py:39: in is_master return get_rank() == 0
mmf\utils\distributed.py:31: AttributeError ____ TestUtilsCheckpoint.testresets ____
self =
tests\utils\test_checkpoint.py:316:
mmf\utils\checkpoint.py:358: in save if not is_master(): mmf\utils\distributed.py:39: in is_master return get_rank() == 0
mmf\utils\distributed.py:31: AttributeError _ TestUtilsCheckpoint.test_save_and_load_state_dict __
self =
tests\utils\test_checkpoint.py:105:
mmf\utils\checkpoint.py:358: in save if not is_master(): mmf\utils\distributed.py:39: in is_master return get_rank() == 0
mmf\utils\distributed.py:31: AttributeError ____ TestUtilsTimer.test_getcurrent ____
self =
tests\utils\test_timer.py:13: AssertionError _ TestUtilsTimer.test_reset __
self =
tests\utils\test_timer.py:21: AssertionError ================================================================================================ warnings summary ================================================================================================ C:\Users\Abdurrabb\AppData\Local\Continuum\anaconda3\lib\site-packages\win32\lib\pywintypes.py:2 C:\Users\Abdurrabb\AppData\Local\Continuum\anaconda3\lib\site-packages\win32\lib\pywintypes.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp, sys, os
tests\utils\test_model.py:8 F:\Python\DD_HM\mmf\tests\utils\test_model.py:8: PytestCollectionWarning: cannot collect test class 'TestDecoderModel' because it has a init constructor (from: tests/utils/test_model.py) class TestDecoderModel(nn.Module):
tests\utils\test_model.py:8 F:\Python\DD_HM\mmf\tests\utils\test_model.py:8: PytestCollectionWarning: cannot collect test class 'TestDecoderModel' because it has a init constructor (from: tests/utils/test_text.py) class TestDecoderModel(nn.Module):
tests/configs/test_configs_for_keys.py::TestConfigsForKeys::test_dataset_configs_for_keys F:\Python\DD_HM\mmf\tests\configs\test_configs_for_keys.py:51: UserWarning: Dataset vqa2_ocr has no default configuration defined. Skipping it. Make sure it is intentional ).format(builder_key)
tests/configs/test_configs_for_keys.py::TestConfigsForKeys::test_model_configs_for_keys F:\Python\DD_HM\mmf\tests\configs\test_configs_for_keys.py:26: UserWarning: Model multihead has no default configuration defined. Skipping it. Make sure it is intentional ).format(model_key)
tests/configs/test_configs_for_keys.py::TestConfigsForKeys::test_model_configs_for_keys F:\Python\DD_HM\mmf\tests\configs\test_configs_for_keys.py:26: UserWarning: Model top_down_bottom_up has no default configuration defined. Skipping it. Make sure it is intentional ).format(model_key)
tests/modules/test_metrics.py::TestModuleMetrics::test_caption_bleu4 C:\Users\Abdurrabb\AppData\Local\Continuum\anaconda3\lib\site-packages\nltk\decorators.py:68: DeprecationWarning:
formatargspec
is deprecated since Python 3.5. Usesignature
and theSignature
object directly regargs, varargs, varkwargs, defaults, formatvalue=lambda value: ""tests/modules/test_metrics.py::TestModuleMetrics::test_caption_bleu4 C:\Users\Abdurrabb\AppData\Local\Continuum\anaconda3\lib\site-packages\nltk\lm\counter.py:15: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Sequence, defaultdict
tests/modules/test_metrics.py::TestModuleMetrics::test_caption_bleu4 C:\Users\Abdurrabb\AppData\Local\Continuum\anaconda3\lib\site-packages\nltk\lm\vocabulary.py:13: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Counter, Iterable
tests/modules/test_metrics.py::TestModuleMetrics::test_macro_f1 C:\Users\Abdurrabb\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\metrics\classification.py:1437: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples. 'precision', 'predicted', average, warn_for)
tests/modules/test_metrics.py::TestModuleMetrics::test_multilabel_macro_f1 C:\Users\Abdurrabb\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\metrics\classification.py:1439: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no true samples. 'recall', 'true', average, warn_for)
tests/utils/test_checkpoint.py::TestUtilsCheckpoint::test_finalize_and_restore_from_it tests/utils/test_checkpoint.py::TestUtilsCheckpoint::test_finalize_and_resume_file tests/utils/test_checkpoint.py::TestUtilsCheckpoint::test_pretrained_load tests/utils/test_checkpoint.py::TestUtilsCheckpoint::test_resets tests/utils/test_checkpoint.py::TestUtilsCheckpoint::test_save_and_load_state_dict tests/utils/test_checkpoint.py::TestUtilsCheckpoint::test_zoo_load F:\Python\DD_HM\mmf\mmf\models\base_model.py:162: UserWarning: 'losses' already present in model output. No calculation will be done in base model. "'losses' already present in model output. "
tests/utils/test_checkpoint.py::TestUtilsCheckpoint::test_zoo_load F:\Python\DD_HM\mmf\mmf\utils\checkpoint.py:224: UserWarning: 'optimizer' key is not present in the checkpoint asked to be loaded. Skipping. "'optimizer' key is not present in the "
-- Docs: https://docs.pytest.org/en/latest/warnings.html ========================================================================= 8 failed, 57 passed, 18 warnings, 2 error in 269.61s (0:04:29) =========================================================================