From deb434aefad43be38aa0252bbdece501919108ea Mon Sep 17 00:00:00 2001 From: JD Costa Date: Thu, 9 Sep 2021 14:29:18 +0100 Subject: [PATCH] Make CONFIG_DIR configurable per environment variable (#4727) --- utils/plots.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/plots.py b/utils/plots.py index 1ed88ea7c832..141a9ac2b09e 100644 --- a/utils/plots.py +++ b/utils/plots.py @@ -4,6 +4,7 @@ """ import math +import os from copy import copy from pathlib import Path @@ -20,7 +21,7 @@ from utils.metrics import fitness # Settings -CONFIG_DIR = user_config_dir() # Ultralytics settings dir +CONFIG_DIR = Path(os.getenv('YOLOV5_CONFIG_DIR') or user_config_dir()) # Ultralytics settings dir matplotlib.rc('font', **{'size': 11}) matplotlib.use('Agg') # for writing to files only