Spaces:
Sleeping
Sleeping
Commit
·
0340b9d
1
Parent(s):
c7e8984
Make metrics import optional across inference to avoid piq/pytorch_fid on Space
Browse files
runners/inference_runners.py
CHANGED
|
@@ -22,7 +22,10 @@ from utils.common_utils import tensor2im
|
|
| 22 |
from runners.base_runner import BaseRunner
|
| 23 |
from training.loggers import BaseTimer
|
| 24 |
from utils.common_utils import get_keys
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
inference_runner_registry = ClassRegistry()
|
|
|
|
| 22 |
from runners.base_runner import BaseRunner
|
| 23 |
from training.loggers import BaseTimer
|
| 24 |
from utils.common_utils import get_keys
|
| 25 |
+
try:
|
| 26 |
+
from metrics.metrics import metrics_registry
|
| 27 |
+
except Exception:
|
| 28 |
+
metrics_registry = {}
|
| 29 |
|
| 30 |
|
| 31 |
inference_runner_registry = ClassRegistry()
|