learn_api module
LearnApi
Parameters
api_client=None
Methods
anomaly_trained_features
Trained features
Get a sample of trained features, this extracts a number of samples and their features.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
feature_ax1: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Feature axis 1', extra={})]
feature_ax2: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Feature axis 2', extra={})]
**kwargs
Return
edgeimpulse_api.models.anomaly_trained_features_response.AnomalyTrainedFeaturesResponse
anomaly_trained_features_per_sample
Trained features for sample
Get trained features for a single sample. This runs both the DSP prerequisites and the anomaly classifier.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
sample_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]
**kwargs
Return
edgeimpulse_api.models.anomaly_trained_features_response.AnomalyTrainedFeaturesResponse
download_keras_data
Download Keras data export
Download the data of an exported Keras block - needs to be exported via 'exportKerasBlockData' first
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
str
download_keras_export
Download Keras export
Download an exported Keras block - needs to be exported via 'exportKerasBlock' first
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
str
download_learn_model
Download trained model
Download a trained model for a learning block. Depending on the block this can be a TensorFlow model, or the cluster centroids.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
model_download_id: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='Model download ID, which can be obtained from the project information', extra={})]
**kwargs
Return
str
download_pretrained_model
Download pretrained model
Download a pretrained model file
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
pretrained_model_download_type: pydantic.types.StrictStr
impulse_id: Annotated[Optional[pydantic.types.StrictInt], FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
str
get_anomaly
Anomaly information
Get information about an anomaly block, such as its dependencies. Use the impulse blocks to find the learnId.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
edgeimpulse_api.models.anomaly_config_response.AnomalyConfigResponse
get_anomaly_metadata
Anomaly metadata
Get metadata about a trained anomaly block. Use the impulse blocks to find the learnId.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
edgeimpulse_api.models.anomaly_model_metadata_response.AnomalyModelMetadataResponse
get_gmm_metadata
Anomaly GMM metadata
Get raw model metadata of the Gaussian mixture model (GMM) for a trained anomaly block. Use the impulse blocks to find the learnId.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
edgeimpulse_api.models.anomaly_gmm_metadata_response.AnomalyGmmMetadataResponse
get_keras
Keras information
Get information about a Keras block, such as its dependencies. Use the impulse blocks to find the learnId.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
edgeimpulse_api.models.keras_response.KerasResponse
get_keras_data_explorer_features
Get data explorer features
t-SNE2 output of the raw dataset using embeddings from this Keras block
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
edgeimpulse_api.models.get_data_explorer_features_response.GetDataExplorerFeaturesResponse
get_keras_metadata
Keras metadata
Get metadata about a trained Keras block. Use the impulse blocks to find the learnId.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
edgeimpulse_api.models.keras_model_metadata_response.KerasModelMetadataResponse
get_learn_x_data
Download data
Download the processed data for this learning block. This is data already processed by the signal processing blocks.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
str
get_learn_y_data
Download labels
Download the labels for this learning block. This is data already processed by the signal processing blocks. Not all blocks support this function. If so, a GenericApiResponse is returned with an error message.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
**kwargs
Return
str
get_pretrained_model_info
Get pretrained model
Receive info back about the earlier uploaded pretrained model (via uploadPretrainedModel
) input/output tensors. If you want to deploy a pretrained model from the API, see startDeployPretrainedModelJob
.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
impulse_id: Annotated[Optional[pydantic.types.StrictInt], FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.get_pretrained_model_response.GetPretrainedModelResponse
profile_pretrained_model
Profile pretrained model
Returns the latency, RAM and ROM used for the pretrained model - upload first via uploadPretrainedModel
. This is using the project's selected latency device. Updates are streamed over the websocket API (or can be retrieved through the /stdout endpoint). Use getProfileTfliteJobResult to get the results when the job is completed.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
impulse_id: Annotated[Optional[pydantic.types.StrictInt], FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.start_job_response.StartJobResponse
save_pretrained_model_parameters
Save parameters for pretrained model
Save input / model configuration for a pretrained model. This overrides the current impulse. If you want to deploy a pretrained model from the API, see startDeployPretrainedModelJob
.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
save_pretrained_model_request: edgeimpulse_api.models.save_pretrained_model_request.SavePretrainedModelRequest
impulse_id: Annotated[Optional[pydantic.types.StrictInt], FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.generic_api_response.GenericApiResponse
set_anomaly
Anomaly settings
Configure the anomaly block, such as its minimum confidence score. Use the impulse blocks to find the learnId.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
set_anomaly_parameter_request: edgeimpulse_api.models.set_anomaly_parameter_request.SetAnomalyParameterRequest
**kwargs
Return
edgeimpulse_api.models.generic_api_response.GenericApiResponse
set_keras
Keras settings
Configure the Keras block, such as its minimum confidence score. Use the impulse blocks to find the learnId.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
learn_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]
set_keras_parameter_request: edgeimpulse_api.models.set_keras_parameter_request.SetKerasParameterRequest
**kwargs
Return
edgeimpulse_api.models.generic_api_response.GenericApiResponse
test_pretrained_model
Test pretrained model
Test out a pretrained model (using raw features) - upload first via uploadPretrainedModel
. If you want to deploy a pretrained model from the API, see startDeployPretrainedModelJob
.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
test_pretrained_model_request: edgeimpulse_api.models.test_pretrained_model_request.TestPretrainedModelRequest
impulse_id: Annotated[Optional[pydantic.types.StrictInt], FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.test_pretrained_model_response.TestPretrainedModelResponse
upload_pretrained_model
Upload a pretrained model
Upload a pretrained model and receive info back about the input/output tensors. If you want to deploy a pretrained model from the API, see startDeployPretrainedModelJob
.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
model_file: pydantic.types.StrictStr
model_file_name: pydantic.types.StrictStr
model_file_type: pydantic.types.StrictStr
impulse_id: Annotated[Optional[pydantic.types.StrictInt], FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
representative_features: Optional[pydantic.types.StrictStr] = None
device: Annotated[Optional[pydantic.types.StrictStr], FieldInfo(default=PydanticUndefined, description='MCU used for calculating latency, query
latencyDevices
inlistProject
for a list of supported devices (and use the \"mcu\" property here). If this is kept empty then we'll show an overview of multiple devices.', extra={})] = None**kwargs
Return
edgeimpulse_api.models.start_job_response.StartJobResponse
Last updated