Skip to content

Commit

Permalink
Uninstall wandb from notebook environments (#11730)
Browse files Browse the repository at this point in the history
* Uninstall `wandb` from notebook environments

Due to undesired behavior in https://www.kaggle.com/code/ultralytics/yolov8/comments#2306977

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* fix import

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
glenn-jocher and pre-commit-ci[bot] committed Jun 18, 2023
1 parent f616dc5 commit 2334aa7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ def notebook_init(verbose=True):
import os
import shutil

from ultralytics.yolo.utils.checks import check_requirements

from utils.general import check_font, is_colab
from utils.torch_utils import select_device # imports

check_font()

import psutil

os.system('pip uninstall -y wandb')
if check_requirements('wandb', install=False):
os.system('pip uninstall -y wandb') # eliminate unexpected account creation prompt with infinite hang
if is_colab():
shutil.rmtree('/content/sample_data', ignore_errors=True) # remove colab /sample_data directory

Expand Down

0 comments on commit 2334aa7

Please sign in to comment.