forked from maranasgroup/CatPred
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
47 lines (42 loc) · 1.22 KB
/
Copy path__init__.py
File metadata and controls
47 lines (42 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from __future__ import annotations
from .backends import (
BackendPredictionResult,
BackendRouterSettings,
InferenceBackend,
InferenceBackendError,
InferenceBackendRouter,
LocalInferenceBackend,
ModalHTTPInferenceBackend,
)
from .types import PreparedInputPaths, PredictionRequest
__all__ = [
"BackendPredictionResult",
"BackendRouterSettings",
"InferenceBackend",
"InferenceBackendError",
"InferenceBackendRouter",
"LocalInferenceBackend",
"ModalHTTPInferenceBackend",
"PredictionRequest",
"PreparedInputPaths",
"prepare_prediction_inputs",
"run_raw_prediction",
"run_inprocess_prediction",
"postprocess_predictions",
"run_prediction_pipeline",
"run_inprocess_prediction_pipeline",
]
def __getattr__(name: str):
if name in {
"prepare_prediction_inputs",
"run_raw_prediction",
"run_inprocess_prediction",
"postprocess_predictions",
"run_prediction_pipeline",
"run_inprocess_prediction_pipeline",
}:
from . import service
value = getattr(service, name)
globals()[name] = value
return value
raise AttributeError(f"module 'catpred.inference' has no attribute '{name}'")