log
Arize method to log inferences within a dataframe to Arize via a POST request.
Client.log()
returns a requests.models.Response
object. You can check its http status code to ensure successful delivery of records.
This API uses fast serialization to the file system from Python and followed up by a fast client to server upload. It does require storage in the file system for the file being uploaded.
Parameter | Data Type | Description |
---|---|---|
| [Pandas.DataFrame] | (Required) The dataframe containing your model data |
| str | (Required) A unique name to identify your model in the platform |
| str | (Required*)A subset of predictions and actuals for a given |
| (Required) Declare your model type represented in the platform and validate applicable performance metrics | |
| (Required) The environment (Production, Training, Validation) for your dataframe | |
| (Required) A Schema instance that specifies the column names for corresponding data in the dataframe | |
| str | (Optional*) Used to distinguish different batch of data under the same model_id and model_version *Only applicable and required for validation environment |
| (Optional) A list of desired metric groups; defaults to None. When populated, and if validate=True, the presence of schema columns are validated against the desired metrics | |
| bool | (Optional) When set to True, validation is run on the model schema and dataframe before sending data. Defaults to True (recommended). |
| str | (Optional) Temporary directory/file to store the serialized data in binary before sending to Arize |
| bool | (Optional) When sync is set to True, the log call will block, or wait, until the data has been successfully ingested by the platform and immediately return the status of the log |
| bool | (Optional) Computes feature importance values using the surrogate explainability method. This requires that the arize module is installed with the [MimicExplainer] option. If feature importance values are already specified by the shap_values_column_names attribute in the Schema, this module will not run |
Arize expects the DataFrame's index to be sorted and begin at 0. If you perform operations that might affect the index prior to logging data, reset the index as follows:
Code Example
Last updated