util module
check_response_errors
Check for standard errors and raise an exception with the details if found.
Parameters
request
configure_generic_client
Configure generic api client which the right key.
Parameters
key: str
key_type: Optional[str] = 'api'
host: Optional[str] = 'https://studio.edgeimpulse.com/v1'
Return
edgeimpulse_api.api_client.ApiClient
connect_websocket
Connects to the websocket server.
Parameters: token (str): The authentication token. host (str, optional): The hostname. If None, API_ENDPOINT will be used.
Returns: object: Websocket object.
Parameters
token
host: str = None
Return
socketio.client.Client
default_project_id_for
Derive project id from api_key used to configure generic client.
Parameters
client: edgeimpulse_api.api_client.ApiClient
Return
int
encode_file_as_base64
Envode a file as base64.
Parameters
filename: str
get_organization_websocket
Gets a websocket to listen to organization events.
Parameters
client
organization_id: int
host: str = None
Return
socketio.client.Client
get_profile_devices
Pull a list of profile devices.
Parameters
client: edgeimpulse_api.api_client.ApiClient
project_id: Optional[int] = None
Return
List[str]
get_project_deploy_targets
Pull a list of deploy targets.
Parameters
client: edgeimpulse_api.api_client.ApiClient
project_id: Optional[int] = None
Return
List[str]
get_project_websocket
Gets a websocket to listen to project events.
Parameters
client
project_id: int
host: str = None
Return
socketio.client.Client
get_user_agent
Get user agent string for API calls so we can track usage.
Parameters
add_platform_info=False
inspect_model
Load tflite model.
Parameters
model: Union[pathlib.Path, str, bytes, Any]
tempdir: str
Return
Tuple[str, str]
inspect_representative_data
Ensure representative data is saved to disk for upload.
Parameters
data: Union[pathlib.Path, str, bytes, Any]
Return
Optional[str]
is_keras_model
Check if model is a keras model.
Parameters
model
is_numpy_array
Check if array is a numpy array.
Parameters
array
is_onnx_model
Check if given model is an onnx model.
Parameters
model
is_path_to_numpy_file
Check if given path is a numpy file.
Parameters
path
is_path_to_onnx_model
Check if given path is a onnx file.
Parameters
path
is_path_to_tf_saved_model_directory
Check if directory contains a saved model.
Parameters
model_dir
is_path_to_tf_saved_model_zipped
Check if path is poiting to a zipped model.
Parameters
model
is_type_accepted_by_open
Check if given path is a. string or a Path
.
Parameters
path
make_zip_archive
Create zip archive from a model path.
Parameters
saved_model_path
numpy_installed
Return True if NumPy is installed, otherwise False.
Return
bool
onnx_installed
Return True if ONNX is installed, otherwise False.
Return
bool
pandas_installed
Return True if pandas is installed, otherwise False.
Return
bool
poll
Poll a specific job within a project until done or timmeout is reached.
Parameters
jobs_client: edgeimpulse_api.api.jobs_api.JobsApi
project_id: int
job_id: int
timeout_sec: Optional[float] = None
Return
edgeimpulse_api.models.get_job_response.GetJobResponse
run_job_until_completion
Runs a project or organization job until completion.
Parameters
ws
job_id: int
data_cb=None
timeout_sec: Optional[int] = None
run_organization_job_until_completion
Runs an organization job until completion.
Parameters
organization_id: int
job_id: int
data_cb=None
client=None
timeout_sec: Optional[int] = None
Return
None
run_project_job_until_completion
Runs a project job until completion.
Parameters
job_id: int
data_cb=None
client=None
project_id: Optional[int] = None
timeout_sec: Optional[int] = None
Return
None
save_model
Save a machine learning model to the specified directory.
Parameters
model: Union[pathlib.Path, str, bytes]
directory: str
Return
str
save_representative_data
Save the representive data to a directory.
Parameters
data: Union[pathlib.Path, str, bytes]
directory: str
Return
str
tensorflow_installed
Return True if TensorFlow is installed, otherwise False.
Return
bool
upload_pretrained_model_and_data
Upload a model and data to Edge Impulse servers.
Parameters
tempdir: str
client: edgeimpulse_api.api_client.ApiClient
project_id: int
model: Union[pathlib.Path, str, bytes, Any]
representative_data: Union[pathlib.Path, str, bytes, Any, ForwardRef(None)] = None
device: Optional[str] = None
timeout_sec: Optional[float] = None
Return
edgeimpulse_api.models.get_job_response.GetJobResponse
Last updated