Hsyshasuzh's picture
download
raw
885 Bytes
"""Keep inference settings local and disable automatic downloads/integrations."""
import json
import os
from pathlib import Path
import tempfile
def configure_local_settings():
directory=Path(tempfile.gettempdir())/'longmemory-geo-inference'
os.environ['YOLO_CONFIG_DIR']=str(directory)
os.environ['YOLO_AUTOINSTALL']='false'
os.environ['YOLO_OFFLINE']='true'
path=directory/'Ultralytics/settings.json'
path.parent.mkdir(parents=True,exist_ok=True)
settings={'settings_version':'0.0.8','datasets_dir':str(directory/'datasets'),
'weights_dir':str(directory/'weights'),'runs_dir':str(directory/'runs'),
'uuid':'local-only','api_key':'','openai_api_key':''}
settings.update({k:False for k in ('sync','clearml','comet','dvc','mlflow','raytune','tensorboard','wandb','vscode_msg','openvino_msg')})
path.write_text(json.dumps(settings))

Xet Storage Details

Size:
885 Bytes
·
Xet hash:
e610fb56373ee6da8f6b5e24a99971afdb6d8d96384b13dc9c8e752443a5f8b9

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.