Skip to content

Commit f11c635

Browse files
committed
fix: reworked fine-tuning button and toggle in settings
Signed-off-by: Brian <[email protected]>
1 parent 00fecb9 commit f11c635

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

packages/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"type": "boolean",
5656
"default": false,
5757
"description": "Display InstructLab Tuning screens (experimental)",
58-
"hidden": true
58+
"hidden": false
5959
},
6060
"ai-lab.showGPUPromotion": {
6161
"type": "boolean",

packages/frontend/src/pages/instructlab/AboutInstructLab.svelte

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ import howInstructLabsSyntheticDataGenerationEnhancesLLM from '/@/lib/images/how
1010
import instructLabTitleImage from '/@/lib/images/instructLabTitleImage.png';
1111
import AboutInstructLabDiscoverCard from '../../lib/instructlab/AboutInstructLabDiscoverCard.svelte';
1212
import AboutInstructLabExploreCard from '../../lib/instructlab/AboutInstructLabExploreCard.svelte';
13+
import { configuration } from '/@/stores/extensionConfiguration';
14+
import { onMount } from 'svelte';
15+
16+
let experimentalTuning = false;
17+
18+
onMount(() => {
19+
configuration.subscribe(val => {
20+
experimentalTuning = val?.experimentalTuning ?? false;
21+
});
22+
});
1323
1424
function start(): void {
1525
router.goto('/tune/start');
@@ -19,6 +29,10 @@ const instructLabDocumentation = 'https://docs.instructlab.ai/';
1929
const instructLabHuggingFace = 'https://huggingface.co/instructlab';
2030
const instructLabSamples = '';
2131
32+
async function enableFineTuning(): Promise<void> {
33+
await studioClient.updateExtensionConfiguration({ experimentalTuning: true });
34+
}
35+
2236
async function openInstructLabDocumentation(): Promise<void> {
2337
await studioClient.openURL(instructLabDocumentation);
2438
}
@@ -68,7 +82,11 @@ let cards: AboutInstructLabExploreCardInterface[] = [
6882

6983
<NavPage title="About InstructLab" searchEnabled={false}>
7084
<div slot="additional-actions">
71-
<Button icon={faPlusCircle} on:click={start}>Start Fine Tuning</Button>
85+
{#if experimentalTuning}
86+
<Button icon={faPlusCircle} on:click={start}>Start Fine Tuning</Button>
87+
{:else}
88+
<Button icon={faPlusCircle} on:click={enableFineTuning}>Enable Experimental Fine Tuning</Button>
89+
{/if}
7290
</div>
7391
<div slot="content" class="flex flex-col min-w-full min-h-full">
7492
<div class="min-w-full min-h-full flex-1">

0 commit comments

Comments
 (0)