File "/home/abthuy/anaconda3/envs/qdet_active/lib/python3.11/site-packages/baal/active/active_loop.py", line 87, in step
to_label, uncertainty = self.heuristic.get_ranks(probs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abthuy/anaconda3/envs/qdet_active/lib/python3.11/site-packages/baal/active/heuristics/stochastics.py", line 50, in get_ranks
log.warnings("Not enough values, return random")
^^^^^^^^^^^^
File "/home/abthuy/anaconda3/envs/qdet_active/lib/python3.11/site-packages/structlog/_config.py", line 391, in __getattr__
return getattr(bl, name)
^^^^^^^^^^^^^^^^^
AttributeError: 'BoundLogger' object has no attribute 'warnings'. Did you mean: 'warning'?
To Reproduce
>>> import structlog
>>> print(structlog.__version__)
21.5.0
>>> log = structlog.get_logger(__name__)
>>> log.warnings("Not enough values, return random")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/abthuy/anaconda3/envs/qdet_active/lib/python3.11/site-packages/structlog/_config.py", line 393, in __getattr__
return getattr(bl, name)
^^^^^^^^^^^^^^^^^
AttributeError: 'BoundLoggerFilteringAtNotset' object has no attribute 'warnings'. Did you mean: 'warning'?
>>> log.warning("Not enough values, return random")
2024-04-04 09:15.04 [warning ] Not enough values, return random
Expected behavior
Should it simply be log.warning("Not enough values, return random") (without "s")?
Note that the Baal output above comes from a virtual environment with structlog=22.1.0, while the toy example is run in a virtual environment with structlog=21.5.0. Why does the pyproject.toml set the dependency structlog = "^21.1.0"? I want to use the structlog.stdlib.recreate_defaults() function which was added in version 22.1.0.
Version (please complete the following information):
Describe the bug The line
log.warnings("Not enough values, return random")
(inbaal/active/heuristics/stochastics.py
throws an error:To Reproduce
Expected behavior Should it simply be
log.warning("Not enough values, return random")
(without "s")?Note that the Baal output above comes from a virtual environment with structlog=22.1.0, while the toy example is run in a virtual environment with structlog=21.5.0. Why does the
pyproject.toml
set the dependencystructlog = "^21.1.0"
? I want to use thestructlog.stdlib.recreate_defaults()
function which was added in version 22.1.0.Version (please complete the following information):