forked from enviPath/enviPy
refactor: remove enviformer loading in settings
This commit is contained in:
@ -241,13 +241,7 @@ LOGGING = {
|
|||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
ENVIFORMER_PRESENT = os.environ.get("ENVIFORMER_PRESENT", "False") == "True"
|
ENVIFORMER_PRESENT = os.environ.get("ENVIFORMER_PRESENT", "False") == "True"
|
||||||
if ENVIFORMER_PRESENT:
|
ENVIFORMER_DEVICE = os.environ.get("ENVIFORMER_DEVICE", "cpu")
|
||||||
print("Loading enviFormer")
|
|
||||||
device = os.environ.get("ENVIFORMER_DEVICE", "cpu")
|
|
||||||
from enviformer import load
|
|
||||||
|
|
||||||
ENVIFORMER_INSTANCE = load(device=device)
|
|
||||||
print("loaded")
|
|
||||||
|
|
||||||
|
|
||||||
# If celery is not present set always eager to true which will cause delayed tasks to block until finished
|
# If celery is not present set always eager to true which will cause delayed tasks to block until finished
|
||||||
|
|||||||
Reference in New Issue
Block a user