Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Transformerlab App
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
TransformerLab
Transformerlab App
Commits
8a4f4727
Commit
8a4f4727
authored
1 month ago
by
deep1401
Browse files
Options
Downloads
Patches
Plain Diff
Setting eval name using friendly name generator if run_name is not specified
parent
462ada1b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/renderer/components/Experiment/Eval/Eval.tsx
+16
-8
16 additions, 8 deletions
src/renderer/components/Experiment/Eval/Eval.tsx
with
16 additions
and
8 deletions
src/renderer/components/Experiment/Eval/Eval.tsx
+
16
−
8
View file @
8a4f4727
...
@@ -35,6 +35,7 @@ import {
...
@@ -35,6 +35,7 @@ import {
Trash2Icon
,
Trash2Icon
,
XSquareIcon
,
XSquareIcon
,
}
from
'
lucide-react
'
;
}
from
'
lucide-react
'
;
import
{
generateFriendlyName
}
from
'
renderer/lib/utils
'
;
import
DynamicPluginForm
from
'
../DynamicPluginForm
'
;
import
DynamicPluginForm
from
'
../DynamicPluginForm
'
;
import
EvalJobsTable
from
'
./EvalJobsTable.tsx
'
;
import
EvalJobsTable
from
'
./EvalJobsTable.tsx
'
;
...
@@ -102,10 +103,10 @@ export default function Eval({
...
@@ -102,10 +103,10 @@ export default function Eval({
isLoading
:
pluginsIsLoading
,
isLoading
:
pluginsIsLoading
,
}
=
useSWR
(
}
=
useSWR
(
experimentInfo
?.
id
&&
experimentInfo
?.
id
&&
chatAPI
.
Endpoints
.
Experiment
.
ListScriptsOfType
(
chatAPI
.
Endpoints
.
Experiment
.
ListScriptsOfType
(
experimentInfo
?.
id
,
experimentInfo
?.
id
,
'
evaluator
'
'
evaluator
'
),
),
fetcher
fetcher
);
);
...
@@ -120,7 +121,7 @@ export default function Eval({
...
@@ -120,7 +121,7 @@ export default function Eval({
method
:
'
POST
'
,
method
:
'
POST
'
,
body
:
value
,
body
:
value
,
}
}
).
then
(()
=>
{});
).
then
(()
=>
{
});
}
}
}
}
...
@@ -133,6 +134,9 @@ export default function Eval({
...
@@ -133,6 +134,9 @@ export default function Eval({
return
'
No experiment selected
'
;
return
'
No experiment selected
'
;
}
}
console
.
log
(
"
ExperimentInfo
"
,
experimentInfo
);
return
(
return
(
<>
<>
<
Sheet
<
Sheet
...
@@ -164,12 +168,17 @@ export default function Eval({
...
@@ -164,12 +168,17 @@ export default function Eval({
/* The way evals are defined right now, they need a unique name. This is a hack
/* The way evals are defined right now, they need a unique name. This is a hack
until we have a better solution */
until we have a better solution */
const
nameOfThisEvaluation
=
let
nameOfThisEvaluation
;
selectedPlugin
+
'
_
'
+
JSON
.
stringify
(
formJson
);
if
(
formJson
.
run_name
)
{
nameOfThisEvaluation
=
formJson
.
run_name
;
}
else
{
nameOfThisEvaluation
=
selectedPlugin
+
'
_
'
+
generateFriendlyName
();
}
addEvaluation
(
selectedPlugin
,
nameOfThisEvaluation
,
formJson
);
addEvaluation
(
selectedPlugin
,
nameOfThisEvaluation
,
formJson
);
setOpen
(
false
);
setOpen
(
false
);
}
}
}
}
>
>
<
Stack
spacing
=
{
2
}
>
<
Stack
spacing
=
{
2
}
>
<
FormControl
>
<
FormControl
>
<
FormLabel
>
Evaluation Plugin Template:
</
FormLabel
>
<
FormLabel
>
Evaluation Plugin Template:
</
FormLabel
>
...
@@ -179,7 +188,6 @@ export default function Eval({
...
@@ -179,7 +188,6 @@ export default function Eval({
experimentInfo
=
{
experimentInfo
}
experimentInfo
=
{
experimentInfo
}
plugin
=
{
selectedPlugin
}
plugin
=
{
selectedPlugin
}
/>
/>
<
Button
type
=
"submit"
>
Submit
</
Button
>
<
Button
type
=
"submit"
>
Submit
</
Button
>
</
Stack
>
</
Stack
>
</
form
>
</
form
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment