Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Issue running compress_classifier.py #559

Open
le000043 opened this issue May 19, 2021 · 1 comment
Open

Issue running compress_classifier.py #559

le000043 opened this issue May 19, 2021 · 1 comment

Comments

@le000043
Copy link

le000043 commented May 19, 2021

I have a few issue when running the example

$ time python3 compress_classifier.py -a alexnet --lr 0.005 -p 50 ../../../data.imagenet -j 44 --epochs 90 --pretrained --compress=../sensitivity-pruning/alexnet.schedule_sensitivity.yaml
Log file for this run: /home/dat/distiller-pytorch-1.5/examples/classifier_compression/logs/2021.05.18-214637/2021.05.18-214637.log

Log file for this run: /home/dat/distiller-pytorch-1.5/examples/classifier_compression/logs/2021.05.18-214637/2021.05.18-214637.log
Traceback (most recent call last):
  File "compress_classifier.py", line 212, in <module>
    main()
  File "compress_classifier.py", line 74, in main
    app = ClassifierCompressorSampleApp(args, script_dir=os.path.dirname(__file__))
  File "compress_classifier.py", line 164, in __init__
    super().__init__(args, script_dir)
  File "/home/dat/distiller-pytorch-1.5/distiller/apputils/image_classifier.py", line 59, in __init__
    self.logdir = _init_logger(self.args, script_dir)
  File "/home/dat/distiller-pytorch-1.5/distiller/apputils/image_classifier.py", line 331, in _init_logger
    apputils.log_execution_env_state(
  File "/home/dat/distiller-pytorch-1.5/distiller/apputils/execution_env.py", line 90, in log_execution_env_state
    logger.debug("OS: %s", lsb_release.get_lsb_information()['DESCRIPTION'])
AttributeError: module 'lsb_release' has no attribute 'get_lsb_information'
@Nayrouzzz
Copy link

Nayrouzzz commented Dec 1, 2022

did you find a solution ??
i'm facing the same problem!
EDIT : found the solution

Replace get_lsb_information() with . get_distro_information()

get_lsb_information() is used internally to load overrides from /etc/lsb-release; get_distro_information() uses that, along with other methods in the class, to provide the appropriate information

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

No branches or pull requests

2 participants