How can I stop WandbLogger instance being instantiated when calling load_from_checkpoint?
Hello. I have a checkpoint that used wandb during training. Now I want to use the trained model for inference in Hadoop environment. Each node loads the checkpoint, reads data, then infer.
What prevents me is the following error. When I call load_from_checkpoint(), the code tries to re-instate WandbLogger instance. Then WandbLogger tries to read or create global config at /home/.config, which is not accessible from worker processes. In fact I don't need  a logger during my inference so I want to avoid the logger instance being loaded or let the logger to look for global config from different path (e.g. current dir). How can I achieve this?
Traceback (most recent call last):
File "/data3/hadoop/yarn/local/usercache/chewie-park/appcache/application_1603778770965_1295035/container_e71_1603778770965_1295035_01_000038/./query_mapper.py", line 11, in <module>
import pytorch_lightning as pl
File "/usr/local/lib/python3.6/site-packages/pytorch_lightning/__init__.py", line 63, in <module>
from pytorch_lightning.trainer import Trainer
File "/usr/local/lib/python3.6/site-packages/pytorch_lightning/trainer/__init__.py", line 18, in <module>
from pytorch_lightning.trainer.trainer import Trainer
File "/usr/local/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 32, in <module>
from pytorch_lightning.loggers import LightningLoggerBase
File "/usr/local/lib/python3.6/site-packages/pytorch_lightning/loggers/__init__.py", line 59, in <module>
from pytorch_lightning.loggers.wandb import WandbLogger
File "/usr/local/lib/python3.6/site-packages/pytorch_lightning/loggers/wandb.py", line 26, in <module>
import wandb
File "/usr/local/lib/python3.6/site-packages/wandb/__init__.py", line 116, in <module>
api = InternalApi()
File "/usr/local/lib/python3.6/site-packages/wandb/apis/internal.py", line 17, in __init__
self.api = InternalApi(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/wandb/sdk/internal/internal_api.py", line 81, in __init__
load_settings=load_settings, root_dir=self.default_settings.get("root_dir")
File "/usr/local/lib/python3.6/site-packages/wandb/old/settings.py", line 25, in __init__
self._global_settings.read([Settings._global_path()])
File "/usr/local/lib/python3.6/site-packages/wandb/old/settings.py", line 105, in _global_path
util.mkdir_exists_ok(config_dir)
File "/usr/local/lib/python3.6/site-packages/wandb/util.py", line 632, in mkdir_exists_ok
os.makedirs(path)
File "/usr/local/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/local/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/.config'