Disable torch import on cuda-less runs

pull/2/head
Guillermo Rodriguez 2022-12-24 10:54:33 -03:00
parent a9c237b538
commit a656be62b6
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,6 @@
#!/usr/bin/python
import importlib.util
torch_enabled = importlib.util.find_spec('torch') != None
import os
import json
@ -10,8 +12,10 @@ import trio
import click
import trio_asyncio
if torch_enabled:
from . import utils
from .dgpu import open_dgpu_node
from .brain import run_skynet
from .constants import ALGOS