optimization_api module#

class edgeimpulse_api.api.optimization_api.OptimizationApi(api_client=None)[source]#

Bases: object

create_trial(
project_id: StrictInt[StrictInt],
job_id: StrictInt[StrictInt],
tuner_create_trial_impulse: TunerCreateTrialImpulse,
**kwargs,
) GenericApiResponse[source]#

Create trial

Create trial

Parameters:
  • project_id (int) – Project ID (required)

  • job_id (int) – Job ID (required)

  • tuner_create_trial_impulse (TunerCreateTrialImpulse) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GenericApiResponse

delete_state(
project_id: StrictInt[StrictInt],
**kwargs,
) GenericApiResponse[source]#

Delete EON tuner state

Completely clears the EON tuner state for this project.

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GenericApiResponse

get_config(
project_id: StrictInt[StrictInt],
**kwargs,
) OptimizeConfigResponse[source]#

Get config

Get config

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

OptimizeConfigResponse

get_dsp_parameters(
project_id: StrictInt[StrictInt],
organization_id: StrictInt[StrictInt],
organization_dsp_id: StrictInt[StrictInt],
**kwargs,
) OptimizeDSPParametersResponse[source]#

Retrieves DSP block parameters

Retrieves DSP block parameters

Parameters:
  • project_id (int) – Project ID (required)

  • organization_id (int) – Organization ID (required)

  • organization_dsp_id (int) – Organization DSP ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

OptimizeDSPParametersResponse

get_space(
project_id: StrictInt[StrictInt],
**kwargs,
) OptimizeSpaceResponse[source]#

Search space

Search space

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

OptimizeSpaceResponse

get_state(
project_id: StrictInt[StrictInt],
**kwargs,
) OptimizeStateResponse[source]#

Retrieves the EON tuner state

Retrieves the EON tuner state

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

OptimizeStateResponse

get_transfer_learning_models(
project_id: StrictInt[StrictInt],
**kwargs,
) OptimizeTransferLearningModelsResponse[source]#

Retrieves available transfer learning models

Retrieves available transfer learning models

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

OptimizeTransferLearningModelsResponse

get_trial_logs(
project_id: StrictInt[StrictInt],
trial_id: StrictStr[StrictStr],
**kwargs,
) LogStdoutResponse[source]#

Get trial logs

Get the logs for a trial.

Parameters:
  • project_id (int) – Project ID (required)

  • trial_id (str) – trial ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

LogStdoutResponse

get_tuner_run_state(
project_id: StrictInt[StrictInt],
tuner_coordinator_job_id: StrictInt[StrictInt],
**kwargs,
) OptimizeStateResponse[source]#

Retrieves EON tuner state for a run.

Retrieves the EON tuner state for a specific run.

Parameters:
  • project_id (int) – Project ID (required)

  • tuner_coordinator_job_id (int) – Tuner coordinator job ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

OptimizeStateResponse

get_window_settings(
project_id: StrictInt[StrictInt],
**kwargs,
) WindowSettingsResponse[source]#

Get window settings

Get window settings

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

WindowSettingsResponse

list_tuner_runs(
project_id: StrictInt[StrictInt],
**kwargs,
) ListTunerRunsResponse[source]#

List all tuner runs

List all the tuner runs for a project.

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ListTunerRunsResponse

score_trial(
project_id: StrictInt[StrictInt],
tuner_create_trial_impulse: TunerCreateTrialImpulse,
**kwargs,
) ScoreTrialResponse[source]#

Score trial

Score trial

Parameters:
  • project_id (int) – Project ID (required)

  • tuner_create_trial_impulse (TunerCreateTrialImpulse) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ScoreTrialResponse

update_config(
project_id: StrictInt[StrictInt],
optimize_config: OptimizeConfig,
**kwargs,
) GenericApiResponse[source]#

Update config

Update config

Parameters:
  • project_id (int) – Project ID (required)

  • optimize_config (OptimizeConfig) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GenericApiResponse

update_tuner_run(
project_id: StrictInt[StrictInt],
tuner_coordinator_job_id: StrictInt[StrictInt],
update_tuner_run_request: UpdateTunerRunRequest,
**kwargs,
) GenericApiResponse[source]#

Update EON tuner state

Updates the EON tuner state for a specific run.

Parameters:
  • project_id (int) – Project ID (required)

  • tuner_coordinator_job_id (int) – Tuner coordinator job ID (required)

  • update_tuner_run_request (UpdateTunerRunRequest) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GenericApiResponse