Data Views Client¶
-
class
citrination_client.views.client.
DataViewsClient
(api_key, site='https://citrination.com', suppress_warnings=False, proxies=None)¶ Data Views client.
-
__init__
(api_key, site='https://citrination.com', suppress_warnings=False, proxies=None)¶ Contructor
-
create
(configuration, name, description)¶ Creates a data view from the search template and ml template given
- Parameters
configuration – Information to construct the data view from (eg descriptors, datasets etc)
name – Name of the data view
description – Description for the data view
- Returns
The data view id
-
create_ml_configuration
(search_template, extract_as_keys, dataset_ids)¶ This method will spawn a server job to create a default ML configuration based on a search template and the extract as keys. This function will submit the request to build, and wait for the configuration to finish before returning.
- Parameters
search_template – A search template defining the query (properties, datasets etc)
extract_as_keys – Array of extract-as keys defining the descriptors
dataset_ids – Array of dataset identifiers to make search template from
- Returns
An identifier used to request the status of the builder job (get_ml_configuration_status)
-
create_ml_configuration_from_datasets
(dataset_ids)¶ Creates an ml configuration from dataset_ids and extract_as_keys
- Parameters
dataset_ids – Array of dataset identifiers to make search template from
- Returns
An identifier used to request the status of the builder job (get_ml_configuration_status)
-
delete
(id)¶ Deletes a data view.
- Parameters
id – Identifier of the data view
-
get
(data_view_id)¶ Gets basic information about a view
- Parameters
data_view_id – Identifier of the data view
- Returns
Metadata about the view as JSON
-
get_data_view_service_status
(data_view_id)¶ - Retrieves the status for all of the services associated with a data view:
predict
experimental_design
data_reports
model_reports
- Parameters
data_view_id (str) – The ID number of the data view to which the run belongs, as a string
- Returns
A
DataViewStatus
- Return type
DataViewStatus
-
get_model_reports
(data_view_id)¶ Retrieves the model reports of a data view
- Parameters
data_view_id (str) – the id of the view to retrieve model reports from
- Returns
A list of model reports
- Return type
list of class:ModelReport
-
get_relation_graph
(data_view_id)¶ Retrieves the relation graph of data views with ML configured, that can be passed into the
plot
function ofdagre_py.core
for visualization.A relation graph shows you how your inputs, outputs, and latent variables are linked by Citrination’s machine learning models.
- Parameters
data_view_id (str) – the id of the view to retrieve relation graphs from
- Returns
A dict containing a list of nodes and edges
- Return type
dict
-
update
(id, configuration=None, name=None, description=None)¶ Updates an existing data view from the search template and ml template given
- Parameters
id – Identifier for the data view. This returned from the create method.
configuration – Information to construct the data view from (eg descriptors, datasets etc)
name – Name of the data view
description – Description for the data view
-
validate
(configuration)¶ Sends a request to Citrination to run some basic tests on the configuration.
- Parameters
configuration – Information to construct the data view from (eg descriptors, datasets etc)
- Returns
A set of notes describing the results of the validation request
-