neural_compressor.utils.neural_insights_utils

Neural Insights utils functions.

Module Contents

Functions

register_neural_insights_workload(→ Optional[str])

Register workload to Neural Insights.

update_neural_insights_workload(→ None)

Update status of specific workload.

update_neural_insights_workload_accuracy_data(→ None)

Update accuracy data of specific workload.

get_model_path(→ Any)

Get model path.

neural_compressor.utils.neural_insights_utils.register_neural_insights_workload(workload_location: str, model: Any, workload_mode: str, workload_name: str) str | None[source]

Register workload to Neural Insights.

Parameters:
  • workload_location – path to workload directory

  • model – Neural Compressor’s model instance to be registered

  • workload_mode – workload mode

  • workload_name – Name of the workload

Returns:

String with Neural Insight workload UUID if registered else None

neural_compressor.utils.neural_insights_utils.update_neural_insights_workload(workload_uuid: str, status: str) None[source]

Update status of specific workload.

Parameters:
  • workload_uuid – string with Neural Insight workload UUID if registered else None

  • status – workload status to be set

Returns:

None

neural_compressor.utils.neural_insights_utils.update_neural_insights_workload_accuracy_data(workload_uuid: str, baseline_accuracy: float, optimized_accuracy: float) None[source]

Update accuracy data of specific workload.

Parameters:
  • workload_uuid – string with Neural Insight workload UUID if registered else None

  • baseline_accuracy – accuracy of input model

  • optimized_accuracy – accuracy of optimized model

Returns:

None

neural_compressor.utils.neural_insights_utils.get_model_path(model: Any, workload_location: str) Any[source]

Get model path.