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

accuracy metric dosen't support windows #2357

Closed
davinnovation opened this issue Jun 25, 2020 · 1 comment · Fixed by #2358
Closed

accuracy metric dosen't support windows #2357

davinnovation opened this issue Jun 25, 2020 · 1 comment · Fixed by #2358
Labels
duplicate This issue or pull request already exists feature Is an improvement or enhancement help wanted Open to be worked on priority: 0 High priority task

Comments

@davinnovation
Copy link
Contributor

davinnovation commented Jun 25, 2020

🐛 Bug

Pytorch Metric.Accuracy uses ReduceOp from 'torch.distribution' but torch.distributrion doesn't support windows

To Reproduce

Use Metric.Accuracy in Windows environment

Code sample

  • I use code sample from https://github.com/PyTorchLightning/pytorch-lightning/issues/2355

Expected behavior

add check OS in metric.accuracy and use condition for import different module

  try:
    return platform.linux_distribution()
  except:
    return "N/A"

or warning to windows user, they can't use metric.accuracy

Environment

* CUDA:
        - GPU:
                - GeForce RTX 2080 Ti
                - GeForce GTX 1080 Ti
        - available:         True
        - version:           10.1
* Packages:
        - numpy:             1.18.1
        - pyTorch_debug:     False
        - pyTorch_version:   1.5.1
        - pytorch-lightning: 0.8.1
        - tensorboard:       2.2.1
        - tqdm:              4.46.0
* System:
        - OS:                Windows
        - architecture:
                - 64bit
                - WindowsPE
        - processor:         Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
        - python:            3.6.10
        - version:           10.0.18362

Additional context

Traceback (most recent call last):
  File "test.py", line 11, in <module>
    from pytorch_lightning.metrics.functional import accuracy
  File "C:\Users\dcho\Anaconda3\envs\torch_py36\lib\site-packages\pytorch_lightning\metrics\__init__.py", line 1, in <module>
    from pytorch_lightning.metrics.converters import numpy_metric, tensor_metric
  File "C:\Users\dcho\Anaconda3\envs\torch_py36\lib\site-packages\pytorch_lightning\metrics\converters.py", line 220, in <module>
    reduce_op: Optional[torch.distributed.ReduceOp] = None,
AttributeError: module 'torch.distributed' has no attribute 'ReduceOp'

Always thanks for developing & maintaining the cool framework

@davinnovation davinnovation added bug Something isn't working help wanted Open to be worked on labels Jun 25, 2020
@Borda Borda added the priority: 0 High priority task label Jun 25, 2020
@SkafteNicki
Copy link
Member

We are aware of this problem (duplicate of #2347), and it will be fixed in the next release

@SkafteNicki SkafteNicki added the duplicate This issue or pull request already exists label Jun 25, 2020
@williamFalcon williamFalcon added feature Is an improvement or enhancement and removed bug Something isn't working labels Jun 25, 2020
@Borda Borda mentioned this issue Jun 26, 2020
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists feature Is an improvement or enhancement help wanted Open to be worked on priority: 0 High priority task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants