wandb in pytest causes OSError: [Errno 29] Illegal seek
See original GitHub issue- 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
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
wandb in pytest causes OSError: [Errno 29] Illegal seek #1138
The error occurs locally and in the CI on Linux. On Mac, the CI is simply timing out. What I Did. py.test -v...
Read more >Illegal seek during usage of Pytest - python - Stack Overflow
When I run pytest in the normal way ( pytest tests/filename.py ), I'm getting this error OSError: [Errno 29] Illegal seek .
Read more >Agent bug? File not found error - W&B Help - WandB community
The error you are getting 'No such file or directory' is appearing because Run 9uvr1lj3 is not available. The only sweep available in...
Read more >Log distributed training experiments - Weights & Biases - Wandb
One process: Initialize W&B ( wandb.init ) and log experiments ( wandb.log ) from a single ... This method makes more information accessible...
Read more >FAQ - Documentation - Weights & Biases - Wandb
For runs that are not part of a sweep, the values of wandb.config are ... This makes it easier to predict runtimes when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 --pre
and 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.