native eval

This commit is contained in:
Xi Yan 2024-12-02 14:36:17 -08:00
parent 2f7e39fb10
commit de2ab1243a
4 changed files with 43 additions and 4 deletions

View file

@ -11,7 +11,13 @@ def main():
application_evaluation_page = st.Page(
"page/evaluations/app_eval.py",
title="Application Evaluation",
icon="🦙",
icon="📊",
default=False,
)
native_evaluation_page = st.Page(
"page/evaluations/native_eval.py",
title="Native Evaluation",
icon="📊",
default=False,
)
@ -28,7 +34,7 @@ def main():
pg = st.navigation(
{
"Evaluations": [application_evaluation_page],
"Evaluations": [application_evaluation_page, native_evaluation_page],
"Playground": [chat_page, rag_page],
"Distribution": [distribution_page],
}

View file

@ -16,7 +16,7 @@ from modules.utils import process_dataset
def application_evaluation_page():
st.set_page_config(page_title="Application Evaluation", page_icon="🦙")
st.title("🦙 Llama Stack Evaluations")
st.title("🦙 Llama Stack Application Evaluations")
# File uploader
uploaded_file = st.file_uploader("Upload Dataset", type=["csv", "xlsx", "xls"])

View file

@ -0,0 +1,33 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import streamlit as st
from modules.api import llama_stack_api
def native_evaluation_page():
st.set_page_config(page_title="Native Evaluations", page_icon="🦙")
st.title("🦙 Llama Stack Native Evaluations")
# Select Eval Tasks
st.subheader("Select Eval Tasks")
eval_tasks = llama_stack_api.client.eval_tasks.list()
eval_tasks = {et.identifier: et for et in eval_tasks}
eval_tasks_names = list(eval_tasks.keys())
selected_eval_task = st.selectbox(
"Choose an eval task.",
options=eval_tasks_names,
help="Choose an eval task. Each eval task is parameterized by a dataset, and list of scoring functions.",
)
st.json(eval_tasks[selected_eval_task], expanded=True)
# Define Eval Candidate
st.subheader("Define Eval Candidate")
# eval_candidate = {}
native_evaluation_page()

View file

@ -15,7 +15,7 @@ from modules.utils import data_url_from_file
def rag_chat_page():
st.title("RAG")
st.title("🦙 RAG")
with st.sidebar:
# File/Directory Upload Section