wandb: wandb in pytest causes OSError: [Errno 29] Illegal seek
- Weights and Biases version: 0.9.2
- Python version: 3.7.6
- Operating System: Linux
Description
Tried to use wanb in pytest here in this PR https://github.com/PyTorchLightning/pytorch-lightning/pull/2502 The error occurs locally and in the CI on Linux. On Mac, the CI is simply timing out.
What I Did
py.test -v pytorch_lightning/tests/loggers/test_wandb.py
_______________ ERROR at setup of test_auroc[pred1-target1-0.0] ________________
self = <contextlib._GeneratorContextManager object at 0x7fe46c19d190>
type = None, value = None, traceback = None
def __exit__(self, type, value, traceback):
if type is None:
try:
> next(self.gen)
E OSError: [Errno 29] Illegal seek
/opt/hostedtoolcache/Python/3.7.7/x64/lib/python3.7/contextlib.py:119: OSError
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (7 by maintainers)
It’s so odd this isn’t working. One thing to try would be to set
wandb_logger._experiment = MagicMock()in your test_minimal. The other option is to install our next generation client withpip install wandb -U --preand setos.environ["WANDB_MODE"] = "noop"in your test.The same: [Errno 29] Illegal seek
Here’s the traceback:
Note that this fails when I call trainer.fit() but doesn’t fail if I merely instantiate a wandb_logger, or even a Trainer with the wandb_logger.
Issue-Label Bot is automatically applying the label
bugto this issue, with a confidence of 0.94. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.