aihwkit.cloud.client.v1.parsers module¶
Parsers for the AIHW Composer API.
-
class
aihwkit.cloud.client.v1.parsers.ExperimentParser¶ Bases:
objectParser for Experiment API responses.
-
static
parse_date_string(date_string)¶ Return a datetime from a date string.
- Parameters
date_string (str) – the date string from the API.
- Returns
A value from the CloudExperimentCategory enum.
- Return type
datetime.datetime
-
static
parse_experiment(api_response, api_client)¶ Return a CloudExperiment from an API response.
- Parameters
api_response (Dict) – the response from the API.
api_client (Any) – the client to be used in API requests.
- Returns
A CloudExperiment based on the response. Some of the fields might not be populated if they are not present in the response.
- Return type
-
static
parse_experiment_category(api_response)¶ Return an Experiment category from an API response.
- Parameters
api_response (Dict) – the response from the API.
- Returns
A value from the CloudExperimentCategory enum.
- Raises
InvalidResponseFieldError – if the API response contains an unrecognized category.
- Return type
-
static
parse_experiment_status(api_response)¶ Return an Experiment status from an API response.
- Parameters
api_response (Dict) – the response from the API.
- Returns
A value from the CloudJobStatus enum.
- Raises
InvalidResponseFieldError – if the API response contains an unrecognized status code.
- Return type
-
static
parse_job(api_response)¶ Return an CloudJob from an API response.
- Parameters
api_response (Dict) – the response from the API.
- Returns
A CloudJob based on the response. Some of the fields might not be populated if they are not present in the response.
- Return type
-
static