Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maamalama committed May 14, 2024
1 parent 8480ea7 commit f5a7c43
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions web/components/templates/prompts/experiments/scoresTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ export type ScoresProps = {
scores: ExperimentScores;
};
const ScoresTable = ({ scores }: ScoresProps) => {
const calculateChange = (datasetCost: number, hypothesisCost: number) => {
const change = hypothesisCost - datasetCost;
const percentageChange = +((change / datasetCost) * 100).toFixed(2);
return {
change: +change.toFixed(4),
percentageChange,
};
};

const getScoreValue = (score: ScoreValue, field: string) => {
if (field === "dateCreated" && typeof score === "string") {
return renderScoreValue(score);
Expand Down Expand Up @@ -161,7 +152,7 @@ const ScoresTable = ({ scores }: ScoresProps) => {
</TableCell>
<TableCell className="h-full border-l border-gray-300">
<p className="text-black text-sm">
{getScoreValue(scores.dataset.scores[field], field)}
{getScoreValue(scores.hypothesis.scores[field], field)}
</p>
</TableCell>
<TableCell className="h-full border-l border-gray-300">
Expand Down

0 comments on commit f5a7c43

Please sign in to comment.