Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lm eval documentation #538

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

BSynRedhat
Copy link
Contributor

LM-Eval upstream contents x4 modules (incl assembly) and updated TrustyAI book to include the LMEval assembly. Conditionalized the bias tutorial and explainability assembly to only appear upstream.

@BSynRedhat BSynRedhat self-assigned this Nov 13, 2024
@BSynRedhat BSynRedhat marked this pull request as draft November 13, 2024 15:05
@aduquett aduquett mentioned this pull request Nov 13, 2024
@BSynRedhat BSynRedhat marked this pull request as ready for review November 14, 2024 18:03
[role='_abstract']
LM-Eval service defines a new Custom Resource Definition (CRD) called `LMEvalJob`. An `LMEvalJob` object represents an evaluation job. `LMEvalJob` objects are monitored by the TrustyAI Kubernetes operator.

Therefore, to run an evaluation job, you first need to create an `LMEvalJob` object with the following information: `model`, `model arguments`, `task`, and `secret`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Therefore, to run an evaluation job, you first need to create an `LMEvalJob` object with the following information: `model`, `model arguments`, `task`, and `secret`.
To run an evaluation job, you create an `LMEvalJob` object with the following information: `model`, `model arguments`, `task`, and `secret`.


Therefore, to run an evaluation job, you first need to create an `LMEvalJob` object with the following information: `model`, `model arguments`, `task`, and `secret`.

Once the `LMEvalJob` is created, the LM-Eval service will run the evaluation job and update the status and results to the `LMEvalJob` object when the information is available.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Once the `LMEvalJob` is created, the LM-Eval service will run the evaluation job and update the status and results to the `LMEvalJob` object when the information is available.
After the `LMEvalJob` is created, the LM-Eval service runs the evaluation job. The status and results of the `LMEvalJob` object update when the information is available.

Using "once" to mean "after" can be confusing to non-English speakers - using "after" is more precise.
Reference: https://www.ibm.com/docs/en/ibm-style?topic=word-usage#o


[NOTE]
--
It is not recommended to deploy the TrustyAI custom resource (CR) in any namespace that contains non-tabular models. Such models are unsupported by TrustyAI, and may cause errors within the TrustyAI service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It is not recommended to deploy the TrustyAI custom resource (CR) in any namespace that contains non-tabular models. Such models are unsupported by TrustyAI, and may cause errors within the TrustyAI service.
TrustyAI does not support non-tabular models. Deploying the TrustyAI custom resource (CR) in a namespace that contains non-tabular models can cause errors within the TrustyAI service.

Rewriting for passive voice. Also better to state the recommendation rather that saying "it is not recommended"
References:


.Sample LMEvalJob object

Below is an example of an `LMEvalJob` object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Below is an example of an `LMEvalJob` object.
The sample `LMEvalJob` object contains the following features:

Avoid use of "below"

Do not use to indicate a relative location in a document, as in “the information below”.
From: https://www.ibm.com/docs/en/ibm-style?topic=word-usage#b

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this list might also be better as callouts in the code.


Below is an example of an `LMEvalJob` object.

* It uses the `google/flan-t5-base` model from link:https://huggingface.co/google/flan-t5-base[Hugging Face].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* It uses the `google/flan-t5-base` model from link:https://huggingface.co/google/flan-t5-base[Hugging Face].
* The `google/flan-t5-base` model from link:https://huggingface.co/google/flan-t5-base[Hugging Face].

** `env`: Specify environment variables. It uses the `EnvVar` data structure of kubernetes.
** `volumeMounts`: Mount the volumes into the lm-eval container
** `resources`: Specify the resources for the lm-eval container.
* `volumes`: Specify the volume information for the lm-eval and other containers. It uses the `Volume` data structure of kubernetes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `volumes`: Specify the volume information for the lm-eval and other containers. It uses the `Volume` data structure of kubernetes.
* `volumes`: Specifies the volume information for the `lm-eval` and other containers. This parameter uses the `Volume` data structure of Kubernetes.

** `volumeMounts`: Mount the volumes into the lm-eval container
** `resources`: Specify the resources for the lm-eval container.
* `volumes`: Specify the volume information for the lm-eval and other containers. It uses the `Volume` data structure of kubernetes.
* `sideCars`: A list of containers that run along with the lm-eval container. It uses the `Container` data structure of kubernetes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `sideCars`: A list of containers that run along with the lm-eval container. It uses the `Container` data structure of kubernetes.
* `sideCars`: A list of containers that run along with the `lm-eval` container. It uses the `Container` data structure of Kubernetes.



| `outputs`
| This section defines custom output locations for the evaluation results storage. At the moment only Persistent Volume Claims (PVC) are supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| This section defines custom output locations for the evaluation results storage. At the moment only Persistent Volume Claims (PVC) are supported.
| This parameter defines a custom output location to store the the evaluation results. Only Persistent Volume Claims (PVC) are supported.

Not sure if parameter is the right word

| This section defines custom output locations for the evaluation results storage. At the moment only Persistent Volume Claims (PVC) are supported.

| `outputs.pvcManaged`
| Create an operator-managed PVC to store this job's results. The PVC will be named `<job-name>-pvc` and will be owned by the `LMEvalJob`. After job completion, the PVC will still be available, but it will be deleted upon deleting the `LMEvalJob`. Supports the following fields:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Create an operator-managed PVC to store this job's results. The PVC will be named `<job-name>-pvc` and will be owned by the `LMEvalJob`. After job completion, the PVC will still be available, but it will be deleted upon deleting the `LMEvalJob`. Supports the following fields:
| Creates an operator-managed PVC to store this job's results. The PVC is named `<job-name>-pvc` and is owned by the `LMEvalJob`. After the job finishes, the PVC is still be available, but it is deleted with the `LMEvalJob`. Supports the following fields:

Can we find a different wording than "is owned by" - in addition to being passive voice, it anthropomorphizes the job. More info: https://www.ibm.com/docs/en/ibm-style?topic=grammar-anthropomorphism

= LM-Eval evaluation job

[role='_abstract']
LM-Eval service defines a new Custom Resource Definition (CRD) called `LMEvalJob`. An `LMEvalJob` object represents an evaluation job. `LMEvalJob` objects are monitored by the TrustyAI Kubernetes operator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the LM-Eval service? RHOAI or Openshift? Should it be code formatted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants