From 8f4628b4768005a215069adbd0e99721911d34ec Mon Sep 17 00:00:00 2001 From: William Guss Date: Sun, 13 Oct 2024 07:22:00 -0700 Subject: [PATCH] enable parallel writes --- .../components/evaluations/MetricGraphGrid.js | 21 +++++++++- .../src/components/graphing/GraphSystem.js | 4 +- ell-studio/src/pages/Evaluation.js | 2 +- examples/eval.py | 8 ++-- src/ell/stores/sql.py | 38 +++++++++++-------- 5 files changed, 49 insertions(+), 24 deletions(-) diff --git a/ell-studio/src/components/evaluations/MetricGraphGrid.js b/ell-studio/src/components/evaluations/MetricGraphGrid.js index d2930aa7..7a6232ca 100644 --- a/ell-studio/src/components/evaluations/MetricGraphGrid.js +++ b/ell-studio/src/components/evaluations/MetricGraphGrid.js @@ -4,6 +4,7 @@ import { Card } from '../common/Card'; import Graph from '../graphing/Graph'; import { GraphProvider } from '../graphing/GraphSystem'; import MetricDisplay from './MetricDisplay'; +import { Link } from 'react-router-dom'; const MetricGraphGrid = ({ evaluation, groupedRuns, onActiveIndexChange }) => { const [activeIndex, setActiveIndex] = useState(null); @@ -40,7 +41,7 @@ const MetricGraphGrid = ({ evaluation, groupedRuns, onActiveIndexChange }) => { }, { means: [], stdDevs: [], errors: [], confidenceIntervals: [] }); }; - const xData = Array.from({ length: getHistoricalData(evaluation.labelers?.[0]).means.length}, (_, i) => `Run ${i + 1}`); + const xData = Array.from({ length: getHistoricalData(evaluation.labelers?.[0]).means.length}, (_, i) => `${i + 1}`); const handleHover = useCallback((index) => { setActiveIndex(index); @@ -53,7 +54,6 @@ const MetricGraphGrid = ({ evaluation, groupedRuns, onActiveIndexChange }) => { }, [onActiveIndexChange]); const hasMultipleValues = getHistoricalData(evaluation.labelers[0]).means.length > 1; - return ( { position: 'average', // TODO: Make the label custom so when we click it takes us to that run id. }, + }, + scales: { + x: { + display: true, + title: { + display: true, + text: 'Run Number' + } + }, + y: { + display: true, + title: { + display: false + } + } } } }} @@ -86,6 +101,7 @@ const MetricGraphGrid = ({ evaluation, groupedRuns, onActiveIndexChange }) => { return (
+ { paddingClassOverride="p-0" shortVersion={true} /> + { dataset.errorBars && dataset.errorBars.some(error => error > 0 || (error.low - error.high > 0)) ); - let yAxisScale = {}; + let yAxisScale = { + ...sharedConfig.options.scales.y,}; if (hasNonZeroErrorBars || true) { // Calculate min and max values including error bars const minMaxValues = data.datasets.reduce((acc, dataset) => { @@ -150,6 +151,7 @@ export const GraphRenderer = ({ graphId }) => { yAxisScale = { y: { + ...sharedConfig.options.scales.y, beginAtZero: false, min: Math.max(0, minMaxValues.min - yAxisPadding), max: minMaxValues.max + yAxisPadding, diff --git a/ell-studio/src/pages/Evaluation.js b/ell-studio/src/pages/Evaluation.js index da55448a..a5472b0a 100644 --- a/ell-studio/src/pages/Evaluation.js +++ b/ell-studio/src/pages/Evaluation.js @@ -103,7 +103,7 @@ function Evaluation() {
- {['Runs', 'Metrics', 'Version History'].map((tab) => ( + {['Runs', 'Version History'].map((tab) => (