Skip to content

Commit

Permalink
Make CONFIG_DIR configurable per environment variable (ultralytics#4727)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiogocosta authored and CesarBazanAV committed Sep 29, 2021
1 parent 8ec9200 commit 8f2c58c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

import math
import os
from copy import copy
from pathlib import Path

Expand All @@ -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

Expand Down

0 comments on commit 8f2c58c

Please sign in to comment.