Skip to content

Commit

Permalink
RHOAI-10948 monitoring book restructure (#394)
Browse files Browse the repository at this point in the history
* RHOAI-10948 monitoring book restructure

* RHOAI-10948 monitoring book restructure

* peer review

* peer review
  • Loading branch information
aduquett authored Aug 7, 2024
1 parent 0ec7bb6 commit 965c086
Show file tree
Hide file tree
Showing 15 changed files with 331 additions and 321 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ifdef::context[:parent-context: {context}]

:context: bias-monitoring

[id="configuring-bias-metrics-for-a-model_{context}"]
= Configuring bias metrics for a model
[id="monitoring-model-bias_{context}"]
= Monitoring model bias
:upstream:
//:preview:

Expand All @@ -20,13 +20,15 @@ As a data scientist, you might want to monitor your machine learning models for

{productname-long} provides a set of metrics that help you to monitor your models for bias. You can use the {productname-short} interface to choose an available metric and then configure model-specific details such as a protected attribute, the privileged and unprivileged groups, the outcome you want to monitor, and a threshold for bias. You then see a chart of the calculated values for a specified number of model inferences.

The sections that follow describe how to configure your models for bias monitoring.

include::modules/creating-a-bias-metric.adoc[leveloffset=+1]

include::modules/duplicating-a-bias-metric.adoc[leveloffset=+1]
include::modules/duplicating-a-bias-metric.adoc[leveloffset=+2]

include::modules/deleting-a-bias-metric.adoc[leveloffset=+1]

include::modules/viewing-bias-metrics.adoc[leveloffset=+1]

include::modules/supported-bias-metrics.adoc[leveloffset=+1]

ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
28 changes: 28 additions & 0 deletions assemblies/setting-up-model-monitoring.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:_module-type: ASSEMBLY

ifdef::context[:parent-context: {context}]

[id="setting-up-model-monitoring_{context}"]
= Setting up model monitoring

[role='_abstract']

To set up model monitoring for data scientists to use in {productname-short}, a cluster administrator does the following tasks:

* Configure monitoring for the model serving platform
* Enable the TrustyAI component in the {productname-long} {install-package}
* Install the TrustyAI service on each data science project that contains models that the data scientists want to monitor

[NOTE]
====
Model monitoring with TrustyAI is only available on the ModelMesh-based _multi-model serving platform_. Model monitoring with TrustyAI is unavailable on the KServe-based _single-model serving platform_.
====

include::modules/configuring-monitoring-for-the-multi-model-serving-platform.adoc[leveloffset=+1]

include::modules/enabling-trustyai-component.adoc[leveloffset=+1]

include::modules/installing-trustyai-service.adoc[leveloffset=+1]

ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
14 changes: 2 additions & 12 deletions modules/authenticating-trustyai-service.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,17 @@ endif::[]
ifdef::cloud-service[]
* You installed the OpenShift command line interface (`oc`) as described in link:https://docs.openshift.com/dedicated/cli_reference/openshift_cli/getting-started-cli.html[Getting started with the CLI] (OpenShift Dedicated) or link:https://docs.openshift.com/rosa/cli_reference/openshift_cli/getting-started-cli.html[Getting started with the CLI] (Red Hat OpenShift Service on AWS)
endif::[]
* Your OpenShift cluster administrator has installed {productname-short}, added you as a user to the OpenShift cluster, and enabled the TrustyAI service for the data science project where the models are deployed.
* Your OpenShift cluster administrator has installed {productname-short}, added you as a user to the OpenShift cluster, and installed the TrustyAI service for the data science project where the models are deployed.

.Procedure

ifdef::upstream,self-managed[]
. In a terminal window, log in to {openshift-platform} where {productname-short} is deployed.
endif::[]
ifdef::cloud-service[]
. In a terminal window, log in to OpenShift where {productname-short} is deployed.
endif::[]
+
----
oc login
----

ifdef::upstream,self-managed[]
. Enter the following command to get the user token on {openshift-platform}.
endif::[]
ifdef::cloud-service[]
. Enter the following command to get the user token on OpenShift.
endif::[]
. Enter the following command to set a user token variable on {openshift-platform}:
+
----
TOKEN=$(oc whoami -t)
Expand Down
4 changes: 1 addition & 3 deletions modules/creating-a-bias-metric-using-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ endif::[]

* You are familiar with the specific data set schema and understand the names and meanings of the inputs and outputs.

* Your OpenShift cluster administrator has installed {productname-short} and enabled the TrustyAI service for the data science project where the models are deployed.
* Your OpenShift cluster administrator has configured monitoring for the model serving platform, enabled the TrustyAI component in the {productname-long} {install-package}, and installed the TrustyAI service for the data science project where the models are deployed.

* You installed the OpenShift command line interface (`oc`) as described in link:https://docs.openshift.com/container-platform/{ocp-latest-version}/cli_reference/openshift_cli/getting-started-cli.html[Get Started with the CLI].

ifndef::upstream[]
* You have a user token for authentication as described in link:{rhoaidocshome}{default-format-url}/monitoring_data_science_models/authenticating-trustyai-service_monitor[Authenticating the TrustyAI service].
* You have sent training data to your models as described in link:{rhoaidocshome}{default-format-url}/monitoring_data_science_models/sending-training-data-to-a-model_monitor[Sending training data to a model].
endif::[]
ifdef::upstream[]
* You have a user token for authentication as described in link:{odhdocshome}/monitoring-data-science-models/#authenticating-trustyai-service_monitor[Authenticating the TrustyAI service].
* You have sent training data to your models as described in link:{odhdocshome}/monitoring-data-science-models/#sending-training-data-to-a-model_monitor[Sending training data to a model].
endif::[]

.Procedure
Expand Down
8 changes: 3 additions & 5 deletions modules/creating-a-bias-metric-using-dashboard.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ endif::[]

* You are familiar with the specific data set schema and understand the names and meanings of the inputs and outputs.

* Your OpenShift cluster administrator has installed {productname-short} and enabled the TrustyAI service for the data science project where the models are deployed.

* You have logged in to {productname-long}.
* Your OpenShift cluster administrator has configured monitoring for the model serving platform, enabled the TrustyAI component in the {productname-long} {install-package}, and installed the TrustyAI service for the data science project where the models are deployed.

ifndef::upstream[]
* You have a user token for authentication as described in link:{rhoaidocshome}{default-format-url}/monitoring_data_science_models/authenticating-trustyai-service_monitor[Authenticating the TrustyAI service].
* You have sent training data to your models as described in link:{rhoaidocshome}{default-format-url}/monitoring_data_science_models/sending-training-data-to-a-model_monitor[Sending training data to a model].
endif::[]
ifdef::upstream[]
* You have a user token for authentication as described in link:{odhdocshome}/monitoring-data-science-models/#authenticating-trustyai-service_monitor[Authenticating the TrustyAI service].
* You have sent training data to your models as described in link:{odhdocshome}/monitoring-data-science-models/#sending-training-data-to-a-model_monitor[Sending training data to a model].
endif::[]

* You have logged in to {productname-long}.

.Procedure
. Optional: To set the `TRUSTY_ROUTE` variable, follow these steps.
.. In a terminal window, log in to the OpenShift cluster where {productname-short} is deployed.
Expand Down
51 changes: 51 additions & 0 deletions modules/enabling-trustyai-component.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
:_module-type: PROCEDURE

[id='enabling-trustyai-component_{context}']
= Enabling the TrustyAI component

[role='_abstract']
To allow your data scientists to use model monitoring, you must enable the TrustyAI component in {productname-short}.

.Prerequisites
* You have logged in to {openshift-platform} with the `cluster-admin` role.
* You have access to the data science cluster.
* You have installed {productname-long}.

.Procedure
. In the {openshift-platform} console, click *Operators* -> *Installed Operators*.
ifdef::self-managed,cloud-service[]
. Search for the *Red Hat OpenShift AI* Operator, and then click the Operator name to open the Operator details page.
endif::[]
ifdef::upstream[]
. Search for the *Open Data Hub Operator*, and then click the Operator name to open the Operator details page.
endif::[]
. Click the *Data Science Cluster* tab.
. Click the default instance name (for example, *default-dsc*) to open the instance details page.
. Click the *YAML* tab to show the instance specifications.
. In the `spec:components` section, set the `managementState` field for the `trustyai` component to `Managed`:
+
----
trustyai:
managementState: Managed
----

. Click *Save*.

.Verification
Check the status of the *trustyai-service-operator* pod as follows:

ifdef::self-managed,cloud-service[]
. In the {openshift-platform} console, from the *Project* list, select *redhat-ods-applications*.
endif::[]
ifdef::upstream[]
. In the {openshift-platform} console, from the *Project* list, select *opendatahub*.
endif::[]

. Click *Workloads* -> *Deployments*.
. Search for the *trustyai-service-operator-contoller-manager* deployment.
Check the status as follows:
.. Click the deployment name to open the deployment details page.
.. Click the *Pods* tab.
.. Check the pod status.
+
When the status of the *trustyai-service-operator-controller-manager-_<pod-id>_* pod is *Running*, the pod is ready to use.
153 changes: 0 additions & 153 deletions modules/enabling-trustyai-service-using-cli.adoc

This file was deleted.

Loading

0 comments on commit 965c086

Please sign in to comment.