Skip to content

Commit

Permalink
adding an evaluation works
Browse files Browse the repository at this point in the history
  • Loading branch information
aliasaria committed Jan 4, 2024
1 parent 309cc4e commit 90fe42c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
15 changes: 7 additions & 8 deletions src/renderer/components/Experiment/Eval/Eval.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,13 @@ export default function Eval({
const formJson = Object.fromEntries(
(formData as any).entries()
);
alert(JSON.stringify(formJson));
// chatAPI.saveTrainingTemplate(
// event.currentTarget.elements['template_name'].value,
// 'Description',
// 'LoRA',
// JSON.stringify(formJson)
// );
// addEvaluation(plugin, localName, { task: task });
// alert(JSON.stringify(formJson));

/* The way evals are defined right now, they need a unique name. This is a hack
until we have a better solution */
const nameOfThisEvaluation =
selectedPlugin + '_' + JSON.stringify(formJson);
addEvaluation(selectedPlugin, nameOfThisEvaluation, formJson);
setOpen(false);
}}
>
Expand Down
7 changes: 0 additions & 7 deletions src/renderer/components/MainAppPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ export default function MainAppPanel({
localName: string,
script_template_parameters: any = {}
) {
let currentPlugins = experimentInfo?.config?.plugins;
if (!currentPlugins) {
currentPlugins = [];
} else {
currentPlugins = JSON.parse(currentPlugins);
}

await chatAPI.EXPERIMENT_ADD_EVALUATION(
experimentInfo?.id,
localName,
Expand Down

0 comments on commit 90fe42c

Please sign in to comment.