We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After I upgrade my pytorch_lightning version to 1.3.5, this error occurs when I try to import pytorch_lightning in my code.
Python 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pytorch_lightning Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/__init__.py", line 21, in <module> from pytorch_lightning.callbacks import Callback # noqa: E402 File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/callbacks/__init__.py", line 26, in <module> from pytorch_lightning.callbacks.stochastic_weight_avg import StochasticWeightAveraging File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/callbacks/stochastic_weight_avg.py", line 26, in <module> from pytorch_lightning.trainer.optimizers import _get_default_scheduler_config File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/__init__.py", line 18, in <module> from pytorch_lightning.trainer.trainer import Trainer File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 25, in <module> from pytorch_lightning.accelerators import Accelerator File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/accelerators/__init__.py", line 13, in <module> from pytorch_lightning.accelerators.accelerator import Accelerator # noqa F401 File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 25, in <module> from pytorch_lightning.plugins.precision import ApexMixedPrecisionPlugin, NativeMixedPrecisionPlugin, PrecisionPlugin File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/plugins/__init__.py", line 2, in <module> from pytorch_lightning.plugins.plugins_registry import ( # noqa: F401 File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/plugins/plugins_registry.py", line 21, in <module> from pytorch_lightning.trainer.optimizers import _get_default_scheduler_config File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/__init__.py", line 18, in <module> from pytorch_lightning.trainer.trainer import Trainer File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 25, in <module> from pytorch_lightning.accelerators import Accelerator File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/accelerators/__init__.py", line 13, in <module> from pytorch_lightning.accelerators.accelerator import Accelerator # noqa F401 File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 25, in <module> from pytorch_lightning.plugins.precision import ApexMixedPrecisionPlugin, NativeMixedPrecisionPlugin, PrecisionPlugin File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/plugins/__init__.py", line 2, in <module> from pytorch_lightning.plugins.plugins_registry import ( # noqa: F401 File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/plugins/plugins_registry.py", line 21, in <module> from pytorch_lightning.plugins.training_type.training_type_plugin import TrainingTypePlugin File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/__init__.py", line 3, in <module> from pytorch_lightning.plugins.training_type.ddp_spawn import DDPSpawnPlugin # noqa: F401 File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/ddp_spawn.py", line 30, in <module> from pytorch_lightning.trainer.states import TrainerFn File "/THL5/home/hugpu1/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/states.py", line 80, in <module> class TrainerState: File "/THL5/software/pytorch/1.7.0-cu102-py38/dataclasses.py", line 958, in dataclass return wrap(_cls) File "/THL5/software/pytorch/1.7.0-cu102-py38/dataclasses.py", line 950, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen) File "/THL5/software/pytorch/1.7.0-cu102-py38/dataclasses.py", line 800, in _process_class cls_fields = [_get_field(cls, name, type) File "/THL5/software/pytorch/1.7.0-cu102-py38/dataclasses.py", line 800, in <listcomp> cls_fields = [_get_field(cls, name, type) File "/THL5/software/pytorch/1.7.0-cu102-py38/dataclasses.py", line 659, in _get_field if (_is_classvar(a_type, typing) File "/THL5/software/pytorch/1.7.0-cu102-py38/dataclasses.py", line 550, in _is_classvar return type(a_type) is typing._ClassVar AttributeError: module 'typing' has no attribute '_ClassVar'
The text was updated successfully, but these errors were encountered:
I upgrade pytorch version and it solves my problem.
Sorry, something went wrong.
No branches or pull requests
🐛 Bug
After I upgrade my pytorch_lightning version to 1.3.5, this error occurs when I try to import pytorch_lightning in my code.
Environment
- GPU:
- Tesla K80
- Tesla K80
- Tesla K80
- Tesla K80
- available: True
- version: 10.2
- numpy: 1.19.4
- pyTorch_debug: True
- pyTorch_version: 1.7.0
- pytorch-lightning: 1.3.5
- tqdm: 4.47.0
- OS: Linux
- architecture:
- 64bit
- ELF
- processor: x86_64
- python: 3.8.3
- version: Thanks for sharing! #2 SMP Mon Apr 23 15:52:50 CST 2018
Additional context
The text was updated successfully, but these errors were encountered: