|
|
|
@ -568,12 +568,16 @@ def is_kaggle(): |
|
|
|
|
|
|
|
|
|
def is_jupyter(): |
|
|
|
|
""" |
|
|
|
|
Check if the current script is running inside a Jupyter Notebook. Verified on Colab, Jupyterlab, Kaggle, Paperspace. |
|
|
|
|
Check if the current script is running inside a Jupyter Notebook. |
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
|
(bool): True if running inside a Jupyter Notebook, False otherwise. |
|
|
|
|
|
|
|
|
|
Note: |
|
|
|
|
- Only works on Colab and Kaggle, other environments like Jupyterlab and Paperspace are not reliably detectable. |
|
|
|
|
- "get_ipython" in globals() method suffers false positives when IPython package installed manually. |
|
|
|
|
""" |
|
|
|
|
return "get_ipython" in globals() |
|
|
|
|
return IS_COLAB or IS_KAGGLE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def is_docker() -> bool: |
|
|
|
@ -801,10 +805,10 @@ def get_user_config_dir(sub_dir="Ultralytics"): |
|
|
|
|
PROC_DEVICE_MODEL = read_device_model() # is_jetson() and is_raspberrypi() depend on this constant |
|
|
|
|
ONLINE = is_online() |
|
|
|
|
IS_COLAB = is_colab() |
|
|
|
|
IS_KAGGLE = is_kaggle() |
|
|
|
|
IS_DOCKER = is_docker() |
|
|
|
|
IS_JETSON = is_jetson() |
|
|
|
|
IS_JUPYTER = is_jupyter() |
|
|
|
|
IS_KAGGLE = is_kaggle() |
|
|
|
|
IS_PIP_PACKAGE = is_pip_package() |
|
|
|
|
IS_RASPBERRYPI = is_raspberrypi() |
|
|
|
|
GIT_DIR = get_git_dir() |
|
|
|
@ -1195,7 +1199,7 @@ class SettingsManager(JSONDict): |
|
|
|
|
"neptune": True, # Neptune integration |
|
|
|
|
"raytune": True, # Ray Tune integration |
|
|
|
|
"tensorboard": True, # TensorBoard logging |
|
|
|
|
"wandb": True, # Weights & Biases logging |
|
|
|
|
"wandb": False, # Weights & Biases logging |
|
|
|
|
"vscode_msg": True, # VSCode messaging |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|