Make CONFIG_DIR configurable per environment variable (#4727)

This commit is contained in:
JD Costa authored and GitHub committed 2021-09-09 15:29:18 +02:00
1 parent 0d8a184237
commit deb434aefa
1 file changed
+2 -1
+2 -1
View File
@@ -4,6 +4,7 @@ Plotting utils
"""
import math
import os
from copy import copy
from pathlib import Path
@@ -20,7 +21,7 @@ from utils.general import user_config_dir, is_ascii, xywh2xyxy, xyxy2xywh
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