mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 08:56:32 +00:00
Fixed dynamic ONNX input
Fix dynamic ONNX input Update docs with correct file name for tests
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
cimport constants_inf
|
||||
from loader_http_client cimport LoaderHttpClient, LoadResult
|
||||
|
||||
|
||||
@@ -42,7 +43,6 @@ class EngineFactory:
|
||||
|
||||
def build_and_cache(self, bytes source_bytes, LoaderHttpClient loader_client, str models_dir):
|
||||
cdef LoadResult res
|
||||
import constants_inf
|
||||
engine_bytes, engine_filename = self.build_from_source(source_bytes, loader_client, models_dir)
|
||||
res = loader_client.upload_big_small_resource(engine_bytes, engine_filename, models_dir)
|
||||
if res.err is not None:
|
||||
@@ -56,7 +56,6 @@ class OnnxEngineFactory(EngineFactory):
|
||||
return OnnxEngine(model_bytes)
|
||||
|
||||
def get_source_filename(self):
|
||||
import constants_inf
|
||||
return constants_inf.AI_ONNX_MODEL_FILE
|
||||
|
||||
|
||||
@@ -81,7 +80,6 @@ class TensorRTEngineFactory(EngineFactory):
|
||||
return TensorRTEngine.get_engine_filename()
|
||||
|
||||
def get_source_filename(self):
|
||||
import constants_inf
|
||||
return constants_inf.AI_ONNX_MODEL_FILE
|
||||
|
||||
def build_from_source(self, onnx_bytes, loader_client, models_dir):
|
||||
|
||||
Reference in New Issue
Block a user