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
fb4d2f23
Commit
fb4d2f23
authored
10 months ago
by
ali asaria
Browse files
Options
Downloads
Patches
Plain Diff
render an introduction to a plugin
parent
c7be2b56
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/renderer/components/Experiment/Train/TrainingModalLoRA.tsx
+36
-8
36 additions, 8 deletions
...enderer/components/Experiment/Train/TrainingModalLoRA.tsx
with
36 additions
and
8 deletions
src/renderer/components/Experiment/Train/TrainingModalLoRA.tsx
+
36
−
8
View file @
fb4d2f23
...
@@ -2,7 +2,8 @@ import { useState, FormEvent, useEffect } from 'react';
...
@@ -2,7 +2,8 @@ import { useState, FormEvent, useEffect } from 'react';
import
useSWR
from
'
swr
'
;
import
useSWR
from
'
swr
'
;
import
*
as
chatAPI
from
'
renderer/lib/transformerlab-api-sdk
'
;
import
*
as
chatAPI
from
'
renderer/lib/transformerlab-api-sdk
'
;
import
Markdown
from
'
react-markdown
'
;
import
remarkGfm
from
'
remark-gfm
'
;
import
{
import
{
Button
,
Button
,
FormControl
,
FormControl
,
...
@@ -32,9 +33,29 @@ const DefaultLoraConfig = {
...
@@ -32,9 +33,29 @@ const DefaultLoraConfig = {
};
};
import
{
generateFriendlyName
}
from
'
renderer/lib/utils
'
;
import
{
generateFriendlyName
}
from
'
renderer/lib/utils
'
;
const
fetcher
=
(
url
)
=>
fetch
(
url
).
then
((
res
)
=>
res
.
json
());
const
fetcher
=
(
url
)
=>
fetch
(
url
).
then
((
res
)
=>
res
.
json
());
function
PluginIntroduction
({
experimentInfo
,
pluginId
})
{
const
{
data
,
error
,
isLoading
}
=
useSWR
(
chatAPI
.
Endpoints
.
Experiment
.
ScriptGetFile
(
experimentInfo
?.
id
,
pluginId
,
'
info.md
'
),
fetcher
);
return
(
<>
<
Markdown
remarkPlugins
=
{
[
remarkGfm
]
}
className
=
"editableSheetContent"
>
{
data
&&
data
!=
'
FILE NOT FOUND
'
?
data
:
'
No description for this plugin is availabe.
'
}
</
Markdown
>
</>
);
}
export
default
function
TrainingModalLoRA
({
export
default
function
TrainingModalLoRA
({
open
,
open
,
onClose
,
onClose
,
...
@@ -258,15 +279,22 @@ export default function TrainingModalLoRA({
...
@@ -258,15 +279,22 @@ export default function TrainingModalLoRA({
sx
=
{
{
borderRadius
:
'
lg
'
,
display
:
'
flex
'
,
overflow
:
'
hidden
'
}
}
sx
=
{
{
borderRadius
:
'
lg
'
,
display
:
'
flex
'
,
overflow
:
'
hidden
'
}
}
>
>
<
TabList
>
<
TabList
>
<
Tab
>
1. Name
</
Tab
>
<
Tab
>
Introduction
</
Tab
>
<
Tab
>
2. Data
</
Tab
>
<
Tab
>
Name
</
Tab
>
<
Tab
>
3. Plugin Config
</
Tab
>
<
Tab
>
Data
</
Tab
>
<
Tab
>
Plugin Config
</
Tab
>
</
TabList
>
</
TabList
>
<
TabPanel
value
=
{
0
}
sx
=
{
{
p
:
2
,
overflow
:
'
auto
'
}
}
keepMounted
>
<
TabPanel
value
=
{
0
}
sx
=
{
{
p
:
2
,
overflow
:
'
auto
'
}
}
>
<
PluginIntroduction
experimentInfo
=
{
experimentInfo
}
pluginId
=
{
pluginId
}
/>
</
TabPanel
>
<
TabPanel
value
=
{
1
}
sx
=
{
{
p
:
2
,
overflow
:
'
auto
'
}
}
keepMounted
>
<
TrainingModalFirstTab
/>
<
TrainingModalFirstTab
/>
</
TabPanel
>
</
TabPanel
>
<
TabPanel
value
=
{
1
}
sx
=
{
{
p
:
2
,
overflow
:
'
auto
'
}
}
keepMounted
>
<
TabPanel
value
=
{
2
}
sx
=
{
{
p
:
2
,
overflow
:
'
auto
'
}
}
keepMounted
>
<
TrainingModalDataTab
<
TrainingModalDataTab
datasetsIsLoading
=
{
datasetsIsLoading
}
datasetsIsLoading
=
{
datasetsIsLoading
}
datasets
=
{
datasets
}
datasets
=
{
datasets
}
...
@@ -280,7 +308,7 @@ export default function TrainingModalLoRA({
...
@@ -280,7 +308,7 @@ export default function TrainingModalLoRA({
pluginId
=
{
pluginId
}
pluginId
=
{
pluginId
}
/>
/>
</
TabPanel
>
</
TabPanel
>
<
TabPanel
value
=
{
2
}
sx
=
{
{
p
:
2
,
overflow
:
'
auto
'
}
}
keepMounted
>
<
TabPanel
value
=
{
3
}
sx
=
{
{
p
:
2
,
overflow
:
'
auto
'
}
}
keepMounted
>
<
DynamicPluginForm
<
DynamicPluginForm
experimentInfo
=
{
experimentInfo
}
experimentInfo
=
{
experimentInfo
}
plugin
=
{
pluginId
}
plugin
=
{
pluginId
}
...
...
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