Uninstall `wandb` from notebook environments (#11730)
* 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>pull/11774/head
parent
f616dc5af2
commit
2334aa7338
|
@ -54,6 +54,8 @@ 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
|
||||
|
||||
|
@ -61,7 +63,8 @@ def notebook_init(verbose=True):
|
|||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue