-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat(LMES): Support custom template and prompt #404
feat(LMES): Support custom template and prompt #404
Conversation
539a94c
to
586ad4b
Compare
Instead of calling |
a1e87dd
to
a4aef9b
Compare
Tried to refactor the testing code in the |
a4aef9b
to
01733ba
Compare
Here is a sample LMEvalJob with a custom template and custom system prompt: apiVersion: trustyai.opendatahub.io/v1alpha1
kind: LMEvalJob
metadata:
name: custom-card-template
namespace: tas
spec:
allowOnline: true
allowCodeExecution: true
model: hf
modelArgs:
- name: pretrained
value: google/flan-t5-base
taskList:
taskRecipes:
- template:
ref: tp_0
systemPrompt:
ref: sp_0
card:
name: "cards.wnli"
custom:
templates:
- name: tp_0
value: |
{
"__type__": "input_output_template",
"input_format": "{text_a_type}: {text_a}\n{text_b_type}: {text_b}",
"output_format": "{label}",
"target_prefix": "The {type_of_relation} class is ",
"instruction": "Given a {text_a_type} and {text_b_type} classify the {type_of_relation} of the {text_b_type} to one of {classes}.",
"postprocessors": [
"processors.take_first_non_empty_line",
"processors.lower_case_till_punc"
]
}
systemPrompts:
- name: sp_0
value: "Be concise. At every point give the shortest acceptable answer."
logSamples: true The |
/retest |
Expand the LMEvalJob CRD to support custom templates and system prompts. This is mainly for custom unitxt task recipes. Now, users can use the `template` and `systemPrompt` fields under the `taskRecipes` to specify the custom template and system prompt. Signed-off-by: Yihong Wang <[email protected]>
01733ba
to
ccd0ea2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to making the custom elements re-usable. This will be super helpful for future features like custom benchmarks
@kiersten-stokes: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kiersten-stokes, ruivieira The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
PR image build and manifest generation completed successfully! 📦 PR image: 📦 LMES driver image: 📦 LMES job image: 📦 Guardrails orchestrator image: 🗂️ CI manifests
|
@yhwang: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Expand the LMEvalJob CRD to support custom templates and system prompts. This is mainly for custom unitxt task recipes. Now, users can use the
template
andsystemPrompt
fields under thetaskRecipes
to specify the custom template and system prompt.