JD Costa
commited on
Make CONFIG_DIR configurable per environment variable (#4727)
Browse files- utils/plots.py +2 -1
utils/plots.py
CHANGED
@@ -4,6 +4,7 @@ Plotting utils
|
|
4 |
"""
|
5 |
|
6 |
import math
|
|
|
7 |
from copy import copy
|
8 |
from pathlib import Path
|
9 |
|
@@ -20,7 +21,7 @@ from utils.general import user_config_dir, is_ascii, xywh2xyxy, xyxy2xywh
|
|
20 |
from utils.metrics import fitness
|
21 |
|
22 |
# Settings
|
23 |
-
CONFIG_DIR = user_config_dir() # Ultralytics settings dir
|
24 |
matplotlib.rc('font', **{'size': 11})
|
25 |
matplotlib.use('Agg') # for writing to files only
|
26 |
|
|
|
4 |
"""
|
5 |
|
6 |
import math
|
7 |
+
import os
|
8 |
from copy import copy
|
9 |
from pathlib import Path
|
10 |
|
|
|
21 |
from utils.metrics import fitness
|
22 |
|
23 |
# Settings
|
24 |
+
CONFIG_DIR = Path(os.getenv('YOLOV5_CONFIG_DIR') or user_config_dir()) # Ultralytics settings dir
|
25 |
matplotlib.rc('font', **{'size': 11})
|
26 |
matplotlib.use('Agg') # for writing to files only
|
27 |
|