Read cache dir from environment

This commit is contained in:
Florent Guiotte 2021-09-17 19:48:50 +02:00
parent 4a3e1bf442
commit 1f2c9d2df1

View File

@ -4,6 +4,7 @@
# version 0.0
# date 17 sept. 2021
import os
import importlib
from joblib import Memory
@ -11,11 +12,16 @@ from pathlib import Path
from . import Jurse2
CACHE = './cache'
ENV_KEY = 'MINIGRIDA_CACHE'
DEFAULT_CACHE = './cache'
CACHE = os.environ[ENV_KEY] \
if ENV_KEY in os.environ \
else DEFAULT_CACHE
class Jurse3(Jurse2):
"""Jurse2 protocl with cache
"""Jurse2 protocol with cache
Same as Jurse2 but enable caching results to speed up
hyperparameters tunning.