[Update] Refactor compute type management: unify device list retrieval and remove deprecated methods
This commit is contained in:
@@ -652,14 +652,6 @@ class Controller:
|
||||
def getComputeDeviceList(*args, **kwargs) -> dict:
|
||||
return {"status":200, "result":config.SELECTABLE_COMPUTE_DEVICE_LIST}
|
||||
|
||||
@staticmethod
|
||||
def getCTranslate2ComputeTypeList(*args, **kwargs) -> dict:
|
||||
return {"status":200, "result":config.SELECTABLE_CTRANSLATE2_COMPUTE_TYPE_LIST}
|
||||
|
||||
@staticmethod
|
||||
def getWhisperComputeTypeList(*args, **kwargs) -> dict:
|
||||
return {"status":200, "result":config.SELECTABLE_WHISPER_COMPUTE_TYPE_LIST}
|
||||
|
||||
@staticmethod
|
||||
def getSelectedTranslationComputeDevice(*args, **kwargs) -> dict:
|
||||
return {"status":200, "result":config.SELECTED_TRANSLATION_COMPUTE_DEVICE}
|
||||
@@ -1455,10 +1447,6 @@ class Controller:
|
||||
th_callback.join()
|
||||
return {"status":200, "result":config.CTRANSLATE2_WEIGHT_TYPE}
|
||||
|
||||
@staticmethod
|
||||
def getCtranslate2ComputeTypeList(*args, **kwargs) -> dict:
|
||||
return {"status":200, "result":config.SELECTABLE_CTRANSLATE2_COMPUTE_TYPE_LIST}
|
||||
|
||||
@staticmethod
|
||||
def getCtranslate2ComputeType(*args, **kwargs) -> dict:
|
||||
return {"status":200, "result":config.CTRANSLATE2_COMPUTE_TYPE}
|
||||
|
||||
Reference in New Issue
Block a user