aihwkit.cloud.client.v1.api_client module¶
API client the AIHW Composer API.
-
class
aihwkit.cloud.client.v1.api_client.
ApiClient
(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.
-
experiment_create
(input_, name, device='gpu')[source]¶ Create a new experiment, queuing its execution.
- Parameters
input – the experiment to be executed.
name (str) – the name of the experiment.
device (str) – the desired device.
input_ (aihwkit.experiments.experiments.training.BasicTraining) –
- 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
-
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
-