Ultralytics YOLO27: Join the waitlist.
Get Started

Ultralytics Settings

Ultralytics stores persistent, per-machine settings in a JSON file in the user configuration directory and exposes them through the settings object in Python and the yolo settings command. They control where datasets, weights, and runs are stored, the Ultralytics Platform API key, and which experiment trackers are enabled. Per-run arguments such as imgsz and epochs are documented on the Configuration page instead.

View, update, and reset settings
from ultralytics import settings

print(settings)  # view all settings
value = settings["runs_dir"]  # read one setting
settings.update({"runs_dir": "/path/to/runs", "tensorboard": False})  # update one or more settings
settings.reset()  # restore defaults

Settings Reference#

NameExample ValueData TypeDescription
settings_version'0.0.8'strSettings schema version, distinct from the ultralytics package version
datasets_dir'/path/to/datasets'strDirectory where datasets are stored
weights_dir'/path/to/weights'strDownload directory for URL and Platform (ul://) model weights, and fallback lookup for bare model names
runs_dir'/path/to/runs'strDirectory where experiment runs are stored
uuid'a1b2c3d4'strAnonymized machine identifier (SHA-256 hash) used for analytics
syncTrueboolSend anonymized analytics and crash reports to Ultralytics, see Privacy
api_key''strUltralytics Platform API key
openai_api_key''strOpenAI API key for the Explorer Ask AI feature, available up to ultralytics==8.3.11
clearmlTrueboolEnable ClearML logging
cometTrueboolEnable Comet ML experiment tracking
dvcTrueboolEnable DVC experiment tracking
mlflowTrueboolEnable MLflow experiment tracking
raytuneTrueboolEnable Ray Tune hyperparameter tuning reporting
tensorboardFalseboolEnable TensorBoard logging
wandbFalseboolEnable Weights & Biases logging
vscode_msgTrueboolShow a prompt to install the Ultralytics-Snippets extension when a VS Code terminal is detected
openvino_msgTrueboolOn Intel CPUs, show a tip suggesting OpenVINO export for faster inference

A bare model name such as YOLO("yolo26n.pt") loads from the current working directory, then from weights_dir; if neither has it, the weights download to the current working directory. To download them into weights_dir instead, pass the full path, e.g. YOLO(Path(settings["weights_dir"]) / "yolo26n.pt").

Comments

Ask a question, share your results, or help someone else.