make sure tensborboard fix works with pip install ...#egg=wandb
from __future__ import absolute_import
import sys
# Ensure we don't have the wandb directory in the path to avoid importing our tensorboard
-# module. This should only happen when wandb is installed with pip -e
+# module. This should only happen when wandb is installed with pip -e or pip install ...#egg=wandb
for path in sys.path:
- if "client/wandb" in path:
+ if path.endswith("/client/wandb"):
+ sys.path.remove(path)
+ if path.endswith("/site-packages/wandb"):
sys.path.remove(path)
if sys.modules.get("tensorboard"):
del sys.modules["tensorboard"]
