Error with deployment target: 0 supportedEngines

Hello,

I followed the instructions in this tutorial Using the Edge Impulse Python SDK with TensorFlow and Keras - Edge Impulse Documentation.
But I gen an error saying “2 validation errors for DeploymentTarget”. Apparently, this is because I have no supportedEngines.

2 weeks ago, I successfully ran the same instructions/script as I have described in this thread: Failed to allocate TFLite arena (0 bytes) when running inference on desktop (Windows 11 and Ubuntu 22.04)

But it does not work anymore.
Can you help me ?

Complete error message:

Traceback (most recent call last):
  File "./byom_test.py", line 90, in <module>
    ei.model.list_deployment_targets()
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse/methods/deploy.py", line 285, in list_deployment_targets
    return get_project_deploy_targets(client)
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse/util.py", line 414, in get_project_deploy_targets
    raise e
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse/util.py", line 409, in get_project_deploy_targets
    response = deploy.list_deployment_targets_for_project_data_sources(project_id)
  File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
  File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
  File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/api/deployment_api.py", line 1348, in list_deployment_targets_for_project_data_sources
    return self._list_deployment_targets_for_project_data_sources_with_http_info(project_id, **kwargs)  # noqa: E501
  File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
  File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
  File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/api/deployment_api.py", line 1440, in _list_deployment_targets_for_project_data_sources_with_http_info
    return self.api_client.call_api(
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/api_client.py", line 400, in call_api
    return self.__call_api(resource_path, method,
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/api_client.py", line 237, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/api_client.py", line 311, in deserialize
    return self.__deserialize(data, response_type)
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/api_client.py", line 350, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/api_client.py", line 747, in __deserialize_model
    return klass.from_dict(data)
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/models/deployment_targets_response.py", line 74, in from_dict
    "targets": [DeploymentTarget.from_dict(_item) for _item in obj.get("targets")] if obj.get("targets") is not None else None
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/models/deployment_targets_response.py", line 74, in <listcomp>
    "targets": [DeploymentTarget.from_dict(_item) for _item in obj.get("targets")] if obj.get("targets") is not None else None
  File "/home/asantamaria/.pyenv/versions/edgeimp-3.8.16/lib/python3.8/site-packages/edgeimpulse_api/models/deployment_target.py", line 92, in from_dict
    _obj = DeploymentTarget.parse_obj({
  File "pydantic/main.py", line 526, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 2 validation errors for DeploymentTarget
supportedEngines -> 0
  value is not a valid enumeration member; permitted: 'tflite', 'tflite-eon', 'tensorrt', 'tensaiflow', 'drp-ai', 'tidl', 'akida', 'syntiant' (type=type_error.enum; enum_values=[<DeploymentTargetEngine.TFLITE: 'tflite'>, <DeploymentTargetEngine.TFLITE_EON: 'tflite-eon'>, <DeploymentTargetEngine.TENSORRT: 'tensorrt'>, <DeploymentTargetEngine.TENSAIFLOW: 'tensaiflow'>, <DeploymentTargetEngine.DRP_AI: 'drp-ai'>, <DeploymentTargetEngine.TIDL: 'tidl'>, <DeploymentTargetEngine.AKIDA: 'akida'>, <DeploymentTargetEngine.SYNTIANT: 'syntiant'>])
preferredEngine
  value is not a valid enumeration member; permitted: 'tflite', 'tflite-eon', 'tensorrt', 'tensaiflow', 'drp-ai', 'tidl', 'akida', 'syntiant' (type=type_error.enum; enum_values=[<DeploymentTargetEngine.TFLITE: 'tflite'>, <DeploymentTargetEngine.TFLITE_EON: 'tflite-eon'>, <DeploymentTargetEngine.TENSORRT: 'tensorrt'>, <DeploymentTargetEngine.TENSAIFLOW: 'tensaiflow'>, <DeploymentTargetEngine.DRP_AI: 'drp-ai'>, <DeploymentTargetEngine.TIDL: 'tidl'>, <DeploymentTargetEngine.AKIDA: 'akida'>, <DeploymentTargetEngine.SYNTIANT: 'syntiant'>])

Thanks !

Hi @adamsantamaria,

Thank you for the heads up. We have logged this bug and are looking into it.

Hi @adamsantamaria,

This should be fixed in the latest release of the Python SDK. Please let us know if you are still running into issues.

It is fixed now. Thanks !

1 Like