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

error in eval_model #44

Closed
yoshitomo-matsubara opened this issue Apr 24, 2021 · 4 comments
Closed

error in eval_model #44

yoshitomo-matsubara opened this issue Apr 24, 2021 · 4 comments
Assignees

Comments

@yoshitomo-matsubara
Copy link

Hello,
Could you please provide the exact commands to replicate the curves using the pretrained models in compressai?

Using the pretrained models in compressai, I wanted to replicate the RD curves shown in the README.md

image

I tried python -m compressai.utils.eval_model -h and python -m compressai.utils.eval_model --help to see how to execute, but it returned the following error.

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/yoshitom/.local/share/virtualenvs/compressai-doaxpoXd/lib/python3.6/site-packages/compressai/utils/eval_model/__main__.py", line 303, in <module>
    main(sys.argv[1:])
  File "/home/yoshitom/.local/share/virtualenvs/compressai-doaxpoXd/lib/python3.6/site-packages/compressai/utils/eval_model/__main__.py", line 254, in main
    args = setup_args().parse_args(argv)
  File "/home/yoshitom/.local/share/virtualenvs/compressai-doaxpoXd/lib/python3.6/site-packages/compressai/utils/eval_model/__main__.py", line 217, in setup_args
    help="model source", dest="source", required=True
  File "/usr/lib/python3.6/argparse.py", line 1716, in add_subparsers
    action = parsers_class(option_strings=[], **kwargs)
TypeError: __init__() got an unexpected keyword argument 'required'

OS: Ubuntu 20
Python: 3.6.9
compressai: 1.1.2

Thank you!

@jbegaint
Copy link
Contributor

Hi, it's probably an error with your python version and the argparse api.

@yoshitomo-matsubara
Copy link
Author

yoshitomo-matsubara commented Apr 25, 2021

Hi @jbegaint
Thanks for the answer. Yes, it worked with Python 3.8.5.

I thought it should work with Python 3.6.9 as the README says

CompressAI supports python 3.6+ and PyTorch 1.4+.

Can you make it compatible with Python 3.6 until compressai ends supporting Python 3.6?

@jbegaint
Copy link
Contributor

jbegaint commented May 3, 2021

Hi @yoshitomo-matsubara , this should be fixed in the latest release.

@yoshitomo-matsubara
Copy link
Author

Hi @jbegaint,

Having updated compressai version (v1.1.3), I confirmed that it works with Python 3.6.9.
Thank you for fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants