neural_compressor.ux.web.communication

Objects to communicate between domain logic and outside layers.

Module Contents

Classes

Request

Domain defined parameters.

Response

Domain defined response.

Message

Message used to send data to GUI.

MessageQueue

Queue for passing messages to GUI.

Functions

create_simple_response(→ Response)

Create new Response object with only data set.

class neural_compressor.ux.web.communication.Request(method: str, operation: str, data: dict)

Domain defined parameters.

class neural_compressor.ux.web.communication.Response

Domain defined response.

neural_compressor.ux.web.communication.create_simple_response(data: Dict[str, Any] | List[Dict[str, Any]]) Response

Create new Response object with only data set.

class neural_compressor.ux.web.communication.Message(status: str, subject: str, data: Any)

Message used to send data to GUI.

property subject: str

Get the subject.

property status: str

Get the status.

property data: Any

Get the data.

class neural_compressor.ux.web.communication.MessageQueue

Queue for passing messages to GUI.

post_failure(subject: str, data: Any) None

Post failure message.

post_success(subject: str, data: Any) None

Post success message.

post_error(subject: str, data: Any) None

Post error message.

get() Message

Wait for message and return it.