aihwkit.cloud.client.v1.i_api_client module
API client the AIHW Composer API.
- class aihwkit.cloud.client.v1.i_api_client.InferenceApiClient(session)[source]
Bases:
object
API client the AIHW Composer API.
Client for interfacing with the AIHW Composer API. Upon instantiation, the client will attempt to login (using the details from the
session
).The functionality is provided by the stubs that are created during the instantiation, providing an interface that which mimic the REST API endpoints.
- Parameters:
session (ApiSession) –
- experiment_create(input_, analog_info, noise_model_info, name, device='gpu')[source]
Create a new experiment, queuing its execution.
- Parameters:
input – the experiment to be executed.
analog_info (Dict) – analog information.
noise_model_info (Dict) – noise information.
name (str) – the name of the experiment.
device (str) – the desired device.
input_ (BasicInferencing) –
- Returns:
A
CloudExperiment
.- Return type:
- experiment_get(experiment_id)[source]
Get an existing job by id.
- Parameters:
experiment_id (str) – id of the experiment.
- Returns:
A CloudExperiment with the specified id.
- Return type:
- experiments_list()[source]
Return a list of experiments.
- Return type:
List[CloudExperiment]
- input_get(input_id)[source]
Get an existing input by id.
- Parameters:
input_id (str) – id of the input.
- Returns:
The input with the specified id, in protobuf format.
- Return type:
bytes
- job_get(job_id)[source]
Get an existing job by id.
- Parameters:
job_id (str) – id of the job.
- Returns:
A CloudJob with the specified id.
- Return type:
- login()[source]
Login into the application.
- Raises:
CredentialsError – if the credentials are not valid.
ApiResponseError – if the request was not successful.
- Return type:
None