flops-counter.pytorch
flops-counter.pytorch copied to clipboard
Possible redundant dataclasses dependency
When installing using pip with python 3.7, the following error occurs:
ERROR: Package 'dataclasses' requires a different Python: 3.7.9 not in '>=3.6, <3.7'
Then I try to run the source code directly, and it works well with python 3.7 and python 3.6.9. It seems that it's ok to remove the dataclasses dependency to better support python 3.7+
The dataclasses dependency comes form pytorch 1.7 and I can't control it. ptflops doesn't implicitly requires dataclasses, but it leaks via pytorch during installation.
The only thing I can propose here is to install ptflops ignoring all requirements (namely the torch package without a specified version):
pip install ptflops --no-deps
And then install a version of the torch package that would work on your config.