question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Subclassing `CommandLineOption` is deprecated.

See original GitHub issue

I have gotten this warning when I was running Sacred on a Jupyter notebook. I use dev version due to Incense library. Could you show me how to improve the code?

UserWarning: Subclassing CommandLineOption is deprecated. Please use the sacred.cli_option decorator and pass the function to the Experiment constructor. "Subclassing CommandLineOption is deprecated. Please "

pip install git+https://github.com/IDSIA/sacred.git
pip install incense

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
gabrieldemarmiessecommented, Sep 17, 2019

The current warning is because we use a deprecated API inside sacred. We’re modernising it and afterwards that warning should disappear. So you don’t need to do anything at the moment. I’ll update you when all the usages of CommandLineOption has been revoved.

If you are suclassing this class yourself, please see https://sacred.readthedocs.io/en/latest/command_line.html#custom-flags to update your code.

0reactions
stale[bot]commented, Dec 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - How to warn about class (name) deprecation
Subclassing of a deprecated class should raise a warning; Support isinstance and issubclass checks. Solution. This can be achieved with a custom ...
Read more >
Deprecations and Removals — pytest documentation
Below is a complete list of all pytest features which are considered deprecated. Using those features will issue PytestWarning or subclasses, ...
Read more >
Parser (Apache Commons CLI 1.3.1 API)
Deprecated. Parse the arguments according to the specified options and properties. Parameters: options - the specified Options: arguments - the command line ...
Read more >
optparse — Parser for command line options — Python 3.11.1 ...
Deprecated since version 3.2: The optparse module is deprecated and will not be developed further; development will continue with the argparse module.
Read more >
[DEPRECATION] Moving away from html5lib to html.parser
I tried --use-deprecated=html5lib, did not work. Getting an error for this: pip3 install --no-cache --upgrade pip setuptools wheel. Specifying ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found